Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unwarranted use of VirtualFileManagerEx #1227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/org/ice1000/julia/lang/psi/julia-navigation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import com.intellij.openapi.application.ReadAction
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.fileEditor.FileDocumentManager
import com.intellij.openapi.vfs.LocalFileSystem
import com.intellij.openapi.vfs.ex.VirtualFileManagerEx
import com.intellij.openapi.vfs.VirtualFileManager
import com.intellij.psi.PsiDirectory
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiManager
Expand Down Expand Up @@ -45,7 +45,7 @@ class JuliaGotoDeclarationHandler : GotoDeclarationHandler {

fun arrayOfPsiElements(dir: PsiDirectory, text: String): Array<PsiElement>? {
val url = dir.virtualFile.url + File.separator + text
val vf = VirtualFileManagerEx.getInstance().findFileByUrl(url) ?: return null
val vf = VirtualFileManager.getInstance().findFileByUrl(url) ?: return null
val f = PsiManager.getInstance(project).findFile(vf) ?: return null
return arrayOf(f)
}
Expand Down Expand Up @@ -294,4 +294,4 @@ fun Int.toColor() = Color(
this shr 16 and 0xFF,
this shr 8 and 0xFF,
this and 0xFF
)
)