Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Editable emf objects properties
Editable emf objects properties [message #425837] Tue, 09 December 2008 18:24 Go to next message
Eclipse UserFriend
Originally posted by: swt.magellium.fr

Hello all,

I'd like the properties view to be non-editable for my emf objects.

I don't know which way of doing this is the simplest, but I can think of
an easy solution : Make EMF generate the edit code so that all
"propertyDescriptors" are created with the "settable" property set to
"false" (instead of true...)
Is there a genmodel property which does this ? (I can't find one)

Or maybe there's a simpler way ?? Maybe overriding the Properties View
Part so that it becomes non-editable ?

The usage of dynamic templates seems too complex to do such a small job...

Thanks in advance !
Stephane
Re: Editable emf objects properties [message #425848 is a reply to message #425837] Wed, 10 December 2008 06:30 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
SWT wrote:

> Is there a genmodel property which does this ? (I can't find one)

Look harder :-p
Re: Editable emf objects properties [message #425852 is a reply to message #425837] Wed, 10 December 2008 08:02 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6481
Registered: July 2009
Senior Member
Stephane,

In the Genmodel properties view each model feature has a "Property Type"
property at the bottom of the list. You can set it to "Read-Only".

Cheers
/Eike

----
http://thegordian.blogspot.com



SWT schrieb:
> Hello all,
>
> I'd like the properties view to be non-editable for my emf objects.
>
> I don't know which way of doing this is the simplest, but I can think
> of an easy solution : Make EMF generate the edit code so that all
> "propertyDescriptors" are created with the "settable" property set to
> "false" (instead of true...)
> Is there a genmodel property which does this ? (I can't find one)
>
> Or maybe there's a simpler way ?? Maybe overriding the Properties View
> Part so that it becomes non-editable ?
>
> The usage of dynamic templates seems too complex to do such a small
> job...
>
> Thanks in advance !
> Stephane


Re: Editable emf objects properties [message #425872 is a reply to message #425852] Wed, 10 December 2008 16:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: swt.magellium.fr

Eike,

I know that but then the feature will be read-only !
I just want it to be read-only *in the properties view*, that is to say
at the "edit" level, in the ItemProviderAdapter...

Regards,
Stephane


Eike Stepper wrote :
> Stephane,
>
> In the Genmodel properties view each model feature has a "Property Type"
> property at the bottom of the list. You can set it to "Read-Only".
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
>
>
>
> SWT schrieb:
>> Hello all,
>>
>> I'd like the properties view to be non-editable for my emf objects.
>>
>> I don't know which way of doing this is the simplest, but I can think
>> of an easy solution : Make EMF generate the edit code so that all
>> "propertyDescriptors" are created with the "settable" property set to
>> "false" (instead of true...)
>> Is there a genmodel property which does this ? (I can't find one)
>>
>> Or maybe there's a simpler way ?? Maybe overriding the Properties View
>> Part so that it becomes non-editable ?
>>
>> The usage of dynamic templates seems too complex to do such a small
>> job...
>>
>> Thanks in advance !
>> Stephane
Re: Editable emf objects properties [message #425875 is a reply to message #425872] Wed, 10 December 2008 17:38 Go to previous message
Eclipse UserFriend
Originally posted by: swt.magellium.fr

I'm sorry... You're true.
The "Property Type" is for the ItemProvider. And it has nothing to do
with the "changeable" or "unsettable" properties of the feature...

I don't know why but I was searching in the class properties, so that
all features of the class become either editable or read-only. But it's
logic for that property to exist for each feature !
My mistake...

Regards,
Shameful Stephane

SWT wrote :
> Eike,
>
> I know that but then the feature will be read-only !
> I just want it to be read-only *in the properties view*, that is to say
> at the "edit" level, in the ItemProviderAdapter...
>
> Regards,
> Stephane
>
>
> Eike Stepper wrote :
>> Stephane,
>>
>> In the Genmodel properties view each model feature has a "Property
>> Type" property at the bottom of the list. You can set it to "Read-Only".
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>>
>>
>>
>> SWT schrieb:
>>> Hello all,
>>>
>>> I'd like the properties view to be non-editable for my emf objects.
>>>
>>> I don't know which way of doing this is the simplest, but I can think
>>> of an easy solution : Make EMF generate the edit code so that all
>>> "propertyDescriptors" are created with the "settable" property set to
>>> "false" (instead of true...)
>>> Is there a genmodel property which does this ? (I can't find one)
>>>
>>> Or maybe there's a simpler way ?? Maybe overriding the Properties
>>> View Part so that it becomes non-editable ?
>>>
>>> The usage of dynamic templates seems too complex to do such a small
>>> job...
>>>
>>> Thanks in advance !
>>> Stephane
Previous Topic:Reflective API (eSet) in multiple (parent/child) models
Next Topic:Re: CDO/Teneo Server initialization issue with HibernateStore
Goto Forum:
  


Current Time: Fri Feb 21 14:06:05 GMT 2020

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

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

Back to the top