diff --git a/src/main/java/com/cybrosis/catdea/toolWindow/CatdeaLogcatView.java b/src/main/java/com/cybrosis/catdea/toolWindow/CatdeaLogcatView.java index d1a7aae..3dc8f3e 100644 --- a/src/main/java/com/cybrosis/catdea/toolWindow/CatdeaLogcatView.java +++ b/src/main/java/com/cybrosis/catdea/toolWindow/CatdeaLogcatView.java @@ -24,6 +24,7 @@ import com.android.tools.idea.logcat.AndroidLogcatService; import com.android.tools.idea.logcat.AndroidLogcatView; import com.android.tools.idea.logcat.LogcatConsoleActionsPostProcessor; +import com.cybrosis.catdea.files.CatdeaFileType; import com.cybrosis.catdea.highlighting.syntax.CatdeaSyntaxHighlighter; import com.cybrosis.catdea.lang.CatdeaLanguage; import com.cybrosis.catdea.lang.psi.PsiCatdeaEntry; @@ -131,10 +132,10 @@ public void actionPerformed(@NotNull AnActionEvent e) { this.deviceContext = deviceContext; // Use PSI to support references and navigation to source code from log entry - final PsiFile dummy = PsiFileFactory.getInstance(project).createFileFromText(CatdeaLanguage.INSTANCE, ""); + final PsiFile dummy = PsiFileFactory.getInstance(project).createFileFromText("_dummy_", CatdeaFileType.INSTANCE, ""); psiFile = new CycledPsiFile(dummy); - final Document document = PsiDocumentManager.getInstance(project).getDocument(psiFile); + final Document document = dummy.getViewProvider().getDocument(); assert document != null; UndoUtil.disableUndoFor(document); diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 0b5f93a..a732145 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -1,7 +1,7 @@ com.cybrosis.catdea Catdea - 1.1.3 + 1.1.4 Cybrosis 1.1.4: Fixed issue#8: IllegalArgumentException in CycledPsiFile

1.1.3: Compatible with IntelliJ IDEA 2019.3

1.1.2: Fixed icons and minor refactoring

1.1.1: Fixed issue#4: NPE occurred in CatdeaServiceImpl.projectJdkChanged