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 Friend
Messages: 34
Registered: March 2011
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 ScheglovFriend
Messages: 555
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 ClaybergFriend
Messages: 972
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: Fri Apr 27 05:15:19 GMT 2018

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

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