Common GUI for both PlugIn and StandAlone app

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

Common GUI for both PlugIn and StandAlone app

Postby P38 » Mon Mar 07, 2011 3:02 pm

We have designed a window as part of an eclipse plug-in. It is implemented in the ViewPart method of the View class.

We want to use this in both the Plug In and a stand-alone SWT windows app.

When we moved all of the GUI code to another class and called it from ViewPart, the Design page in SWT designer becomes blank.

We've done this kind of thing before with reusable little chunks of GUI.

What do you suppose our problem is?
P38
 
Posts: 8
Joined: Wed Feb 09, 2011 11:35 am

Re: Common GUI for both PlugIn and StandAlone app

Postby Eric Clayberg » Mon Mar 07, 2011 4:01 pm

It sounds like your new class is not a subclass of a known UI type.

Based on what you describe, your new UI class should be a subclass of Composite.

In SWT, "reusable little chunks of GUI" should ideally be implemented as Composites.

As an alternative, you could also create a Factory class.
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