DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Reusing of actions
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2009
Exclamation Reusing of actions - 06-28-2009, 05:07 AM

Hi All,

We already know that actions can handle commands using "definitionID", I am just wondering if there is any possibility of letting the commands handle actions. In other way i have ViewerContributions actions already implemented i wanna reuse them in commands

THanks,
Hadi
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2009
Default Good Idea - 06-30-2009, 11:54 PM

Your Idea is so good, it is possible to implement, but it also needs DIY for the action resolveing code.
Reply With Quote
  (#3 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2009
Default 07-01-2009, 02:26 AM

Hey Smartee,

Thankls for the reply, but would you please tell me what is the DIY, besides, do you have a code segment or any thought that i could start with.

THanks
Reply With Quote
  (#4 (permalink)) Old
Active Contributor
 
Posts: 62
Thanks: 0
Thanked 6 Times in 6 Posts
Join Date: Jun 2009
Default 07-01-2009, 02:39 AM

Maybe we can use commands and key bindings to launch the specific action. To some commands that have been already defined by the eclipse system, we can use the “setGlobalHandler” method to reuse the id, we can bind the id with our own action. I think it seems a little weird that using commands to handle actions. I mean, usually, an action is triggered by a command or a key binding. Maybe we should accept the normal rules of using commands and actions.


www.eclaxy.com
let's perfect the eclipse!
Reply With Quote
  (#5 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2009
Default 07-01-2009, 02:51 AM

Thanks for your reply oxygold,

Actually, yes we must accept eclipse rule, but the matter here is reusing the implemented actions by being called from inside the command instead of replicating code. My case is having an actions applied to a specific view by using viewer contribution and object contribution, i want to create a drop down menu on the view Toolbar with same actions without replicating the code, even if I don't want to replicate code, the view actions code most probably is not applicable to be implemented inside commands function "Correct me if i am wrong".

As we are more clear here, does anybody have thoughts or idea about how could we implement this.

Many Thanks,
Hadi
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cut, Copy Paste actions not working in my TextEditor loganathans Eclipse 2 06-22-2009 04:17 AM
Widget Method Handler and Retargetting Actions Niels Bech Nielsen Eclipse 0 01-07-2009 05:52 AM
How to implement EMF redo/undo actions??? Larutan81 Eclipse 0 07-10-2008 09:11 AM
Actions for IExecutionListener dertl Eclipse 0 04-28-2008 01:08 PM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com