Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Link a business object before the editor is initialized and opened
Link a business object before the editor is initialized and opened [message #1076622] Wed, 31 July 2013 16:56 Go to next message
Jack Chi is currently offline Jack Chi
Messages: 26
Registered: July 2011
Location: Pennsylvania
Junior Member

If I create a PictogramElement and link a business object before the editor is opened, how do I do it? For example, in the new wizard, I create an circle in the diagram before the editor is opened the first time.

Diagram diagram = Graphiti.getPeCreateService().createDiagram("diagramType1", page.getFileName(), true);
				
ContainerShape outterShape = Graphiti.getPeCreateService().createContainerShape(diagram, true);
//outterShape.getLink().getBusinessObjects().add(SimplebpFactory.eINSTANCE.createStart());

[Updated on: Fri, 02 August 2013 15:26]

Report message to a moderator

Re: Link a business object before the editor is initialized and opened [message #1077941 is a reply to message #1076622] Fri, 02 August 2013 10:37 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1618
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Jack,

a new link can be created like this:

// create new link
link = PictogramsFactory.eINSTANCE.createPictogramLink();
link.setPictogramElement(pe);

// add new link to diagram
diagram.getPictogramLinks().add(link);

Michael
Re: Link a business object before the editor is initialized and opened [message #1078144 is a reply to message #1077941] Fri, 02 August 2013 15:38 Go to previous message
Jack Chi is currently offline Jack Chi
Messages: 26
Registered: July 2011
Location: Pennsylvania
Junior Member

Michael,

Thanks for the help.

Jack
Previous Topic:Decorating domain model elements: checking Graphiti feasibility
Next Topic:Navigation in graphiti
Goto Forum:
  


Current Time: Sun Oct 26 09:47:33 GMT 2014

Powered by FUDForum. Page generated in 0.03967 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software