Community
Participate
Working Groups
While general support for DOT attributes is covered in bug #461506, specific parsers for EscString and LblString (including HTML-labels as needed by bug #321775) is not yet supported. We should introduce respective parsers and serializers to DotLanguageSupport and use them within DotAttributes.
I implemented a custom grammar for HTML-like labels as well as validation checks for generating warnings when invalid tags or attributes (i.e. not supported by Graphviz) are used. We still need to define a grammar for EscString and define a top level datatype LblString that can represent either EscString or HtmlLabel. Then, we can delegate to either parser/serializer depending on the context ("<...>" vs. '"..."').
Pushed the following changes: - Ensure construction of EscString for empty strings. - Allow parsing of HTML tags where the opening tag does not match the closing tag, but report errors for such tags. - Add test cases for empty EscString, deeply nested HTML tags, and case insensitive matching of opening and closing tags. - Enhance validation messages for HtmlLabel.
I adapted the DOT Html like labels sub-grammar to be able to parse the following inputs correctly: <BR ALIGN="LEFT"/> (Get rid of the ambiguous grammar elements by excluding the " symbol from the TEXT terminal rule). <FONT POINT-SIZE="24.0">line3</FONT> (allow das in the html attribute names). test cases based on the sample graphs found on the official Graphviz website: http://www.graphviz.org/doc/info/shapes.html
I pushed the following changes to origin/master: [508830] Improve DOT Graph View visualization of edge EscString labels. - Improve the Dot2ZestAttributesConverter to handle the '\n' escaped sequences contained by the 'label', 'xlabel', 'headlabel' and 'taillabel' edge attribute values. - Implement corresponding Dot2ZestEdgeAttributesConversionTests test cases.
As arisen from bug #534707, Tamás and I have decided to implement \E, \N, \G, \H, \T, \L replacement support in Dot2ZestAttributesConverter at this point only. There has been discussion, if this replacement could be implemented on a deeper level, e.g. by adding to the DotAttributes API/generation and/or implementing this in the ID class. I had provided an experimental version on SHA 18c18da which I will, for future reference, attach as a patch. We should discuss this option further and decide whether we should (re)move changes that are to be made in Dot2ZestAttributesConverter as part of resolving bug #534707 at a later point.
Created attachment 274975 [details] For reference only! Patch as described in comment #5
I pushed the following changes to origin/master: [508830] Ensure DOT Graph View properly handles '\n' in node labels. - Modify the Dot2ZestAttributesConverter to decode the line breaks in node labels properly. Example: graph {1[label="a\nb"]} - Implement corresponding Dot2ZestGraphCopierTests and Dot2ZestNodeAttributesConversionTests test cases.