Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » run action by ID
run action by ID [message #448562] Wed, 26 April 2006 14:35 Go to next message
Slava is currently offline SlavaFriend
Messages: 2
Registered: July 2009
Junior Member
I have action class and action id defined in plugin.xml, how should i get this Action by ID then run?
I do it from testcase.
Thanks.
Re: run action by ID [message #448572 is a reply to message #448562] Thu, 27 April 2006 05:58 Go to previous messageGo to next message
Rohit Khariwal is currently offline Rohit KhariwalFriend
Messages: 114
Registered: July 2009
Senior Member
first create a new instance of the action class and call it run method.

It is not possible to get the reference of the action which is added by using actionsets in plugin.xml.
Re: run action by ID [message #448576 is a reply to message #448562] Thu, 27 April 2006 07:32 Go to previous message
Slava is currently offline SlavaFriend
Messages: 2
Registered: July 2009
Junior Member
Thanx, thats right. but i have action delegate instead action, so.. what have i done.
// my ActionDelegate which defined in plugin.xml
MyActionDelegate delegate = new MyActionDelegate();
//empty Action
Action action = new Action(){};
// Some selection
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IProject project = root.getProject("my");
ISelection selection = new StructuredSelection(project);
// then when i call run everything WORK!
delegate.selectionChanged(action, selection);
delegate.run(action);
Previous Topic:Running Pluggin From Ant Script
Next Topic:Inter-plugin communication
Goto Forum:
  


Current Time: Tue Nov 12 12:53:18 GMT 2024

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

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

Back to the top