Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Refering to another diagram with in a diagram(Link from one diagram to other)
Refering to another diagram with in a diagram [message #1430789] Wed, 24 September 2014 20:38 Go to next message
Anil tanneru is currently offline Anil tanneruFriend
Messages: 21
Registered: March 2014
Junior Member
I have a business requirement, where I need to refer a diagram from another diagram and link that.How can i do that in Graphiti.
Re: Refering to another diagram with in a diagram [message #1431961 is a reply to message #1430789] Fri, 26 September 2014 11:53 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi,

what kind of reference are you thinking about? Graphiti mostly uses
containment relations for the pictogram elements and graphics algorithms, so
I'm not sure what you are about here.

Michael
Re: Refering to another diagram with in a diagram [message #1432697 is a reply to message #1431961] Sat, 27 September 2014 15:12 Go to previous messageGo to next message
Marek Jagielski is currently offline Marek JagielskiFriend
Messages: 97
Registered: April 2012
Member
I have a usecase where I have one diagram that one element references to another diagram:

http://systemincloud.com/tasks/#0.3.0/commons/embeddedtask

When double-clicking on pictogram element I open second diagram. This element contains only a relative path the rest is done as follow:

		final IFile ifile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(getEmbeddedTaskPath(bo)));
		
		Display.getCurrent().asyncExec(new Runnable() {
			public void run() {
				IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
				try {
					IDE.openEditor(page, ifile, true);
				} catch (PartInitException e) {
				}
			}
		});


	public String getEmbeddedTaskPath(EmbeddedTask bo) {
		return EclipseUtil.getModelPathFromEObject(bo).segment(0).toString() + "/" + bo.getImplementationTask();
	}
Re: Refering to another diagram with in a diagram [message #1433786 is a reply to message #1432697] Mon, 29 September 2014 08:34 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
I see. So the hierarchy is defined on domain object level.

Have you seen AbstractDrillDownFeature? Basically, you can link one or more
diagrams to a domain object, link a pictogram element on another diagram to
the same domain object and that feature will provide some basic
functionality to open another diagram editor.

The tutorial contains a small example for that:
http://help.eclipse.org/kepler/topic/org.eclipse.graphiti.doc/resources/docu/gfw/drill-down.htm?cp=27_1_3_11

Michael
Re: Refering to another diagram with in a diagram [message #1434158 is a reply to message #1433786] Mon, 29 September 2014 19:05 Go to previous message
Marek Jagielski is currently offline Marek JagielskiFriend
Messages: 97
Registered: April 2012
Member
Thanks Michael,
I have to once again go back to the tutorial. When I was looking on it first, I omitted more advanced things. And after, I have never come back. Your indication will be useful when I will do refactoring. What will be more interesting, in two release I want to referencing diagrams that are in maven dependencies (still don't know how I will do it).
Marek
Previous Topic:Converting elements to SVG
Next Topic:Graphical SAP Data Creation Tool based on GMF
Goto Forum:
  


Current Time: Mon Sep 23 06:50:38 GMT 2024

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

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

Back to the top