Parser not finding root container

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

Parser not finding root container

Postby sreed » Mon Jul 12, 2010 11:34 am

I have a class that is not itself descended from a Swing container but builds a frame when a public method is called. If I add a call to the method in the class's constructor then I can edit the Swing code in Designer but if I leave the constructor without the call the parser doesn't see the frame and I cannot edit it. Is there a way to tell the parser where to start?
sreed
 
Posts: 7
Joined: Fri Apr 11, 2008 4:32 pm

Re: Parser not finding root container

Postby Eric Clayberg » Mon Jul 12, 2010 12:39 pm

Try adding a @wbp.parser.entryPoint JavaDoc tag to the method you want the parser to start with.

If that does not work, we will need to see a test case.
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

Re: Parser not finding root container

Postby sreed » Mon Jul 12, 2010 8:42 pm

I'd like to learn more about the annotations that are available. Are they in the docs somewhere? I looked and tried some searches but nothing came up.
sreed
 
Posts: 7
Joined: Fri Apr 11, 2008 4:32 pm

Re: Parser not finding root container

Postby Eric Clayberg » Tue Jul 13, 2010 11:16 am

See the Designer Customization API in the product docs. Search on "entryPoint" for example.

If the parser can't find an entry point in a class, it will actually ask the user which method to use as the entry point.

In your case, it found the public constructor (which is always an entry point), so it did not need to ask.
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