beansoft / iscratch-support

Supports for the Notes IDEA plugin
Other
6 stars 0 forks source link

Exception when trying to remove the evernote toolwindow #11

Closed tocic closed 2 years ago

tocic commented 2 years ago

What happened

Evernote developer token is not specified in settings cause I intentionally don't use Evernote.

  1. open new project
  2. right-click the evernote toolwindow to remove it from sidebar (btw is it possible to hide the toolwindow automatically if it's not configured?)
  3. get the following exception plus the notification "Evernote token not configured for Notes plugin to access your contents" (btw is it possible to not trigger the notification if it's not configured?)

Version information

CLion 2022.1.2 • Notes plugin com.github.beansoft.iscratch 2022.2.1

Exception

null

java.lang.AssertionError: ToggleToolbarAction#update (com.intellij.ide.actions.ToggleToolbarAction) requests write-action. An action must not request write-action during actions update. See CustomComponentAction.createCustomComponent javadoc, if caused by a custom component.
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.cancelPromise(ActionUpdater.java:701)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$tryRunReadActionAndCancelBeforeWrite$16(ActionUpdater.java:369)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.cancelActionsToBeCancelledBeforeWrite(ProgressIndicatorUtils.java:138)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils$2.beforeWriteActionStart(ProgressIndicatorUtils.java:130)
    at jdk.internal.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:120)
    at com.intellij.util.EventDispatcher.lambda$createMulticaster$1(EventDispatcher.java:85)
    at com.sun.proxy.$Proxy86.beforeWriteActionStart(Unknown Source)
    at com.intellij.openapi.application.impl.ApplicationImpl.fireBeforeWriteActionStart(ApplicationImpl.java:1386)
    at com.intellij.openapi.application.impl.ApplicationImpl.startWrite(ApplicationImpl.java:1201)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:1001)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1029)
    at com.intellij.openapi.application.WriteAction.run(WriteAction.java:85)
    at com.intellij.openapi.editor.impl.EditorFactoryImpl.releaseEditor(EditorFactoryImpl.java:222)
    at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.disposeEditor(TextEditorComponent.java:132)
    at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.dispose(TextEditorComponent.java:103)
    at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.dispose(PsiAwareTextEditorImpl.java:136)
    at com.intellij.openapi.util.ObjectTree.runWithTrace(ObjectTree.java:139)
    at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:169)
    at com.intellij.openapi.util.Disposer.dispose(Disposer.java:219)
    at com.intellij.openapi.util.Disposer.dispose(Disposer.java:207)
    at com.github.beansoft.iscratch.panel.EmbedFileEditor.disposeFileEditor(EmbedFileEditor.java:634)
    at com.github.beansoft.iscratch.panel.EmbedFileEditor.releaseEditorNow(EmbedFileEditor.java:756)
    at com.github.beansoft.iscratch.panel.EmbedFileEditor.releaseEditorNow(EmbedFileEditor.java:751)
    at com.github.beansoft.iscratch.ui.CodeViewComponent.showHint(CodeViewComponent.java:331)
    at com.github.beansoft.iscratch.ui.EvernoteCodePane.createBottom(EvernoteCodePane.java:1180)
    at com.github.beansoft.iscratch.ui.EvernoteCodePane.<init>(EvernoteCodePane.java:199)
    at com.github.beansoft.iscratch.ui.EvernoteToolWindowFactory.createToolWindowContent(EvernoteToolWindowFactory.java:52)
    at com.intellij.openapi.wm.impl.ToolWindowImpl.createContentIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:529)
    at com.intellij.openapi.wm.impl.ToolWindowImpl.getContentManager(ToolWindowImpl.kt:404)
    at com.intellij.ide.actions.ToggleToolbarAction.lambda$createToolWindowAction$0(ToggleToolbarAction.java:72)
    at com.intellij.ide.actions.ToggleToolbarAction.update(ToggleToolbarAction.java:148)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:131)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:145)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:645)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$4(ActionUpdater.java:126)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$6(ActionUpdater.java:210)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:58)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:189)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:176)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:58)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$7(ActionUpdater.java:208)
    at com.intellij.openapi.actionSystem.impl.ActionUpdateEdtExecutor.lambda$computeOnEdt$0(ActionUpdateEdtExecutor.java:45)
    at com.intellij.openapi.actionSystem.impl.Utils.lambda$expandActionGroupFastTrack$5(Utils.java:270)
    at com.intellij.openapi.actionSystem.impl.Utils.runLoopAndWaitForFuture(Utils.java:595)
    at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroupFastTrack(Utils.java:268)
    at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroupImpl(Utils.java:180)
    at com.intellij.openapi.actionSystem.impl.Utils.lambda$fillMenu$6(Utils.java:294)
    at com.intellij.openapi.actionSystem.impl.Utils.computeWithRetries(Utils.java:633)
    at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:293)
    at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.lambda$updateChildren$1(ActionPopupMenuImpl.java:171)
    at com.intellij.util.TimeoutUtil.run(TimeoutUtil.java:59)
    at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.updateChildren(ActionPopupMenuImpl.java:170)
    at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.show(ActionPopupMenuImpl.java:129)
    at com.intellij.toolWindow.StripeButton.showPopup(StripeButton.kt:254)
    at com.intellij.toolWindow.StripeButton.access$showPopup(StripeButton.kt:35)
    at com.intellij.toolWindow.StripeButton$2.invokePopup(StripeButton.kt:65)
    at com.intellij.ui.PopupHandler.mousePressed(PopupHandler.java:47)
    at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:288)
    at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6651)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
    at com.intellij.toolWindow.StripeButton.processMouseEvent(StripeButton.kt:229)
    at java.desktop/java.awt.Component.processEvent(Component.java:6419)
    at java.desktop/java.awt.Container.processEvent(Container.java:2263)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4544)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2793)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
    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.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
    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:748)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
    at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:820)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:743)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:119)
    at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
beansoft commented 2 years ago

Got it, I'll take a look at and disable the token notification.

tocic commented 2 years ago

Can't reproduce the error with CL-222.3345.126 and Notes 2022.2.8, so I think it's resolved now. Also thanks for disabling the token notification.