Code generated after return statement.

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

Code generated after return statement.

Postby cebarne2 » Mon Oct 27, 2003 10:27 am

Often, when using SWT-Designer to layout controls on an Eclipse property page, it generates the code for the controls after the return statement. This causes errors to appear stating that I have unreachable code. So, I routinely switch to the code view and cut & paste the return statement below the last widget/control block.

Can SWT-Designer be modified to be aware of a final return statement and create the widgets before it?

Thanks
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Re: Code generated after return statement.

Postby Eric Clayberg » Mon Oct 27, 2003 11:19 am

cebarne2 wrote:Often, when using SWT-Designer to layout controls on an Eclipse property page, it generates the code for the controls after the return statement. This causes errors to appear stating that I have unreachable code. So, I routinely switch to the code view and cut & paste the return statement below the last widget/control block. Can SWT-Designer be modified to be aware of a final return statement and create the widgets before it?

What you describe sounds like a bug in my book. Can you send a class example to support@swt-designer.com? We have nearly completed a major overhaul of the Designer parser for the next release and have fixed several code manipulation errors (so the bug may actualy be fixed).
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 cebarne2 » Mon Oct 27, 2003 11:49 am

I have sent the class that implements an Eclipse property page.
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Postby admin » Mon Oct 27, 2003 8:26 pm

You can also try to add comment like this:
// DESIGNER: Add controls before this line.
before return statement. This will work only for last officially published version.
admin
Moderator
 
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am


Return to SWT Designer

Who is online

Users browsing this forum: Google [Bot] and 1 guest