Skip to main content


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 17:50 Go to next message
Eclipse UserFriend
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 10:28 Go to previous messageGo to next message
Alberto  is currently offline Alberto Friend
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 16:21 Go to previous messageGo to next message
Eclipse UserFriend
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 09:32 Go to previous messageGo to next message
Eclipse UserFriend
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 09:53 Go to previous message
Eclipse UserFriend
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 10:28 Go to previous message
Alberto  is currently offline Alberto Friend
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 16:21 Go to previous message
Eli Lato is currently offline Eli LatoFriend
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 09:32 Go to previous message
Eclipse UserFriend
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 09:53 Go to previous message
Eli Lato is currently offline Eli LatoFriend
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: Fri Apr 19 12:39:52 GMT 2024

Powered by FUDForum. Page generated in 0.02947 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top