Class diagram: Crash with separators in attribute list and notes on attributes

+1 vote
asked May 18, 2016 in Bug by mkoepf (120 points)
Hi,

I run into problems whenever I want to combine separators like '..' in an attribute list with notes on individual attributes.

 

Without the separator, it works just fine:

@startuml

class A {
    attr : integer
    attr2 : float
}

note right of A::attr
an attribute
end note

@enduml

 

With the separator but without the note it works fine, as well:

 

@startuml

class A {
    attr : integer
    ..
    attr2 : float
}

@enduml

But with both note and separator together, it fails:

@startuml

class A {
    attr : integer
    ..
    attr2 : float
}

note right of A::attr
an attribute
end note

@enduml

 

I am using:

 

PlantUML version 8037 (Sun Mar 06 15:18:49 CET 2016)
(GPL source distribution)
OpenJDK Runtime Environment
OpenJDK 64-Bit Server VM
1.7.0_95-b00
Linux
Dot version: dot - graphviz version 2.38.0 (20140413.2041)
Installation seems OK. File generation OK

The generated error message is:

java.lang.UnsupportedOperationException: member=attr class net.sourceforge.plantuml.cucadiagram.BodyEnhanced
    at net.sourceforge.plantuml.graphic.AbstractTextBlock.getInnerPosition(AbstractTextBlock.java:41)
    at net.sourceforge.plantuml.svek.image.EntityImageClass.getInnerPosition(EntityImageClass.java:105)
    at net.sourceforge.plantuml.svek.image.EntityImageTips.drawU(EntityImageTips.java:131)
    at net.sourceforge.plantuml.svek.SvekResult.drawU(SvekResult.java:79)
    at net.sourceforge.plantuml.ugraphic.ImageBuilder.getFinalDimension(ImageBuilder.java:159)
    at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageInternal(ImageBuilder.java:128)
    at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageTOBEMOVED(ImageBuilder.java:123)
    at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFileInternal(CucaDiagramFileMakerSvek.java:128)
    at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFile(CucaDiagramFileMakerSvek.java:81)
    at net.sourceforge.plantuml.cucadiagram.CucaDiagram.exportDiagramInternal(CucaDiagram.java:318)
    at net.sourceforge.plantuml.classdiagram.ClassDiagram.exportDiagramInternal(ClassDiagram.java:205)
    at net.sourceforge.plantuml.UmlDiagram.exportDiagram(UmlDiagram.java:229)
    at net.sourceforge.plantuml.PSystemUtils.exportDiagramsCuca(PSystemUtils.java:206)
    at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:69)
    at net.sourceforge.plantuml.SourceFileReader.getGeneratedImages(SourceFileReader.java:210)
    at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:394)
    at net.sourceforge.plantuml.Run.processArgs(Run.java:316)
    at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:291)
    at net.sourceforge.plantuml.Run.main(Run.java:135)

1 Answer

0 votes
answered May 18, 2016 by plantuml (295,800 points)
selected May 18, 2016 by mkoepf
 
Best answer
Thanks for the report.

This should be fixed in last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

Tell us if it's not working for you!
commented May 18, 2016 by mkoepf (120 points)
Yes, indeed, with the latest beta it works. Thanks for the quick reply!
...