Skip to main content



      Home
Home » Eclipse Projects » Target Management » RSE SubSystem - Copy/Paste support
RSE SubSystem - Copy/Paste support [message #758789] Thu, 24 November 2011 09:52 Go to next message
Eclipse UserFriend
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 12:47 Go to previous messageGo to next message
Eclipse UserFriend
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 03:52 Go to previous messageGo to next message
Eclipse UserFriend
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 12:31 Go to previous messageGo to next message
Eclipse UserFriend
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 05:04 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 15:27:00 EDT 2025

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

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

Back to the top