psliwa / idea-composer-plugin

PhpStorm plugin that adds code completion in composer.json file
MIT License
334 stars 10 forks source link

A fatal error happens when opening a project without a composer.json #17

Closed stof closed 8 years ago

stof commented 9 years ago
Argument for @NotNull parameter 'startElement' of com/intellij/codeInspection/LocalQuickFixOnPsiElement.isAvailable must not be null
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'startElement' of com/intellij/codeInspection/LocalQuickFixOnPsiElement.isAvailable must not be null
    at com.intellij.codeInspection.LocalQuickFixOnPsiElement.isAvailable(LocalQuickFixOnPsiElement.java)
    at org.psliwa.idea.composerJson.intellij.codeAssist.QuickFixIntentionActionAdapter.isAvailable(QuickFixIntentionActionAdapter.scala:15)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:131)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.access$000(ShowIntentionsPass.java:70)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass$1.process(ShowIntentionsPass.java:90)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass$1.process(ShowIntentionsPass.java:87)
    at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl$5.process(DaemonCodeAnalyzerImpl.java:580)
    at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl$5.process(DaemonCodeAnalyzerImpl.java:574)
    at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerEx$1.process(DaemonCodeAnalyzerEx.java:59)
    at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerEx$1.process(DaemonCodeAnalyzerEx.java:53)
    at com.intellij.openapi.editor.impl.MarkupModelImpl.processRangeHighlightersOverlappingWith(MarkupModelImpl.java:265)
    at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerEx.processHighlights(DaemonCodeAnalyzerEx.java:53)
    at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl.processHighlightsNearOffset(DaemonCodeAnalyzerImpl.java:574)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getAvailableActions(ShowIntentionsPass.java:87)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:273)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:212)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:188)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:67)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:444)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1098)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:435)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:452)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:432)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask.exec(JobLauncherImpl.java:189)
    at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
    at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
    at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
    at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)
psliwa commented 9 years ago

Thanks for reporting an issue.

Does composer.json file exist in any directory in your project? Maybe there are some vendor library sources with composer.json file. If yes, can you show "require" or "require-dev" sections of this file(s)? What version of PhpStorm/Intellij and plugin do you use?

stof commented 9 years ago

There is no composer.json at all. I was opening https://github.com/symfony/symfony-docs/

I have PhpStorm 9.0.2 and the 1.0.8 version of the plugin.

sstok commented 8 years ago

Happened to me just know, I was editing the composer.json file

``` Argument for @NotNull parameter 'startElement' of com/intellij/codeInspection/LocalQuickFixOnPsiElement.isAvailable must not be null java.lang.IllegalArgumentException: Argument for @NotNull parameter 'startElement' of com/intellij/codeInspection/LocalQuickFixOnPsiElement.isAvailable must not be null at com.intellij.codeInspection.LocalQuickFixOnPsiElement.isAvailable(LocalQuickFixOnPsiElement.java) at org.psliwa.idea.composerJson.intellij.codeAssist.QuickFixIntentionActionAdapter.isAvailable(QuickFixIntentionActionAdapter.scala:15) at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:130) at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:84) at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl.a(DaemonCodeAnalyzerImpl.java:646) at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerEx.b(DaemonCodeAnalyzerEx.java:59) at com.intellij.openapi.editor.impl.MarkupModelImpl.processRangeHighlightersOverlappingWith(MarkupModelImpl.java:254) at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerEx.processHighlights(DaemonCodeAnalyzerEx.java:53) at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl.processHighlightsNearOffset(DaemonCodeAnalyzerImpl.java:642) at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getAvailableActions(ShowIntentionsPass.java:83) at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:276) at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:222) at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:198) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:434) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1026) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:427) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:426) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:402) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:154) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) java.lang.IllegalArgumentException: Argument for @NotNull parameter 'startElement' of com/intellij/codeInspection/LocalQuickFixOnPsiElement.isAvailable must not be null at com.intellij.codeInspection.LocalQuickFixOnPsiElement.isAvailable(LocalQuickFixOnPsiElement.java) at org.psliwa.idea.composerJson.intellij.codeAssist.QuickFixIntentionActionAdapter.isAvailable(QuickFixIntentionActionAdapter.scala:15) at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:130) at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:84) at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl.a(DaemonCodeAnalyzerImpl.java:646) at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerEx.b(DaemonCodeAnalyzerEx.java:59) at com.intellij.openapi.editor.impl.MarkupModelImpl.processRangeHighlightersOverlappingWith(MarkupModelImpl.java:254) at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerEx.processHighlights(DaemonCodeAnalyzerEx.java:53) at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl.processHighlightsNearOffset(DaemonCodeAnalyzerImpl.java:642) at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getAvailableActions(ShowIntentionsPass.java:83) at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:276) at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:222) at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:198) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:434) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1026) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:427) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:426) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:402) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:154) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) ```
psliwa commented 8 years ago

Thanks, I will investigate this asap.

psliwa commented 8 years ago

Fixed in 1.0.16 version.