Skip to main content



      Home
Home » Eclipse Projects » WindowBuilder » How to use external actions (JFace)(How do I get WB to detect them?)
How to use external actions (JFace) [message #1325714] Thu, 01 May 2014 06:46 Go to next message
Eclipse UserFriend
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.
Re: How to use external actions (JFace) [message #1344986 is a reply to message #1325714] Fri, 09 May 2014 21:10 Go to previous message
Eclipse UserFriend
It worked fine when I tried it, so no idea.

A test case would probably be useful.
Previous Topic:Form generator in Eclipse
Next Topic:License of code generated by Window Builder
Goto Forum:
  


Current Time: Mon Jul 07 22:56:09 EDT 2025

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

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

Back to the top