Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Target Management » RSE SubSystem - Copy/Paste support
RSE SubSystem - Copy/Paste support [message #758789] Thu, 24 November 2011 14:52 Go to next message
Ralph P is currently offline Ralph PFriend
Messages: 30
Registered: September 2010
Location: Frankfurt, Germany
Member
Hello,

I'm looking for a general way to support copying and pasting resources between my and other SubSystems. Are there any interfaces for this purpose?

Thanks in advance!

Ralph
Re: RSE SubSystem - Copy/Paste support [message #759034 is a reply to message #758789] Fri, 25 November 2011 17:47 Go to previous messageGo to next message
David McKnight is currently offline David McKnightFriend
Messages: 244
Registered: July 2009
Senior Member
Hi Ralph,

Assuming you have specialized resources, you'll should have at least one
corresponding ISystemViewElementAdapter defined and registered to have your
objects managed in RSE views. ISystemViewElementAdapter extends
ISystemDragDropAdapter which has APIs for dragging and dropping.

Let me know whether that helps or if you need more information.
Dave

"r.pakosch" <forums-noreply@eclipse.org> wrote in message
news:jallmo$qk2$1@news.eclipse.org...
> Hello,
>
> I'm looking for a general way to support copying and pasting resources
> between my and other SubSystems. Are there any interfaces for this
> purpose?
>
> Thanks in advance!
>
> Ralph
>
Re: RSE SubSystem - Copy/Paste support [message #759572 is a reply to message #759034] Tue, 29 November 2011 08:52 Go to previous messageGo to next message
Ralph P is currently offline Ralph PFriend
Messages: 30
Registered: September 2010
Location: Frankfurt, Germany
Member
Hi Dave,

thank you! The solution was incredibly simple (we had the doDrag(...) method already implemented, but without returning an IResource)! Drag & Drop works fine now!

Is there a way to do exact the same thing with explicit "Copy" and "Paste" actions? Do we have to define our own actions for that?

Ralph
Re: RSE SubSystem - Copy/Paste support [message #759959 is a reply to message #759572] Wed, 30 November 2011 17:31 Go to previous messageGo to next message
David McKnight is currently offline David McKnightFriend
Messages: 244
Registered: July 2009
Senior Member
Hi Ralph,

If you'd like to add copy/paste support just implement the following in your
view adatper:

public void addActions(SystemMenuManager menu, IStructuredSelection
selection, Shell shell, String menuGroup)
{
...

if (copyClipboardAction == null){
copyClipboardAction = new SystemCopyToClipboardAction(shell, null);

}

if (paseClipboardAction == null){
pasteClipboardAction = new SystemPasteFromClipboardAction(shell, null);
}
menu.add(menuGroup, copyClipboardAction);
menu.add(menuGroup, pasteClipboardAction);
...



"r.pakosch" <forums-noreply@eclipse.org> wrote in message
news:jb26fv$opr$1@news.eclipse.org...
> Hi Dave,
>
> thank you! The solution was incredibly simple (we had the doDrag(...)
> method already implemented, but without returning an IResource)! Drag &
> Drop works fine now!
>
> Is there a way to do exact the same thing with explicit "Copy" and "Paste"
> actions? Do we have to define our own actions for that?
>
> Ralph
Re: RSE SubSystem - Copy/Paste support [message #760096 is a reply to message #758789] Thu, 01 December 2011 10:04 Go to previous message
Ralph P is currently offline Ralph PFriend
Messages: 30
Registered: September 2010
Location: Frankfurt, Germany
Member
Hi Dave,

that is exactly what I was looking for!
Thank you!

Ralph
Previous Topic:Initializing RSE
Next Topic:programmatically use RSE
Goto Forum:
  


Current Time: Tue Apr 16 14:47:06 GMT 2024

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

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

Back to the top