Generating package-private form fields

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

Generating package-private form fields

Postby cemerick » Thu Sep 30, 2010 4:05 am

We've used NetBeans' Matisse in the past to lay out forms, which we've then wired up and used from our fundamentally Clojure-based applications. To do this, it is far more convenient to simply generate component fields with package-private access (e.g. "Button text;" rather than "private Button text;").

This was possible in Matisse, but I don't see any field visibility preferences in WindowBuilder -- either globally, or on a per-field basis. We could simply change the fields' visibility as necessary in the code, but I presume that that would get wiped out on a future regeneration/update of the source by WindowBuilder.

Any thoughts? (Besides "use accessors"? ;-))

- Chas
cemerick
 
Posts: 2
Joined: Thu Sep 30, 2010 4:00 am

Re: Generating package-private form fields

Postby Eric Clayberg » Fri Oct 01, 2010 5:41 am

cemerick wrote:This was possible in Matisse, but I don't see any field visibility preferences in WindowBuilder -- either globally, or on a per-field basis.

No one has ever asked for that. We will look into adding that for you.

cemerick wrote:We could simply change the fields' visibility as necessary in the code, but I presume that that would get wiped out on a future regeneration/update of the source by WindowBuilder.

Definitely don't assume that. SWT Designer is not like Matisse at all in that respect. You can generally make any source code changes that you want and the tool will preserve them as well as your formatting.

The only time it would change the field definition would be if you were to convert the field to a local variable and back to a field again.
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: Generating package-private form fields

Postby cemerick » Fri Oct 01, 2010 6:45 am

Great, thanks for your efforts. We'll go ahead with twiddling access keywords for now.
cemerick
 
Posts: 2
Joined: Thu Sep 30, 2010 4:00 am

Re: Generating package-private form fields

Postby Eric Clayberg » Mon Oct 11, 2010 2:00 pm

The latest WindowBuilder build now includes preference settings to control the field visibility...

http://code.google.com/webtoolkit/tools ... -beta.html
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: Bing [Bot], Google [Bot] and 1 guest

cron