Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » How do I make a read-only property?
How do I make a read-only property? [message #144351] Wed, 02 April 2008 13:50 Go to next message
Eclipse User
Originally posted by: eli_lato.hotmail.com

I have a field named x.

I want it to be visible in the Property Sheet only when the designer selects "Show read only properties".

I want to make it a read-only field, so I created a getX, but not a setX.

But when I tell getPropertyDescriptors to add the property, it throws because I have no setX.

PropertyDescriptor doesn't seem to have a setter to specify readOnly. Or did I miss it?

How do I create a readOnly property?

Thanks,
Eli
Re: How do I make a read-only property? [message #144379 is a reply to message #144351] Thu, 03 April 2008 06:28 Go to previous messageGo to next message
Alberto  is currently offline Alberto
Messages: 18
Registered: July 2009
Junior Member
Hi Eli,

I've just read a white paper about a plugin extended from VE and i find
out sth interesting concerning your question:
You can modify the override file of your Bean and add estructural features.
Inside the label addedEObjects you must set the property
changeable="false".
Further information in this doc:
http://www.eclipse.org/vep/WebContent/docs/VEpapers/ulc.pdf

Bye¡
Re: How do I make a read-only property? [message #144388 is a reply to message #144379] Thu, 03 April 2008 12:21 Go to previous messageGo to next message
Eclipse User
Originally posted by: eli_lato.hotmail.com

So far as I can tell, "changeable" is applicable to ULC, not to VE itself. If I'm wrong, please let me know.
Thanks!
Eli
Re: How do I make a read-only property? [message #144458 is a reply to message #144388] Thu, 10 April 2008 05:32 Go to previous messageGo to next message
Eclipse User
Originally posted by: caye5200.yahoo.com.cn

You can modify the BeanInfo file of your Bean
eg:
result[num] = new PropertyDescriptor("x", class,getX,null);

zhaoxc
"Eli Lato" <eli_lato@hotmail.com> wrote in message
news:24842033.8441207239691945.JavaMail.root@cp1.dzone.com...
> So far as I can tell, "changeable" is applicable to ULC, not to VE itself.
> If I'm wrong, please let me know.
> Thanks!
> Eli
>
Re: How do I make a read-only property? [message #144506 is a reply to message #144458] Wed, 16 April 2008 05:53 Go to previous message
Eclipse User
Originally posted by: eli_lato.hotmail.com

Bingo!
Thanks a lot,
Eli
Re: How do I make a read-only property? [message #617028 is a reply to message #144351] Thu, 03 April 2008 06:28 Go to previous message
Alberto  is currently offline Alberto
Messages: 18
Registered: July 2009
Junior Member
Hi Eli,

I've just read a white paper about a plugin extended from VE and i find
out sth interesting concerning your question:
You can modify the override file of your Bean and add estructural features.
Inside the label addedEObjects you must set the property
changeable="false".
Further information in this doc:
http://www.eclipse.org/vep/WebContent/docs/VEpapers/ulc.pdf

Bye¡
Re: How do I make a read-only property? [message #617029 is a reply to message #144379] Thu, 03 April 2008 12:21 Go to previous message
Eli Lato is currently offline Eli Lato
Messages: 35
Registered: July 2009
Member
So far as I can tell, "changeable" is applicable to ULC, not to VE itself. If I'm wrong, please let me know.
Thanks!
Eli
Re: How do I make a read-only property? [message #617037 is a reply to message #144388] Thu, 10 April 2008 05:32 Go to previous message
Eclipse User
Originally posted by: caye5200.yahoo.com.cn

You can modify the BeanInfo file of your Bean
eg:
result[num] = new PropertyDescriptor("x", class,getX,null);

zhaoxc
"Eli Lato" <eli_lato@hotmail.com> wrote in message
news:24842033.8441207239691945.JavaMail.root@cp1.dzone.com...
> So far as I can tell, "changeable" is applicable to ULC, not to VE itself.
> If I'm wrong, please let me know.
> Thanks!
> Eli
>
Re: How do I make a read-only property? [message #617042 is a reply to message #144458] Wed, 16 April 2008 05:53 Go to previous message
Eli Lato is currently offline Eli Lato
Messages: 35
Registered: July 2009
Member
Bingo!
Thanks a lot,
Eli
Previous Topic:NullPointerException
Next Topic:Is the Visual Editor going in the wrong direction?
Goto Forum:
  


Current Time: Thu Jul 24 00:44:45 EDT 2014

Powered by FUDForum. Page generated in 0.05881 seconds