UML diagrams are not repeatable

Issue #36 closed
Marco Bresciani created an issue

Considering a generic package with unmodified classes, it sometimes happens that re-running Sketch.It!, the generated UML diagrams are different. Example before:

          class DeviceConfig {
              - id : String
              - excerpt : Integer
              - sequential : Integer
              - timeout : Integer
              + getMaxExcerpts()
              + setId()
              + setExcerpt()
              + setSequential()
              + setTimeout()
              + setType()
              + toString()
              + getId()
              + getExcerpt()
              + getSequential()
              + getTimeout()
              + getType()
          }

and after

          class DeviceConfig {
              - id : String
              - excerpt : Integer
              - sequential : Integer
              - timeout : Integer
              + getMaxExcerpts()
              + toString()
              + setId()
              + setExcerpt()
              + setSequential()
              + setTimeout()
              + setType()
              + getId()
              + getExcerpt()
              + getSequential()
              + getTimeout()
              + getType()
          }

The toString method moves from line 12 to line 7! But the source code is the same!

It’s not a problem per se, but the problem appears if the resulting PlantUML files are saved in the SCM together with the code: euven if the classes in a package are not modified, the resulting UML file has to be commited since it appears as modified.

Could sorting fields and methods be a possible solution?

Comments (3)

  1. Log in to comment