Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:46 Go to next message
Matheus Degiovani is currently offline Matheus Degiovani
Messages: 1
Registered: May 2014
Junior Member
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] Sat, 10 May 2014 01:10 Go to previous message
Eric Clayberg is currently offline Eric Clayberg
Messages: 860
Registered: July 2009
Location: Boston, MA
Senior Member
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: Thu Sep 18 05:48:11 GMT 2014

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

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