File tree Expand file tree Collapse file tree
src/main/kotlin/ai/devchat/idea Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import com.intellij.openapi.actionSystem.ActionManager
1010import com.intellij.openapi.actionSystem.ActionPlaces
1111import com.intellij.openapi.actionSystem.ex.ActionUtil
1212import com.intellij.openapi.editor.Editor
13+ import com.intellij.openapi.fileEditor.FileDocumentManager
1314import com.intellij.openapi.roots.ProjectFileIndex
1415import com.intellij.openapi.util.IconLoader
1516import com.intellij.openapi.util.TextRange
@@ -54,7 +55,7 @@ class GenTestsCodeVisionProvider : CodeVisionProviderBase() {
5455 mapOf (
5556 " command" to " genUnitTests" ,
5657 " message" to " /unit_tests " + listOf (
57- editor.virtualFile .path,
58+ FileDocumentManager .getInstance().getFile( editor.document) !! .path,
5859 (element as ? PsiNamedElement )?.name,
5960 editor.document.getLineNumber(element.startOffset),
6061 editor.document.getLineNumber(element.endOffset),
You can’t perform that action at this time.
0 commit comments