Bug 534707 - DOT Graph View: Implement correct visualization-handling of name-replacing escape sequences (i.e. \E, \N, \G, \L, \H, \T) in node and edge escString attributes
Summary: DOT Graph View: Implement correct visualization-handling of name-replacing es...
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF DOT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 minor (vote)
Target Milestone: 5.0.200 (2018-09) M1   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-15 11:00 EDT by Zoey Gerrit Prigge CLA
Modified: 2018-07-31 07:37 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot showing the bug (70.91 KB, image/jpeg)
2018-05-15 11:00 EDT, Zoey Gerrit Prigge CLA
no flags Details
Corrected screenshot showing the bug (68.38 KB, image/jpeg)
2018-05-15 11:49 EDT, Zoey Gerrit Prigge CLA
no flags Details
Screenshot showing the equivalent situation on an edge label (65.07 KB, image/jpeg)
2018-05-17 10:22 EDT, Zoey Gerrit Prigge CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zoey Gerrit Prigge CLA 2018-05-15 11:00:34 EDT
Created attachment 274047 [details]
Screenshot showing the bug

The label attribute escape sequence can occurr in any point in a label, as described in https://www.graphviz.org/doc/info/attrs.html#k:escString.

At the moment, "\N" is replaced by the node name, if the label consists of "\N" only, but not in any other case.

This is related to bug #508830. However, as some support is already in place, I have opened a more specific bug report.
Comment 1 Zoey Gerrit Prigge CLA 2018-05-15 11:48:11 EDT
Comment on attachment 274047 [details]
Screenshot showing the bug

Due to an error on my side the screenshot was wrong.
Comment 2 Zoey Gerrit Prigge CLA 2018-05-15 11:49:07 EDT
Created attachment 274050 [details]
Corrected screenshot showing the bug

I have simplified the situation in the screenshot and added a refreshed graphviz rendering.
Comment 3 Zoey Gerrit Prigge CLA 2018-05-17 10:22:27 EDT
Created attachment 274087 [details]
Screenshot showing the equivalent situation on an edge label
Comment 4 Tamas Miklossy CLA 2018-06-06 10:29:19 EDT
There are other cases where the replacement is not yet implemented, the most important ones are:

- headlabel
- label
- taillabel
- tooltip
- xlabel

A general solution should be implemented here, so that the Eclpipse GEF DOT Graph View can render the following dot graph properly:

graph TestGraph {
	
	a [
		label   = "label = g:\G n:\N"
		tooltip = "tooltip = g:\G n:\N"
		xlabel  = "xlabel = g: \G n:\N"
	]
	
	a--b [
		headlabel = "headlabel = g:\G e:\E"
		label     = "label = g:\G e:\E"
		taillabel = "taillabel = g:\G e:\E"
		xlabel    = "xlabel = g: \G e:\E"
	]
}
Comment 5 Zoey Gerrit Prigge CLA 2018-07-13 10:11:10 EDT
Changed title of bug from 

Implement correct handling of \N escape sequence in node label attribute and \E escape sequence in edge label attribute

to

Implement correct visualization-handling of name-replacing escape sequences (i.e. \E, \N, \G, \L, \H, \T) in node and edge escString attributes

to better show that the issue can be solved for all escStrings (compare bug #508830) and to show that this bug is concerning the ui package.
Comment 6 Eclipse Genie CLA 2018-07-31 06:01:40 EDT
GitHub Pull Request 19 created by [prggz]
https://github.com/eclipse/gef/pull/19
Comment 7 Zoey Gerrit Prigge CLA 2018-07-31 07:20:40 EDT
With PR (#19) merged, the visualisation now works. The change was made in Dot2ZestAttributesConverter. 

Further discussion if these implementation should be moved to a deeper level is within the scope of bug #508830. 

As the issue at heart of this bug is fixed, I vouch for closing this as resolved.
Comment 8 Tamas Miklossy CLA 2018-07-31 07:36:19 EDT
Thanks for the patch, I merged your PR into the master branch. Resolving as fixed in 5.0.200.