Prefix field access with "this" issue

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

Prefix field access with "this" issue

Postby sdatchley » Mon Nov 01, 2010 11:38 am

I've submitted this bug via the "contact support" button, but I'm not sure if there is a way to see the status of the support submittal.

So it appears if you have the 'Prefix field access with "this"' option turned on on the Code Generation preferences page the designer's parser might give you this:

Exception during constructor evaluation
An exception happened during evaluation of

new Label(, SWT.NONE)

Constructor Label(Composite,int) was used with the parameters {<null>,0}.
Note: null values may occur when parsing complex expressions that can't be resolved at design-time.
com.instantiations.designer.core.utils.exception.DesignerException: 2005 (Null as parent argument.).

I did a clean install of the latest (not beta) plugins in a helios setup and use the following to produce this:
1) Create a new SWT Application window with default options
2) Via designer I try dropping a label on to the shell.

The designer has no issues if I turn off the prefix option and I manually remove all of the "this." prefixes (for existing classes that i edit with the designer). This issue also occurred when I used the beta plugins as well.
Posts: 6
Joined: Thu Oct 15, 2009 6:13 am

Re: Prefix field access with "this" issue

Postby Eric Clayberg » Mon Nov 15, 2010 7:18 pm

Give this a try using the latest WindowBuilder v8.1 build... ... -beta.html
Eric Clayberg
Software Engineering Manager

Author: "Eclipse Plug-ins"
Eric Clayberg
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] and 1 guest