Bug 259212 - CustomFigure in GroupContainers
Summary: CustomFigure in GroupContainers
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Zest (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-18 01:42 EST by karthikeyan CLA
Modified: 2015-01-22 02:43 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description karthikeyan CLA 2008-12-18 01:42:54 EST
Build ID: 3.3

Steps To Reproduce:
I can able to place my custom figure on my graph... The Same figure i cant able to display in th GroupContainer

More information:
Comment 1 Joseph George Variam CLA 2009-01-07 09:34:09 EST
This bug shows up in the UML example:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gef/test/org.eclipse.zest.tests/src/org/eclipse/zest/tests/uml/UMLExample.java?revision=1.4&root=Tools_Project

In this snippet, A GraphContainer named 'A UML Container' is created and a node 'c' is put in it. But, 'c' appears outside the container. What is the reason for this?

Ian, is it possible to also share the source to CGraphNode mentioned in:
http://dev.eclipse.org/newslists/news.eclipse.tools.gef/msg19832.html

We'd be happy to help develop, supply patches and test this feature as its very urgent.
Comment 2 Ghislain Hude CLA 2011-10-19 07:29:24 EDT
Hello,
It is impossible to put a CGraphNode inside a GroupContainer.
This is due to GraphNode constructor used inside the CGraphNode, which use the graph of the parent instead the parent itself.

The GraphNode constructor can be replace by (or create a new one):

public CGraphNode(IContainer graphModel, int style, IFigure figure) {
     super(graphModel, style, "" /*text*/, null /*image*/, figure);
}

Instead:

public CGraphNode(IContainer graphModel, int style, IFigure figure) {
     super(graphModel, style, figure);
}

Because the constructor of GraphNode is:
public GraphNode(IContainer graphModel, int style, Object data) {
	this(graphModel.getGraph(), style, "" /*text*/, null /*image*/, data);
}

May be the issue is from GraphNode itself?
Why it bypass the container parameter to implicitly use the Graph.

Thanks and regards,
Ghis
Comment 3 Alexander Nyßen CLA 2015-01-22 02:43:45 EST
Re-assigning back to inbox, as Ian is no longer active committer.