Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Copy/Paste across editor instances
Copy/Paste across editor instances [message #1743865] Tue, 20 September 2016 09:55 Go to next message
erwin de ley is currently offline erwin de leyFriend
Messages: 49
Registered: August 2013
With org.eclipse.graphiti.ui.features.AbstractCopyFeature.putToClipboard(Object[]) and org.eclipse.graphiti.ui.features.AbstractPasteFeature.getFromClipboard() it's possible to copy/paste diagram elements in a same diagram or across diagrams in a same Eclipse RCP Graphiti editor instance.

On the other hand I can not copy/paste between diagrams opened in 2 separate RCP instances. This seems to be related to the use of LocalSelectionTransfer in org.eclipse.graphiti.ui.internal.util.clipboard.ModelClipboard.getLocalSelectionContent().

The copy does place the selected elements in my "system-wide" clipboard, e.g. I can then paste in Notepad++ or so and get e.g. :
ContainerShape " (visible: true, active: true)": platform:/resource/test/workflows/t2.tdml#/0/@children.4

for a copied diagram element.

This also works when opening a plain text file in the other eclipse instance and pasting in there.

But the Graphiti paste does not "see" it in the other eclipse instance.

Is there a way to implement paste across eclipse instances with Graphiti?

Re: Copy/Paste across editor instances [message #1744015 is a reply to message #1743865] Wed, 21 September 2016 12:52 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1885
Registered: July 2009
Location: Walldorf, Germany
Senior Member

unfortunataly, copy&paste is curently only supported withinthe same Eclipse instance, due to what you already wrote. There is a open bugzilla ( for reworking that but it has not yet made it into development. Enhancing that could be one task within that.

You may try to use your own ModelClipboard implementations though from your paste (and maybe copy ) feature and make use of other transfer implementations there, but I'm not sure which ones could apply here.

Previous Topic:getSingleClickFeature of DefaultTollBehaviorProvider not triggered
Next Topic:Please delete
Goto Forum:

Current Time: Thu Mar 22 08:28:22 GMT 2018

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

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