Policy for adding code to generated Java class files

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Policy for adding code to generated Java class files

Postby fredatwork » Wed Sep 22, 2004 6:25 am

Hello,

I'm a rather new Swing Designer user.

Sometimes, when I add some code to the generated constructor of a component class file, this code disapears after a regeneration by the Designer. I have everything generated in the constructor (I 'm not using getter methods).

Are there some guidelines/policies about how the end-user should code into the code generated by the Designer ?

Fred

Ps: I posted this message again because I did not log in at first.
Fred
fredatwork
 
Posts: 13
Joined: Mon Sep 20, 2004 1:59 pm
Location: France

Re: Policy for adding code to generated Java class files

Postby Eric Clayberg » Wed Sep 22, 2004 8:31 am

fredatwork wrote:Sometimes, when I add some code to the generated constructor of a component class file, this code disapears after a regeneration by the Designer. I have everything generated in the constructor (I 'm not using getter methods).

Do you have an example? Designer does not "regenerate" any code. It updates only the lines of code in a class that are affected by a change in the design view. User added code can exist anywhere in the file and shoud not be affected.

fredatwork wrote:Are there some guidelines/policies about how the end-user should code into the code generated by the Designer ?

No. In general, you can add code anywhere you like. You can also freely change / refactor the generated code.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: Google [Bot] and 1 guest