JavaDoc for generated methods?

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

JavaDoc for generated methods?

Postby ForceRs » Tue Sep 11, 2007 6:25 am

I have WB set up to use getter method for widgets. That is, the code it generates creates methods named getMY_WIDGET_NAME().

Is there a way to have a JavaDoc stub inserted when the method is generated by WB Pro?

VE did this and made it convenient to later document.

Thanks.
ForceRs
 
Posts: 15
Joined: Thu Jun 17, 2004 12:59 pm

Re: JavaDoc for generated methods?

Postby Eric Clayberg » Wed Sep 12, 2007 5:06 am

ForceRs wrote:I have WB set up to use getter method for widgets. That is, the code it generates creates methods named getMY_WIDGET_NAME(). Is there a way to have a JavaDoc stub inserted when the method is generated by WB Pro?

THis is now available in the latest Designer build.
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

Postby ForceRs » Wed Sep 12, 2007 8:13 am

Thanks, works great, but one small issue.

I have WB configured to display the "Enter important properties" dialog when I place widgets on my forms. The generated JavaDoc does not use the name I entered in that dialog.

For example, if I place a JPanel on my form, and type "pnMyPanel" as the variable name in the "Enter important properties" dialog, I get this javadoc:

Code: Select all
/**
* @return the panel
*/


I would expect to get this:

Code: Select all
/**
* @return pnMyPanel
*/


There is one other issue with the "Enter important properties" dialog. When I add a JPanel, it does not honor my default layout manager (as defined in Winow->Preferences...->Designer->Swing), it seems to default to FlowLayout. It seems that this only happens for the first JPanel. If I set it to BorderLayout, then the next time I add a JPanel, it is set to BorderLayout.
ForceRs
 
Posts: 15
Joined: Thu Jun 17, 2004 12:59 pm

Postby Eric Clayberg » Fri Sep 14, 2007 11:23 am

ForceRs wrote:I have WB configured to display the "Enter important properties" dialog when I place widgets on my forms. The generated JavaDoc does not use the name I entered in that dialog.

The method and the JavaDoc are actually created before the properties from that dialog are applied. I think we are just going to keep the template very simple and just show the @return tag by itself.

ForceRs wrote:There is one other issue with the "Enter important properties" dialog. When I add a JPanel, it does not honor my default layout manager (as defined in Winow->Preferences...->Designer->Swing), it seems to default to FlowLayout. It seems that this only happens for the first JPanel. If I set it to BorderLayout, then the next time I add a JPanel, it is set to BorderLayout.

Hmmm. We were not able to reproduce this.
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: No registered users and 1 guest