esteinberg / plantuml4idea

Intellij IDEA plugin for PlantUML
Apache License 2.0
633 stars 113 forks source link

注释中不允许出现字符串 "--" #301

Closed mostcool closed 3 years ago

mostcool commented 3 years ago

@startuml 'https://plantuml.com/class-diagram

abstract class AbstractList abstract AbstractCollection interface List interface Collection

List <|-- AbstractList Collection <|-- AbstractCollection

Collection <|- List AbstractCollection <|- AbstractList AbstractList <|-- ArrayList

class ArrayList { Object[] elementData size() }

enum TimeUnit { DAYS HOURS MINUTES }

@enduml

PlantUML version 1.2021.2(Sun Mar 07 19:10:27 CST 2021) (GPL source distribution) Java Runtime: OpenJDK Runtime Environment JVM: Dynamic Code Evolution 64-Bit Server VM Default Encoding: GBK Language: zh Country: CN -->

org.apache.batik.transcoder.TranscoderException: null Enclosed Exception: ParseError at [row,col]:[21,10] Message: 注释中不允许出现字符串 "--"。 at org.plantuml.idea.toolwindow.image.svg.batik.MySvgDocumentFactoryKt.createSvgDocument(MySvgDocumentFactory.kt:27) at org.plantuml.idea.toolwindow.image.svg.MyImageEditorImpl$MyScaledImageProvider.createImage(MyImageEditorImpl.java:252) at org.plantuml.idea.toolwindow.image.svg.MyImageEditorImpl$MyScaledImageProvider.apply(MyImageEditorImpl.java:231) at org.plantuml.idea.toolwindow.image.svg.MyImageEditorImpl$MyScaledImageProvider.apply(MyImageEditorImpl.java:210) at org.intellij.images.ui.ImageComponent$ImageDocumentImpl.lambda$setValue$2(ImageComponent.java:308) at org.intellij.images.ui.ImageComponent$ImageDocumentImpl.getValue(ImageComponent.java:295) at org.intellij.images.ui.ImageComponent$ImageDocumentImpl.getValue(ImageComponent.java:290) at org.plantuml.idea.toolwindow.image.svg.MyImageEditorUI$DocumentChangeListener.stateChanged(MyImageEditorUI.java:655) at org.intellij.images.ui.ImageComponent$ImageDocumentImpl.fireChangeEvent(ImageComponent.java:329) at org.intellij.images.ui.ImageComponent$ImageDocumentImpl.setValue(ImageComponent.java:312) at org.plantuml.idea.toolwindow.image.svg.MyImageEditorUI.setImageProvider(MyImageEditorUI.java:281) at org.plantuml.idea.toolwindow.image.svg.MyImageEditorImpl.setValue(MyImageEditorImpl.java:94) at org.plantuml.idea.toolwindow.image.svg.MyImageEditorImpl.(MyImageEditorImpl.java:88) at org.plantuml.idea.toolwindow.image.ImageContainerSvg.initEditor(ImageContainerSvg.java:147) at org.plantuml.idea.rendering.ImageItem.initImage(ImageItem.java:189) at org.plantuml.idea.rendering.RenderCommand.lambda$initImages$1(RenderCommand.java:102) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290) at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:408) at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:736) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:661) at org.plantuml.idea.rendering.RenderCommand.initImages(RenderCommand.java:100) at org.plantuml.idea.rendering.RenderCommand.run(RenderCommand.java:76) at org.plantuml.idea.rendering.LazyApplicationPoolExecutor$1.run(LazyApplicationPoolExecutor.java:130) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[21,10] Message: 注释中不允许出现字符串 "--"。 at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:652) at org.plantuml.idea.toolwindow.image.svg.batik.MySvgDocumentFactoryKt.processElementFragment(MySvgDocumentFactory.kt:103) at org.plantuml.idea.toolwindow.image.svg.batik.MySvgDocumentFactoryKt.buildDocument(MySvgDocumentFactory.kt:80) at org.plantuml.idea.toolwindow.image.svg.batik.MySvgDocumentFactoryKt.createSvgDocument(MySvgDocumentFactory.kt:25) ... 36 more

krasa commented 3 years ago

300 is more useful with the whole svg