Question on behaviour of the Design tab and Composites

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

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

Question on behaviour of the Design tab and Composites

Postby jnorris » Thu Oct 20, 2005 11:57 am

I just have a question about some behaviour I noticed when editing a Composite in the Design tab.

I created a new Composite and added a call to a method at the end of the constructor called updateInfo() which will retrieve data to populate the view. I switched to the Design tab and started to add components to the view. When I switched back to the Source tab I found that all of the components were added to the updateInfo() method. So I moved the code back to the constructor, switched back to the Design tab and added more components. The new components were again added to the updateInfo() method. For grins, I then moved the call to updateInfo() to before a component (just a Label) in the constructor and repeated the process. In this case the new components were added at the end of the constructor.

Is there a setting somewhere that controls this behaviour? For now I have just commented out the call to updateInfo() in the constructor until I'm ready to test the view.

Thanks,
Jim
jnorris
 
Posts: 17
Joined: Tue Jul 27, 2004 5:10 am

Re: Question on behaviour of the Design tab and Composites

Postby Eric Clayberg » Thu Nov 03, 2005 7:28 pm

jnorris wrote:Is there a setting somewhere that controls this behaviour?

In the next release, you will be able to control this.

jnorris wrote:For now I have just commented out the call to updateInfo() in the constructor until I'm ready to test the view.

You can use a code hiding tag instead.
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 jnorris » Fri Nov 04, 2005 6:17 am

Thanks for the reply Eric.

I'll give the code hiding tag a try the next time I have similar code. Although I've seen it in the preferences I wasn't aware of what the purpose for the tag was and obviously didn't read the docs for it.

-Jim
jnorris
 
Posts: 17
Joined: Tue Jul 27, 2004 5:10 am

Postby Eric Clayberg » Mon Nov 14, 2005 9:37 am

As of the v4.2.1 build, you can specify the name of the method in which to generate yoru widget definitions (rather than the constructor)...

Image
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 SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest