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

Plugin not working after update to 2022.01 #495

Closed
danieln-cx opened this issue Feb 3, 2022 · 9 comments
Closed

Plugin not working after update to 2022.01 #495

danieln-cx opened this issue Feb 3, 2022 · 9 comments
Assignees
Labels
Milestone

Comments

@danieln-cx
Copy link

danieln-cx commented Feb 3, 2022

As soon as you open IntelliJ you get the following exception.
IDE: IntelliJ IDEA Community Edition (2022.01 EAP)
Plugin: ANTLR v4 (1.17)

java.lang.IllegalStateException: You must not register toolwindow programmatically so early. Rework code or use ToolWindowManager.invokeLater
	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.getToolWindowPaneIfInitialized(ToolWindowManagerImpl.kt:464)
	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow(ToolWindowManagerImpl.kt:900)
	at com.jetbrains.rdserver.toolWindow.BackendServerToolWindowManager.registerToolWindow(BackendServerToolWindowManager.kt:87)
	at com.intellij.openapi.wm.ToolWindowManager.registerToolWindow(ToolWindowManager.kt:42)
	at org.antlr.intellij.plugin.ANTLRv4PluginController.createToolWindows(ANTLRv4PluginController.java:134)
	at org.antlr.intellij.plugin.ANTLRv4PluginController.projectOpened(ANTLRv4PluginController.java:120)
	at com.intellij.openapi.project.impl.ProjectManagerExImplKt$openProject$$inlined$executeInEdtWithProgress$1$1$lambda$1.invoke(ProjectManagerExImpl.kt:503)
	at com.intellij.openapi.project.impl.ProjectManagerExImplKt$openProject$$inlined$executeInEdtWithProgress$1$1$lambda$1.invoke(ProjectManagerExImpl.kt)
	at com.intellij.serviceContainer.ComponentManagerImpl.processInitializedComponents(ComponentManagerImpl.kt:1324)
	at com.intellij.openapi.project.impl.ProjectManagerExImplKt$openProject$$inlined$executeInEdtWithProgress$1$1.run(ProjectManagerExImpl.kt:611)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:607)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:681)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:629)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:606)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.project.impl.ProjectManagerExImplKt$openProject$$inlined$executeInEdtWithProgress$1.run(ProjectManagerExImpl.kt:460)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:215)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:197)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
	at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511)
	at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:96)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:875)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:740)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:433)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:801)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:432)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:598)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:430)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:478)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
@parrt
Copy link
Member

parrt commented Feb 19, 2022

I think I will have to wait until 2022.1 comes out before chasing down the bug because it might be in there code. I can't even figure out how to test against that as I don't know what the appropriate version number is in the plug-in development properties.

@ice1000
Copy link

ice1000 commented Mar 5, 2022

@parrt version number is 221.4906.8, and if you want to test against latest EAP, try removing the version property in the build.gradle file, and that will make the intellij plugin use the latest EAP snapshot

@ice1000
Copy link

ice1000 commented Mar 5, 2022

You basically want to remove this line:

version = ideaVersion

Then you may probably reproduce the bug

@bjansen bjansen added this to the 1.18 milestone Mar 6, 2022
@bjansen bjansen closed this as completed in 252ac62 Mar 6, 2022
@bjansen
Copy link
Collaborator

bjansen commented Mar 6, 2022

Here's a snapshot that should fix the issue:
antlr-intellij-plugin-v4-1.18-SNAPSHOT.zip

@ice1000
Copy link

ice1000 commented Mar 7, 2022

@bjansen thank you very much. 🙇🏼‍♀️

@parrt
Copy link
Member

parrt commented Mar 7, 2022

@ice1000 does it fix? That would be great.

@ice1000
Copy link

ice1000 commented Mar 8, 2022

Does!

@danieln-cx
Copy link
Author

Thank you guys!

@greenhull
Copy link

Thanks, the snapshot "https://github.com/antlr/intellij-plugin-v4/files/8192836/antlr-intellij-plugin-v4-1.18-SNAPSHOT.zip" installs and at first pass seems to work fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants