enumerated property in custom SWT composite

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

enumerated property in custom SWT composite

Postby smathers » Tue Sep 27, 2005 11:03 am

I've got a custom SWT composite with an enumerated property list that I want to display in a combo box in the properties view. Is this currently possible? If not, are there plans to implement custom properties in the future?
smathers
 
Posts: 5
Joined: Thu Sep 22, 2005 9:45 am
Location: Yakima, WA

Re: enumerated property in custom SWT composite

Postby Eric Clayberg » Thu Sep 29, 2005 6:34 am

smathers wrote:I've got a custom SWT composite with an enumerated property list that I want to display in a combo box in the properties view. Is this currently possible? If not, are there plans to implement custom properties in the future?

This is now supported in the latest v4.1.1 build using custom bean info.

Here's an example...

http://www.instantiations.com/windowbuilderpro/files/enum_example.zip

Image
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: enumerated property in custom SWT composite

Postby smathers » Thu Sep 29, 2005 7:08 am

Man, you guys are good! After updating to the current version, custom BeanInfo now works. You've saved me from having to use VE.
smathers
 
Posts: 5
Joined: Thu Sep 22, 2005 9:45 am
Location: Yakima, WA

re: enumerated property in custom SWT composite

Postby smathers » Fri Sep 30, 2005 12:33 pm

After trying to apply this to my own composite, I discovered that it only works if you name your property "compositeStyle" in the BeanInfo descriptor and name your getter/setter methods in the custom composite accordingly. Thus, there can only be 1 enumerated property per composite. Does this sound correct, or am I missing something?
smathers
 
Posts: 5
Joined: Thu Sep 22, 2005 9:45 am
Location: Yakima, WA

Re: re: enumerated property in custom SWT composite

Postby Eric Clayberg » Fri Sep 30, 2005 6:46 pm

smathers wrote:After trying to apply this to my own composite, I discovered that it only works if you name your property "compositeStyle" in the BeanInfo descriptor and name your getter/setter methods in the custom composite accordingly. Thus, there can only be 1 enumerated property per composite. Does this sound correct, or am I missing something?

No. There was some testing code we had not removed that resulted in that effect.

The latest v4.1.1 build should allow you to use any property name that you want.
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: enumerated property in custom SWT composite

Postby smathers » Sat Oct 01, 2005 10:17 am

Yes, installing the latest v4.1.1 version (9-30-05) fixes the problem. Thanks!
smathers
 
Posts: 5
Joined: Thu Sep 22, 2005 9:45 am
Location: Yakima, WA


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest