Problem when setting image on any control

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

Problem when setting image on any control

Postby hyshyshys » Wed Aug 13, 2008 5:41 am

I'm using WindowBuilder Pro Version: 6.7.0 (Build id: 2008.07.01) and SWT Builder and I have some troubles when I try to assign image icon to any control. Note that these images must be relative to the plugin folder.

Example:

I have a simple viewpart in with a button (Image0).
image0.JPG
My simple viewpart, with a single button
image0.JPG (123.87 KiB) Viewed 587 times


When I select the button and I click on the ellipsis button of the image property the "select image" dialog correctly appeared (see image1). I click on the "relative to plugin" radio button and select the image in my icon folder.
image1.JPG
The "select image dialog" works well.
image1.JPG (33.71 KiB) Viewed 587 times


However, when I press on the OK button, a new dialog appears asking me to select a plugin (see image2) ?!? The list of available plugin is empty and I'm force to cancel the operation so I'm not able to add the image to the control. I tryed this operation on many different control type and I always had the same problem.
image2.JPG
a select plugin dialog appears. This dialog is empty so I'm force to cancel
image2.JPG (19.24 KiB) Viewed 588 times


Moreover, when the images are relative to the source folder, everything works well.

1- Why this dialog appeared?
2- From my point of view, the interface must know that the image is relative to the current plugin and shouldnt asked to specify the plugin...
3- Anyway, if I have to specify again this plugin, how could I have a non empty list in this dialog?

Any help will be appreciate.

Tx.

Vincent
hyshyshys
 
Posts: 37
Joined: Thu Jul 03, 2008 12:27 pm

Re: Problem when setting image on any control

Postby Eric Clayberg » Wed Aug 13, 2008 7:36 am

If you choose "Relative to plugin", you must choose a plugin that has an Activator defined.

The Activator class is needed in order to find the images at runtime relative to the plugin.

The dialog is empty because you presumably have not defined an Activator yet.
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: Problem when setting image on any control

Postby hyshyshys » Wed Aug 13, 2008 9:59 am

Sorry about the stupid question.

Thanks, It works well.

Vincent
hyshyshys
 
Posts: 37
Joined: Thu Jul 03, 2008 12:27 pm

Re: Problem when setting image on any control

Postby Eric Clayberg » Wed Aug 13, 2008 12:38 pm

I'm glad it works.
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