Programmatically Control Designer Execution

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

Programmatically Control Designer Execution

Postby topherfangio » Tue Mar 25, 2008 8:38 am

Hello,

A while back, I remember reading about a particular function that you could call
that would return true if you were currently in design mode, thus being able to
make decisions about how to progress (such as ignoring null pointers for resources
that cannot be loaded). I cannot seem to find that function again and I was
hoping someone here could help.

My current problem is that I am using a ColorSelector composite and creating a
button from the one it generates, but that does not show up in the designer and
it messes up the grid layout. I would like to simply add a basic button with some
text if we are in designer mode, otherwise, add the full ColorSelector.

Any help would be greatly appreciated.

Topher Fangio
topherfangio
 
Posts: 2
Joined: Tue Mar 25, 2008 8:33 am

Re: Programmatically Control Designer Execution

Postby Eric Clayberg » Tue Mar 25, 2008 11:56 am

Beans.isDesignTime()

true in any GUI builder

false at runtime
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: Programmatically Control Designer Execution

Postby topherfangio » Wed Mar 26, 2008 6:31 am

Perfect, works great.

Thanks for the response!
topherfangio
 
Posts: 2
Joined: Tue Mar 25, 2008 8:33 am

Re: Programmatically Control Designer Execution

Postby Eric Clayberg » Wed Mar 26, 2008 7:45 am

BTW, there is a discussion of this in the Designer FAQ.
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 2 guests