Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » run action by ID
run action by ID [message #448562] Wed, 26 April 2006 10:35 Go to next message
Eclipse UserFriend
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 01:58 Go to previous messageGo to next message
Eclipse UserFriend
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 03:32 Go to previous message
Eclipse UserFriend
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: Sun Apr 20 23:20:28 EDT 2025

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

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

Back to the top