Community
Participate
Working Groups
Up to now, GEF4 DOT only supports a subset of the Dot defined edge styles specified in http://www.graphviz.org/doc/info/attrs.html#k:style, namely 'solid', 'dashed' 'dotted', as well as support for 'dashdot' and 'dashdotdot', which do not seem to be valid Dot styles. We should ensure all specified Dot styles are supported by GEF4 DOT.UI. Fabian, could you give a hint where the additional 'dashdot' and 'dashdotdot' are taken from?
(In reply to Alexander Nyßen from comment #0) > Fabian, could you give a hint where the additional 'dashdot' and > 'dashdotdot' are taken from? These were line styles supported by the original Zest renderer that I wanted to make available via DOT.
Ok, I see. While I think its fine to have this kind of extended support in the DOT Graph viewer, IMHO we should somehow point out its not Graphviz-standard. An Xtext validation rule with severity INFO or WARNING could be the right means to point that out.
I'd also be fine with removing these styles and focussing on standard DOT support instead.
I implemented the following changes (pushed them to origin/neon): - Ensured DotProperties list all valid edge styles supported by Dot, i.e. 'dashed', 'dotted', 'solid', 'invis', 'bold', and 'tapered'. Removed Zest-related properites 'dashdot' and 'dashdotdot', which are not Dot-supported. - Implemented a validation rule to check that only valid edge styles are used. - Implemented quickfixes to turn invalid edge style values into valid ones (this required binding of a specific value converter service). - Implemented a proposal provider for edge styles, so that valid Dot style values are available via content assist. What remains to be done is add support for the newly defined values within DotGraphView and DotToZestGraphConverter. Further, DotToZestGraphConverter should be enhanced to provide some issue reporting mechanism (in case unsupported values are processed).
I further enhanced validation, proposal provider, and quick-fix provider as follows: - Ensured that empty style "" is accepted as well in validation. - Ensured that proposal provider and quickfix use quoted string where necessary.
- Removed the predefined zest edge style attributes, as these can already be set via css. - Refactored DotToZestGraphConverter to specify css styles instead.
What is still missing here is support for the following styles within DOT Graph view: - invis - tapered Furthermore, the content assist for styles within the DOT editor does not provide any proposals in case no style value is already given (e.g. for "[style=]"). We should enhance the proposal provider accordingly.
To support tapered style, we would not to enhance EdgePart (Zest.FX) as well as Connection (FX), so that the curve node of a connection can be replaced with a custom one (similar to the shape in NodePart). In order to achieve this, certain responsibilities of the Connection would have to be placed into the IConnectionInterpolator (updating geometry, clipping decorations).
I pushed the following changes to origin/master: - Added observable collections and properties to obtain the list of points and anchors of a connection. - Made the index-anchor key conversion more robust by computing the mapping through the sorted anchor keys (and no longer provide them statically). With the observable points property in place, we can now change all places where listeners are attached to the geometry of the curve node, to listen to changes of the point list instead. After this is performed, we can generalize the curve node from being an IGeometryNode to a Node (while the abstract interpolator will only be able to work with an IGeometryNode). Then we can make the curve node exchangeable.
I will resolve this as fixed in 5.3.1 (2020-09), since most of the functionality already have been implemented. Further improvements should come in separate Bugzilla tickets.