While it is not in the official documentation, I found on the forum that it is possible to add notes to individual attributes. This is great and I use it a lot. I did find a problem with it.
In particular, this:
@startuml
note right of TestAttrributeNote::attribute1
This is a note that breaks.
end note
class String{
}
class TestAttrributeNote {
String attribute1
# attribute2 : String
}
@enduml
breaks.
If either both attributes are given a visibility modifier, or neither, it does work.
I traced the problem down to:
net.sourceforge.plantuml.MethodsOrFieldsArea:
private TextBlock getUBlock(final VisibilityModifier modifier, Url url) {
...
changing the definition of:
return new AbstractTextBlock() {
public void drawU(UGraphic ug) {}
@Override
public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) {
return null;
}
public Dimension2D calculateDimension(StringBounder stringBounder) {
return new Dimension2DDouble(1, 1);
}
};
(Bold code added). The problem goes away.
It only works with the long style notes though, and top or bottom don't work either.