Retarget Actions [message #328383] |
Fri, 23 May 2008 11:25  |
Eclipse User |
|
|
|
Hi,
I intend to retarget the cut/copy/paste/delete actions with my own actions
and implementations. I created my own custom Delete action extending
Retarget action. Then provided an implementation for its isEnabled() method
and finally setGlobalActionHandler (for actionBars for the View Site -
Project Explorer View) with arguments (ActionFactory.DELETE.getId(),
deleteAction) where deleteAction is my custom action. However, this doesn't
tie the Edit > Delete to my action. Also, in the right-click menu where I
have contributed my Delete action through an actionProvider has two delete
actions displayed (its not overriding the default delete). Delete key on
keyboard also triggers the default action.
I tried referring to Micheal's article at
http://scribbledideas.blogspot.com/2006/06/building-common-n avigator-_115067357450703178.html
for this and followed most of the guidelines given but still am unable to
retarget the actions as required.
Can someone help me in this or guide me to the appropriate material for
retarget actions? I can post parts from my code if needed.
I had originally posted this on platform.swt group... also I am using
Eclipse 3.2, so handlers and commands mechanism which is in 3.3 won't be
available to me, right?
Any help would be highly appreciated.
Thanks,
Rahul
|
|
|
|
|
|
Re: Retarget Actions [message #328608 is a reply to message #328417] |
Wed, 28 May 2008 09:15  |
Eclipse User |
|
|
|
Thanks David, the problem is now resolved. I was given some suggestions
elsewhere and it seems to have solved the issue!
Thanks a bunch for your help and guidance!
Rahul
"Rahul Kamdar" <rtkamdar@kamdars-india.com> wrote in message
news:g18nnf$91v$1@build.eclipse.org...
> Hi David,
>
> Thanks a lot for the help! I can't move to 3.3, its a limitation that
> can't be overcome :)
>
> From your comments, does it mean that I can use commands and handlers to
> retarget Delete even in 3.2? Writing my custom delete action that extends
> simply Action and using commands, bindings and handlers I can retarget
> completely the delete action in 3.2?
>
> Thanks,
> Rahul
>
> "David Kyle" <davidk@kelman.com> wrote in message
> news:g17i0s$9up$1@build.eclipse.org...
>> Rahul,
>>
>> I lied. Command/Handlers/org.eclipse.ui.menus are not fully implemented
>> in 3.2. Is there a reason you can't migrated forward to 3.3? We made the
>> move without any problems.
>>
>> Anyways, my comments about our delete action should be correct with 3.2.
>>
>> David Kyle
>> http://richclientplatform.blogspot.com/
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03042 seconds