Argument for @NotNull parameter 'action'
Closed this issue · 2 comments
dubreuia commented
Hi there,
I use Build actions feature to fix stylelint errors and it works great. But I got 1 issue. When I open my project in PhpStorm and save my changes I got error:
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'action' of com/intellij/openapi/actionSystem/AnActionEvent.createFromAnAction must not be null
at com.intellij.openapi.actionSystem.AnActionEvent.$$$reportNull$$$0(AnActionEvent.java)
at com.intellij.openapi.actionSystem.AnActionEvent.createFromAnAction(AnActionEvent.java)
at com.dubreuia.processors.BuildProcessor.lambda$static$4(BuildProcessor.java:84)
at com.dubreuia.processors.SaveReadCommand.execute(SaveReadCommand.java:25)
at com.dubreuia.core.component.Engine.lambda$processPsiFiles$5(Engine.java:81)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:442)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at com.dubreuia.core.component.Engine.processPsiFiles(Engine.java:82)
at com.dubreuia.core.component.Engine.processPsiFilesIfNecessary(Engine.java:65)
at com.dubreuia.core.component.SaveActionManager.guardedProcessPsiFiles(SaveActionManager.java:144)
at com.dubreuia.core.component.SaveActionManager.lambda$beforeDocumentsSaving$3(SaveActionManager.java:128)
at java.base/java.util.HashMap.forEach(HashMap.java:1336)
at com.dubreuia.core.component.SaveActionManager.beforeDocumentsSaving(SaveActionManager.java:127)
at com.dubreuia.core.component.SaveActionManager.beforeAllDocumentsSaving(SaveActionManager.java:112)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
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.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:513)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:142)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:438)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:398)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:388)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:372)
at com.intellij.util.messages.impl.MessageBusImpl.lambda$createTopicHandler$1(MessageBusImpl.java:241)
at com.sun.proxy.$Proxy23.beforeAllDocumentsSaving(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
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.openapi.fileEditor.impl.FileDocumentManagerImpl.multiCast(FileDocumentManagerImpl.java:162)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$new$0(FileDocumentManagerImpl.java:125)
at com.sun.proxy.$Proxy23.beforeAllDocumentsSaving(Unknown Source)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveAllDocuments(FileDocumentManagerImpl.java:311)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveAllDocuments(FileDocumentManagerImpl.java:301)
at com.intellij.ide.actions.SaveAllAction.actionPerformed(SaveAllAction.kt:20)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:298)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:315)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:604)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:657)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:193)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:656)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:517)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:472)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:221)
at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:830)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:775)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
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)
And code is not fixed. So every time I have to go to Settings -> Tools -> External Tools and re-apply Stylelint tool. After that there is no errors and stylelint works.
Can you please check if it's 'Save Actions' issue? Thanks
OS: Ubuntu 18.04.3
PhpStorm: 2019.3
Save Actions: 1.9.0+2019.3
Quick lists: Force refresh -> Stylelint
Save Actions config:
Originally posted by @OlgaLevanova in #118 (comment)
dubreuia commented
Bump