AngularJS Plugin for IntelliJ 13.1.3: Enter Key issue
Hi All,
I am using IntelliJ Ultimate 13.1.3 (our organization was nice enough to purchase license for the dev team ).
When I installed the AngularJS Plugin (http://plugins.jetbrains.com/plugin/6971), I started seeing issues with the ENTER key.
Specifically, I have a simple hello.jsp that uses AngularJS (attached)
If I place my cursor almost anywhere on the page and hit the ENTER key (even after I navigate around via arrow keys), when I hit ENTER, the cursor jumps to the first Angular-related warning.
For example, I could place my cursor on line 31, move around left and right with arrow keys, then hit ENTER and suddenly my cursor places a line break between lines 73 and 74.
I have tried the following:
- Invalidate Caches and Restart
- Activate/deactive/reactive AngularJS plugin
- Went into Settings-> JavaScript-> Libraries and ensured Angular is there and is enabled (I created this automatically via IntelliJ by letting it pull down from Google CDN/create the JavaScript library.
If I disable the AngularJS Plugin, the issue with the ENTER key goes away.
I've attached my hello.jsp. It can be dropped into IntelliJ 13.x without any other dependencies.
Questions:
1. Has anyone else encountered this? It seems to be just an issue with JSPs oddly enough, if I copy/paste the code into an HTML file the problem goes away?
2. Does anyone know of a workaround? Will I need to wait for a fix to come out for the AngularJS Plugin?
Thanks,
Philip
Attachment(s):
hello.jsp.zip
请先登录再写评论。
Please attach also your idea.log (Help | Show log in ...)
Hi Dennis,
Thank you for your response.
I went in and tried again and saw that there is an exception that is logged to idea.log when the Enter key issue occurs.
Please see attached idea.log file.
Thanks,
Philip
Attachment(s):
idea.log.zip
Hi Dennis,
One more note: All you need to do to recreate the issue (I tried doing it from scratch):
1. Open IntelliJ 13.1.3 Ultimate Edition
2. New Project -> Java
3. Check the "Web Application" box
4. Drop in the hello.jsp
5. Enable Angular via Settings->JavaScript->Libraries and check "angular" as enabled
It only occurs on JSPs. I tried creating an HTML in the same IntelliJ project and did not see this issue.
Thanks,
Philip
I am experiencing same issues, same setup (angular and JSP). Cursor goes all over the places and sometimes formatting of angular markup breaks...
2014-06-01 13:37:11,277 [ 81007] ERROR - ntellij.openapi.util.TextRange - IntelliJ IDEA 13.1.3 Build #IU-135.909
2014-06-01 13:37:11,278 [ 81008] ERROR - ntellij.openapi.util.TextRange - JDK: 1.7.0_40
2014-06-01 13:37:11,278 [ 81008] ERROR - ntellij.openapi.util.TextRange - VM: Java HotSpot(TM) Server VM
2014-06-01 13:37:11,278 [ 81008] ERROR - ntellij.openapi.util.TextRange - Vendor: Oracle Corporation
2014-06-01 13:37:11,278 [ 81008] ERROR - ntellij.openapi.util.TextRange - OS: Linux
2014-06-01 13:37:11,278 [ 81008] ERROR - ntellij.openapi.util.TextRange - Last Action: $Undo
2014-06-01 13:37:11,279 [ 81009] ERROR - ntellij.openapi.util.TextRange - Invalid range specified: (5543,-1);
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:113)
at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:199)
at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:194)
at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:190)
at com.intellij.openapi.util.ProperTextRange.<init>(ProperTextRange.java:26)
at com.intellij.psi.impl.source.tree.injected.ShredImpl.getRangeInsideHost(ShredImpl.java:71)
at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil$2.visit(InjectedLanguageUtil.java:311)
at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.enumerate(InjectedLanguageUtil.java:133)
at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.a(InjectedLanguageUtil.java:306)
at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.a(InjectedLanguageUtil.java:288)
at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.findInjectedElementNoCommit(InjectedLanguageUtil.java:269)
at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.findInjectedPsiNoCommit(InjectedLanguageUtil.java:176)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseBetweenHostAndInjected(ShowIntentionActionsHandler.java:129)
at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:272)
at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.b(ShowIntentionsPass.java:212)
at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:186)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:380)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:371)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:368)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:344)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask.exec(JobLauncherImpl.java:193)
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)
2014-06-01 13:37:11,280 [ 81010] ERROR - ntellij.openapi.util.TextRange - IntelliJ IDEA 13.1.3 Build #IU-135.909
2014-06-01 13:37:11,280 [ 81010] ERROR - ntellij.openapi.util.TextRange - JDK: 1.7.0_40
2014-06-01 13:37:11,280 [ 81010] ERROR - ntellij.openapi.util.TextRange - VM: Java HotSpot(TM) Server VM
2014-06-01 13:37:11,280 [ 81010] ERROR - ntellij.openapi.util.TextRange - Vendor: Oracle Corporation
2014-06-01 13:37:11,280 [ 81010] ERROR - ntellij.openapi.util.TextRange - OS: Linux
one more exception:
2014-06-01 13:40:52,090 [ 301820] ERROR - aemon.impl.PassExecutorService - IntelliJ IDEA 13.1.3 Build #IU-135.909
2014-06-01 13:40:52,090 [ 301820] ERROR - aemon.impl.PassExecutorService - JDK: 1.7.0_40
2014-06-01 13:40:52,090 [ 301820] ERROR - aemon.impl.PassExecutorService - VM: Java HotSpot(TM) Server VM
2014-06-01 13:40:52,090 [ 301820] ERROR - aemon.impl.PassExecutorService - Vendor: Oracle Corporation
2014-06-01 13:40:52,090 [ 301820] ERROR - aemon.impl.PassExecutorService - OS: Linux
2014-06-01 13:40:52,090 [ 301820] ERROR - aemon.impl.PassExecutorService - Last Action: CheckinProject
2014-06-01 13:40:52,091 [ 301821] ERROR - aemon.impl.PassExecutorService - null
java.lang.NullPointerException
at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.processParametersForUsedArgument(JSResolveUtil.java:1500)
at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.findNonMirrorParameterForUsedArgument(JSResolveUtil.java:1569)
at com.intellij.lang.javascript.psi.ExpectedTypeEvaluator.visitJSArgumentList(ExpectedTypeEvaluator.java:56)
at com.intellij.lang.javascript.psi.impl.JSArgumentListImpl.accept(JSArgumentListImpl.java:53)
at com.intellij.lang.javascript.psi.ExpectedTypeEvaluator.findExpectedType(ExpectedTypeEvaluator.java:38)
at com.intellij.lang.javascript.dialects.JSDialectSpecificHandlersFactory.findExpectedType(JSDialectSpecificHandlersFactory.java:55)
at com.intellij.lang.javascript.psi.resolve.JSPropertyNameResolver.doResolve(JSPropertyNameResolver.java:32)
at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.resolve(JSResolveUtil.java:2679)
at com.intellij.lang.javascript.psi.impl.JSPropertyNameReference.multiResolve(JSPropertyNameReference.java:52)
at com.intellij.lang.javascript.psi.impl.JSPropertyNameReference.resolve(JSPropertyNameReference.java:41)
at com.intellij.codeInsight.intention.AddAnnotationPsiFix.getContainer(AddAnnotationPsiFix.java:70)
at com.intellij.codeInsight.intention.impl.AddAnnotationIntention.isAvailable(AddAnnotationIntention.java:50)
at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.isAvailable(IntentionActionWrapper.java:56)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:113)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.availableFor(ShowIntentionActionsHandler.java:104)
at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass$3.process(ShowIntentionsPass.java:276)
at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass$3.process(ShowIntentionsPass.java:273)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseBetweenHostAndInjected(ShowIntentionActionsHandler.java:132)
at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:272)
at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.b(ShowIntentionsPass.java:212)
at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:186)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:380)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:371)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:368)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:344)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask.exec(JobLauncherImpl.java:193)
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)
Thanks, M.J. and Dennis.
Just a FYI, I did log this as a bug: http://youtrack.jetbrains.com/issue/WEB-12365
Thanks,
Philip
Thanks for the report, problem is now fixed and fix will be available as soon as it passes code review.