Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to add property in existing SWT component(Want to add property for components and should get updated through right click and Advanced Proprty Tab)
How to add property in existing SWT component [message #653826] Fri, 11 February 2011 08:00 Go to next message
ramakant  is currently offline ramakant
Messages: 11
Registered: January 2011
Junior Member
I have a XWT project worksapce and adding few property in componets. Can some one guide me on this?

Description:
I want to add a new property for the SWT components and this property should get linked with right click on component and in Advanced Tab of properties. Means value should get modified through these two ways.

e.g. Under SWT controls we have button component, now I want a add a new property ie. "Visibility" 'either True or False'. Can some one tell me the process how to achieve this.

Till now I have added the property value in StyleGroup.java file. Property is getting listed on right click and Advanced Tab but its update is not working. Advanced Tab always shows the Visible as False even after doing a check in checkBox for this.

Code Added in StyleGroup.java:
public static final StyleGroup VISIBLITY = new StyleGroup(new Class[] { Button.class, ToolItem.class }, "Visiblity",new String[] { "VISIBLE", "INVISIBLE" });

Please help me on this. Thanks in advance.
Re: How to add property in existing SWT component [message #654007 is a reply to message #653826] Sat, 12 February 2011 14:37 Go to previous messageGo to next message
ramakant  is currently offline ramakant
Messages: 11
Registered: January 2011
Junior Member
Can someone please help me on this.. I m stuck Crying or Very Sad
Re: How to add property in existing SWT component [message #658650 is a reply to message #653826] Wed, 09 March 2011 06:12 Go to previous message
Yves YANG is currently offline Yves YANG
Messages: 687
Registered: July 2009
Senior Member
"ramakant" <ramakant22@gmail.com> wrote in message
news:ij3bhf$cf2$1@news.eclipse.org...
> I have a XWT project worksapce and adding few property in componets. Can
> some one guide me on this?
>
> Description:
> I want to add a new property for the SWT components and this property
> should get linked with right click on component and in Advanced Tab of
> properties. Means value should get modified through these two ways.
>
> e.g. Under SWT controls we have button component, now I want a add a new
> property ie. "Visibility" 'either True or False'. Can some one tell me the
> process how to achieve this.
>

If you respect the Java Bean, it will get supported automatically since XWT
relies on the automapping between Java Model and XML.

> Till now I have added the property value in StyleGroup.java file. Property
> is getting listed on right click and Advanced Tab but its update is not
> working. Advanced Tab always shows the Visible as False even after doing a
> check in checkBox for this.
>
> Code Added in StyleGroup.java:
> public static final StyleGroup VISIBLITY = new StyleGroup(new Class[] {
> Button.class, ToolItem.class }, "Visiblity",new String[] { "VISIBLE",
> "INVISIBLE" });
>

I cannot get your point here.

Best regards
Yves YANG
> Please help me on this. Thanks in advance.
Previous Topic:org.eclipse.e4.core.di.InjectionException: Could not find satisfiable constructor
Next Topic:e4.1 M6 missing requirements
Goto Forum:
  


Current Time: Mon Jul 28 10:22:37 EDT 2014

Powered by FUDForum. Page generated in 0.03774 seconds