Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » Custom generation method
Custom generation method [message #663489] Tue, 05 April 2011 10:33 Go to next message
George  is currently offline George
Messages: 34
Registered: March 2011
Member
Hello,
I want when i add my custom component.In Entry file will like this:

public class Myentrypoint implements EntryPoint{

public void onModuleLoad(){
Mycomponent mycoponent_1=new Mycomponent();
rootPanel rootPanel.add(mycoponent_1, 103, 268)
}

public void mymethode(){


}
}

so my goal is to generate ampty method that will be edit later from developper.

Can you help me.

[Updated on: Tue, 05 April 2011 10:33]

Report message to a moderator

Re: Custom generation method [message #663541 is a reply to message #663489] Tue, 05 April 2011 14:50 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 554
Registered: July 2009
Senior Member
Right now WindowBuilder does not provide such feature out of box.
But you can write plugin which adds org.eclipse.wb.core.model.broadcast.ObjectInfoChildAddAfter broadcast listener and then uses org.eclipse.wb.internal.core.utils.ast.AstEditor.addMethodDe claration(String, List<String>, BodyDeclarationTarget) to add new method.


Konstantin Scheglov,
Google, Inc.
Re: Custom generation method [message #663777 is a reply to message #663541] Wed, 06 April 2011 13:29 Go to previous message
Eric Clayberg is currently offline Eric Clayberg
Messages: 859
Registered: July 2009
Location: Boston, MA
Senior Member
Note that there are many examples of using both of the above in the WindowBuilder source.
Previous Topic:Generation java file
Next Topic:File modification
Goto Forum:
  


Current Time: Tue Sep 16 07:44:12 GMT 2014

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

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