Skip to main content


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
Eclipse  Consultant is currently offline Eclipse ConsultantFriend
Messages: 27
Registered: July 2011
Location: California
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 WenzFriend
Messages: 1931
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
Eclipse  Consultant is currently offline Eclipse ConsultantFriend
Messages: 27
Registered: July 2011
Location: California
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: Fri Apr 26 20:07:32 GMT 2024

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

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

Back to the top