Skip to main content



      Home
Home » Eclipse Projects » WindowBuilder » Custom generation method
Custom generation method [message #663489] Tue, 05 April 2011 06:33 Go to next message
Eclipse UserFriend
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 06:33] by Moderator

Re: Custom generation method [message #663541 is a reply to message #663489] Tue, 05 April 2011 10:50 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Custom generation method [message #663777 is a reply to message #663541] Wed, 06 April 2011 09:29 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 07:49:52 EDT 2025

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

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

Back to the top