kontext-e / autofillingcallarguments Goto Github PK
View Code? Open in Web Editor NEWThis IntelliJ IDEA plugin guesses the call parameters by the callee parameter names.
License: Apache License 2.0
This IntelliJ IDEA plugin guesses the call parameters by the callee parameter names.
License: Apache License 2.0
java.lang.NullPointerException
at de.kontext_e.idea.plugins.autofill.AutoFillCallArguments.invoke(AutoFillCallArguments.java:27)
at com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.invoke(PsiElementBaseIntentionAction.java:41)
at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.invoke(IntentionActionWrapper.java:65)
at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.invoke(IntentionActionWithTextCaching.java:184)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$invokeIntention$4(ShowIntentionActionsHandler.java:251)
at com.intellij.openapi.application.WriteAction.run(WriteAction.java:102)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.invokeIntention(ShowIntentionActionsHandler.java:251)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$chooseActionAndInvoke$3(ShowIntentionActionsHandler.java:227)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:177)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:167)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:153)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseActionAndInvoke(ShowIntentionActionsHandler.java:226)
at com.intellij.codeInsight.intention.impl.IntentionListStep.lambda$applyAction$3(IntentionListStep.java:117)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
at com.intellij.ui.popup.AbstractPopup.lambda$dispose$16(AbstractPopup.java:1464)
at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:2254)
at com.intellij.ide.IdeEventQueue.ifFocusEventsInTheQueue(IdeEventQueue.java:188)
at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.java:140)
at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:178)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.doWhenFocusSettlesDown(IdeFocusManagerImpl.java:36)
at com.intellij.ui.popup.AbstractPopup.dispose(AbstractPopup.java:1460)
at com.intellij.ui.popup.WizardPopup.dispose(WizardPopup.java:158)
at com.intellij.ui.popup.list.ListPopupImpl.dispose(ListPopupImpl.java:326)
at com.intellij.openapi.util.ObjectNode.lambda$execute$0(ObjectNode.java:111)
at com.intellij.openapi.util.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:193)
at com.intellij.openapi.util.ObjectNode.execute(ObjectNode.java:71)
at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:141)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:130)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:120)
at com.intellij.ui.popup.WizardPopup.disposeAllParents(WizardPopup.java:261)
at com.intellij.ui.popup.list.ListPopupImpl.handleNextStep(ListPopupImpl.java:461)
at com.intellij.ui.popup.list.ListPopupImpl._handleSelect(ListPopupImpl.java:415)
at com.intellij.ui.popup.list.ListPopupImpl.handleSelect(ListPopupImpl.java:356)
at com.intellij.ui.popup.list.ListPopupImpl$1.actionPerformed(ListPopupImpl.java:269)
at com.intellij.ui.popup.WizardPopup.proceedKeyEvent(WizardPopup.java:376)
at com.intellij.ui.popup.WizardPopup.dispatch(WizardPopup.java:356)
at com.intellij.ui.popup.PopupDispatcher.dispatchKeyEvent(PopupDispatcher.java:112)
at com.intellij.ui.popup.PopupDispatcher.dispatch(PopupDispatcher.java:148)
at com.intellij.ide.IdePopupManager.dispatch(IdePopupManager.java:93)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:808)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:451)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:802)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:505)
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)
Hi,
Its a very nice plugin, and was working flawless in 2016.x version. But started failing in idea-2017.x version with following error.
null java.lang.NullPointerException at de.kontext_e.idea.plugins.autofill.AutoFillCallArguments.invoke(AutoFillCallArguments.java:27) at com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.invoke(PsiElementBaseIntentionAction.java:42) at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.invoke(IntentionActionWrapper.java:65) at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:196) at com.intellij.openapi.application.WriteAction.run(WriteAction.java:91) at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:198) at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:186) at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:86) at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:151) at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.b(ShowIntentionActionsHandler.java:185) at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:149) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:109) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85) at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseActionAndInvoke(ShowIntentionActionsHandler.java:184) at com.intellij.codeInsight.intention.impl.IntentionListStep.c(IntentionListStep.java:273) at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:193) at com.intellij.ui.popup.AbstractPopup.a(AbstractPopup.java:1396) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:732) at com.intellij.ide.IdeEventQueue.k(IdeEventQueue.java:827) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:655) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
And intellij version
IntelliJ IDEA 2017.1.2
Build #IU-171.4249.39, built on April 25, 2017
JRE: 1.8.0_112-release-736-b16 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1
null
java.lang.NullPointerException
at de.kontext_e.idea.plugins.autofill.AutoFillCallArguments.invoke(AutoFillCallArguments.java:27)
at com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.invoke(PsiElementBaseIntentionAction.java:42)
at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.invoke(IntentionActionWrapper.java:66)
at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.invoke(IntentionActionWithTextCaching.java:182)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$invokeIntention$3(ShowIntentionActionsHandler.java:205)
at com.intellij.openapi.application.WriteAction.run(WriteAction.java:91)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.invokeIntention(ShowIntentionActionsHandler.java:207)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$null$1(ShowIntentionActionsHandler.java:195)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:86)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:151)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$chooseActionAndInvoke$2(ShowIntentionActionsHandler.java:194)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:149)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:109)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseActionAndInvoke(ShowIntentionActionsHandler.java:193)
at com.intellij.codeInsight.intention.impl.IntentionListStep.lambda$applyAction$1(IntentionListStep.java:282)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:193)
at com.intellij.ui.popup.AbstractPopup.lambda$null$8(AbstractPopup.java:1428)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:821)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:649)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
i suggest the caret move the first parameter。
After updating to IntelliJ 2023.3.2 the plugin no longer works. After selecting "Auto fill call parameter" nothing happens. No errors are logged.
It looks like the API has changed. Previously context.getItemsToShow() retuned CandidateInfo, now it returns MethodParameterInfoHandler.CandidateWithPresentation which is a private class. Also, JetBrains added a new function to get the CandidateInfo.
A new collector would look like this now:
return DumbService.getInstance(project).computeWithAlternativeResolveEnabled(
() -> getParameterInfoHandlers(project, file, language).stream()
.map(handler -> handler.findElementForParameterInfo(context))
.filter(Objects::nonNull)
.flatMap(element -> Arrays.stream(context.getItemsToShow()))
.map(MethodParameterInfoHandler::tryGetMethodFromCandidate)
.filter(Objects::nonNull)
.filter(PsiMethod::hasParameters)
.toList());
I haven't yet tested it with all possible method-calls, there maybe some more changes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.