antlr / intellij-plugin-v4

An IntelliJ plugin for ANTLR v4
https://plugins.jetbrains.com/plugin/7358-antlr-v4
BSD 3-Clause "New" or "Revised" License
462 stars 103 forks source link

Fixes #559: Bug closing non-active grammar file #574

Closed kjarrio closed 2 years ago

kjarrio commented 2 years ago

Signed-off-by: Kjartan Olason olasonk@gmail.com

@@ -1,5 +1,23 @@

parrt commented 2 years ago

Wow! Thanks, @kjarrio ! I'll check it out soon.

kjarrio commented 2 years ago

I'm unsure why the build failed, I tried to replicate it here with same parameters, but hope the latest commit will fix it.

parrt commented 2 years ago

Looks like there are still some issues with mocking.

parrt commented 2 years ago

Looks like:

/home/runner/work/intellij-plugin-v4/intellij-plugin-v4/src/test/java/org/antlr/intellij/plugin/editor/Issue559Test.java:51: error: package ToolWindowHeadlessManagerImpl does not exist
        return new ToolWindowHeadlessManagerImpl.MockToolWindow(getProject()) {
                                                ^
/home/runner/work/intellij-plugin-v4/intellij-plugin-v4/src/test/java/org/antlr/intellij/plugin/editor/Issue559Test.java:55: error: method does not override or implement a method from a supertype
            @Override
            ^
kjarrio commented 2 years ago

Just removed those, I am going to have a better look on how to trigger these errors on my local env

kjarrio commented 2 years ago

yeah, there is an issue with the MockToolWindow, it is probably only available in some different version of IDEA... will figure out a different way to test this

kjarrio commented 2 years ago

Apparently the MockToolWindow isn't available but I created one

parrt commented 2 years ago

thanks, @kjarrio !

parrt commented 1 year ago

Unfortunately, I have to back this out. The initComponents() function somehow freezes entire IDE with 2022.3 release. :( sorry!