File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/utils Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,7 @@ fun Project.lookupFile(path: String): VirtualFile? {
19
19
20
20
fun Project.findFile (filename : String , caseSensitively : Boolean = true): VirtualFile ? {
21
21
ApplicationManager .getApplication().assertReadAccessAllowed()
22
- val currentTask = ApplicationManager .getApplication().executeOnPooledThread<VirtualFile ?> {
23
- val searchedFiles = runReadAction {
24
- FilenameIndex .getVirtualFilesByName(filename, caseSensitively, ProjectScope .getContentScope(this ))
25
- }
26
- return @executeOnPooledThread searchedFiles.firstOrNull()
27
- }
28
-
29
- return currentTask.get(5 , TimeUnit .SECONDS )
22
+ return FilenameIndex .getVirtualFilesByName(filename, ProjectScope .getContentScope(this )).firstOrNull()
30
23
}
31
24
32
25
fun VirtualFile.canBeAdded (): Boolean {
You can’t perform that action at this time.
0 commit comments