|
Re: Read-only properties without ItemPropertyDescriptor [message #1728688 is a reply to message #1728643] |
Wed, 06 April 2016 12:51 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Mathieu,
Comments below.
On 06.04.2016 14:32, Mathieu Cartaud wrote:
> Hi everyone,
>
> I have two editors used to open and edit my models. With one of those
> editors, I want to have some properties of my objects read-only: If an
> object of the model have non-containment references to an object. And
> if this latter object is defined in a metamodel located in a different
> resource than the metamodel of root of the model, then it should not
> be editable.
I'm not sure I follow that!
>
> The ItemPropertyDescriptor doesn't seems to fit my needs and it is
> attached to the objects so it will affect all editors (as far as I know)
Each editor generally has its own item providers...
>
> Is there a way of doing this?
The org.eclipse.emf.edit.provider.ItemPropertyDescriptor.isSettable is
referenced only by
org.eclipse.emf.edit.provider.ItemPropertyDescriptor.canSetProperty(Object)
so perhaps you can embed the logic that determine if the property is
editor or not in a specialized version of that method.
>
> Thanks for your time
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02538 seconds