How to use external actions (JFace) [message #1325714] |
Thu, 01 May 2014 06:46  |
Eclipse User |
|
|
|
Hello,
I want to use a separate class for each of my JFace actions (so I don't pollute the main UI class with a lot of code). But I can't get Windowbuilder to recognize them.
I tried declaring a new class (TestAction extends org.eclipse.jface.action.Action) but when I click to add an external action it does not seem to recognize it as such and allow me to add it to a menu item.
I also tried manually instantiating the class in the createActions() method, but if I change the instantiated class like so:
private void createActions() {
{
actExitApp2 = new ActionExitApp2("");
action = new Action("New Action") {};
}
}
action is detected but actExtApp2 is not. I tried creating a constructor on ActionExitApp2 with and without a string parameter. I tried declaring actExitApp2 as both Action and ActionExitApp2.
I downloaded and tried searching in WB's code where external actions are detected but the code is too big, I'm still trying to understand it's architecture.
Anyone got any pointers on how to use external actions with Windowbuilder in eclipse?
Thanks.
|
|
|
|
Powered by
FUDForum. Page generated in 0.28145 seconds