| Summary: | Generate the org.eclipse.gef.dot.internal.DotAttributes class | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Tamas Miklossy <miklossy> |
| Component: | GEF DOT | Assignee: | Alexander Nyßen <nyssen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matthias.wienand, nyssen |
| Version: | unspecified | ||
| Target Milestone: | 5.0.0 (Oxygen) M5 | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Tamas Miklossy
I refactored DotAttributes into an Xtend class that uses an @DotAttribute active annotation to generate the getters and setters. The active annotation is defined by a newly created org.eclipse.gef.dot.generator bundle (which is optionally required by org.eclipse.gef.dot, as its a compile time-dependency; the generated DotAttributes class does not provide the annotations). I further merged DotLanguageSupport into DotAttributes, so the API is now more concise (the duplicate code within the DotJavaValidator could be removed). There is still room for improvement. Within DotAttributes, validation and parsing could be split apart, and it is dubious whether the setters should implicitly validate (we could leave that to the client). Further, DotAttributes should offer a generic parse and serialize method for all attributes. Last, further parts of DotAttributes could be generated by introducing an active annotation on the class level (so the validators, parsers, and serializers, as well as the validate, parse, and serialize methods could be generated from the annotated fields). Since generation of DotAttributes is in-place since Oxygen M5, I resolve this ticket as fixed and set the target milestone accordingly. |