Community
Participate
Working Groups
From https://bugs.eclipse.org/bugs/show_bug.cgi?id=355347#c5: I would even recommand to consider replacing all setters in favor of using something like a builder pattern. The builder can hold some default values so even without specifing any additional properties you create a valid object: I have tried something like that: https://github.com/joergreichert/Permet/blob/master/org.eclipse.xtext.example.fowlerdsl.diagram/src/org/eclipse/xtext/example/fowlerdsl/diagram/features/add/AddStateFeature.java
(In reply to comment #0) > From https://bugs.eclipse.org/bugs/show_bug.cgi?id=355347#c5: > > I would even recommand to consider replacing all setters in favor of using > something like a builder pattern. The builder can hold some default values so > even without specifing any additional properties you create a valid object: > > I have tried something like that: > https://github.com/joergreichert/Permet/blob/master/org.eclipse.xtext.example.fowlerdsl.diagram/src/org/eclipse/xtext/example/fowlerdsl/diagram/features/add/AddStateFeature.java > It seems that you already have something like that. Would you be interested in > contributing? Sure, I append so two builders, I have so far. Take also a look to the Xspray project: https://code.google.com/a/eclipselabs.org/p/spray/ Beside the DSL and the generator, we are also developing some infrastructure to ease the use of the Graphiti framework. Some of the implementation might then contributed back to Graphiti. Joerg
Created attachment 202862 [details] Builder class for rectangles
Created attachment 202863 [details] Builder for text shapes