Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Enable and Dis-Able Paste Icons(Enabling and Disableing Paste Icons based on Clipboard content)
icon14.gif  Enable and Dis-Able Paste Icons [message #509509] Fri, 22 January 2010 16:32 Go to next message
Dhinesh is currently offline DhineshFriend
Messages: 10
Registered: January 2010
Junior Member

Hello Folks,

I have developed a plug-in for doing copy-Paste feature to copy and paste a particular Object. It is a seperate plug-in. Both Copy and Paste are associated with a View that is contributed by a different plug-in.

So, in short to mention the Plug-in details.

Copy/Paste contributed by com.a.b --> Seperate.
View is provided by com.c.d ->> Seperate

I have used Eclipse copy/paste actions..i.e org.eclipse.ui.copyaction and org.eclipse.ui.pasteaction. I have contributed a pop-up menu Extensions mentioning the action IDs.
Basically Copy/paste works fine,but I want to enable and disable the actions based on the Clipboard contents.

I have written the code in selectionChanged() event of the action class. It's getting fired only when this plug-in is loaded. Until then, the paste action is enabled eventhough there is no relevant data to be pasted.

Now I want to disable it when the Eclipse is launced.

Could anyone of you pls help me with this problem.

Thanks in Advance,
Dhinesh.M
Re: Enable and Dis-Able Paste Icons [message #509741 is a reply to message #509509] Mon, 25 January 2010 09:02 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Dhinesh,

to control the enablement of an action before its defining plug-in is
loaded, you can use its "enablement" element. Is that what you are
looking for?

It seems that you are working on an RCP application and therefore are
better off asking this on the eclipse.rcp or eclipse.platform newsgroup
[1]. Please continue this discussion on one of these newsgroups.

HTH
Rüdiger

[1] http://www.eclipse.org/forums/
--
Rüdiger Herrmann
http://eclipsesource.com

On 22.01.2010 17:32, Dhinesh wrote:
> Hello Folks,
>
> I have developed a plug-in for doing copy-Paste feature to copy and
> paste a particular Object. It is a seperate plug-in. Both Copy and Paste
> are associated with a View that is contributed by a different plug-in.
>
> So, in short to mention the Plug-in details.
>
> Copy/Paste contributed by com.a.b --> Seperate.
> View is provided by com.c.d ->> Seperate
>
> I have used Eclipse copy/paste actions..i.e org.eclipse.ui.copyaction
> and org.eclipse.ui.pasteaction. I have contributed a pop-up menu
> Extensions mentioning the action IDs.
> Basically Copy/paste works fine,but I want to enable and disable the
> actions based on the Clipboard contents.
>
> I have written the code in selectionChanged() event of the action class.
> It's getting fired only when this plug-in is loaded. Until then, the
> paste action is enabled eventhough there is no relevant data to be pasted.
>
> Now I want to disable it when the Eclipse is launced.
>
> Could anyone of you pls help me with this problem.
>
> Thanks in Advance,
> Dhinesh.M
Previous Topic:IApplication Support
Next Topic:How to use the RAP Theme Editor from the Incubator?!
Goto Forum:
  


Current Time: Sat Sep 21 06:50:32 GMT 2024

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

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

Back to the top