I'm migrating some PlantUML diagrams from Eclipse to Idea, and I'm receiving the below exception when I paste them in. What seems to be triggering it is the leftover bits from comment blocks in Eclipse since they were in class header comments. So, for example, if I have a sequence diagram that looks like this:
@startuml
Alice -> Bob: Request
Alice <-- Bob: Reply
@enduml
I'd be pasting it in as:
@startuml
Alice -> Bob: Request
Alice <-- Bob: Reply
@enduml
And while I'm removing the " * " portions at the beginning of the line, I get an IndexOutOfBoundsException every time the diagram is updated. Once the last of those leftover comment bits are removed, I no longer see this issue.
Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at java.util.Collections$UnmodifiableList.get(Collections.java:1152)
at java.util.Collections$UnmodifiableList.get(Collections.java:1152)
at net.sourceforge.plantuml.syntax.SyntaxChecker.checkSyntax(Unknown Source)
at org.plantuml.idea.lang.annotator.PlantUmlExternalAnnotator.checkSyntax(PlantUmlExternalAnnotator.java:89)
at org.plantuml.idea.lang.annotator.PlantUmlExternalAnnotator.annotateSyntaxErrors(PlantUmlExternalAnnotator.java:76)
at org.plantuml.idea.lang.annotator.PlantUmlExternalAnnotator.doAnnotate(PlantUmlExternalAnnotator.java:51)
at org.plantuml.idea.lang.annotator.PlantUmlExternalAnnotator.doAnnotate(PlantUmlExternalAnnotator.java:27)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass.c(ExternalToolPass.java:186)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$400(ExternalToolPass.java:43)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:122)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:298)
at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:295)
at com.intellij.util.concurrency.QueueProcessor$2$1.run(QueueProcessor.java:110)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:107)
at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:104)
at com.intellij.util.concurrency.QueueProcessor$3$1.run(QueueProcessor.java:215)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.concurrency.QueueProcessor$3.run(QueueProcessor.java:212)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:406)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
I'm migrating some PlantUML diagrams from Eclipse to Idea, and I'm receiving the below exception when I paste them in. What seems to be triggering it is the leftover bits from comment blocks in Eclipse since they were in class header comments. So, for example, if I have a sequence diagram that looks like this:
@startuml Alice -> Bob: Request Alice <-- Bob: Reply @enduml
I'd be pasting it in as:
And while I'm removing the " * " portions at the beginning of the line, I get an IndexOutOfBoundsException every time the diagram is updated. Once the last of those leftover comment bits are removed, I no longer see this issue.