Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 540527

Summary: DOT Graph View - incorrect shape rendering
Product: [Tools] GEF Reporter: Tamas Miklossy <miklossy>
Component: GEF DOTAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse
Version: unspecified   
Target Milestone: 5.3.2 (2020-12)   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
Screenshot about the bug
none
Result of dot.exe | dot.exe -T pdf
none
Screenshot after bugfixing none

Description Tamas Miklossy CLA 2018-10-27 03:18:52 EDT
Created attachment 276397 [details]
Screenshot about the bug

The DOT Graph View should render the graph definition

graph {
	{
		node[ shape=box ]
		1[ shape=circle ]
		2
	}
	node[ shape=circle ]
}

on the same way that the graphviz executable does (see the attached screenshot).
Comment 1 Zoey Gerrit Prigge CLA 2020-03-12 06:51:31 EDT
Created attachment 282098 [details]
Result of dot.exe | dot.exe -T pdf

Interestingly, this seems to occur only in native mode.

In native mode, a dot call is made to be able to use native position data. The output of the dot call is used in the graphviz display.

The output of such call is (on my system) using graphviz 2.41 the result is: 
graph {
        graph [bb="0,0,108,36"];
        node [label="\N",
                shape=circle
        ];
        {
                node [shape=box];
                1       [height=0.5,
                        pos="18,18",
                        width=0.5];
                2       [height=0.5,
                        pos="81,18",
                        shape=box,
                        width=0.75];
        }
} 

There appears to be a graphviz bug: Due to the attribute "circle" set in general in the outer scope, it appears this attribute setting is removed from all nodes in the inner scope. But then the general setting in the inner scope prevails over that in the outer scope.

With such intermediate result/rendered graph, the display in the GraphViewer is correct.

The attachment is the result of the graphviz call that equals "native" mode: 

echo graph {{node[ shape=box ];1[ shape=circle ];2;}node[ shape=circle ];} | dot.exe | dot.exe -T pdf >> DoubleExport.pdf

Which corresponds to the (wrong) visualization of two boxes.
Comment 2 Tamas Miklossy CLA 2020-11-27 01:29:57 EST
Created attachment 284912 [details]
Screenshot after bugfixing
Comment 3 Tamas Miklossy CLA 2020-11-27 01:32:03 EST
The problem has been fixed with Graphviz 2.44.1 and GEF 5.3.2, see the attached 'screenshot after bugfixing'.

Resolving as fixed in 5.3.2 (2020-12).