Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Disable a property in diagram editor(how I can hide/disable a property?)
icon5.gif  Disable a property in diagram editor [message #997408] Mon, 07 January 2013 10:44 Go to next message
Hans Müller is currently offline Hans MüllerFriend
Messages: 2
Registered: January 2013
Junior Member
Hello together,
I am really new in GMF/EMF and I have the following problem:
I am designing an Model editor and want to limit some user actions.
In the Properties view an diagram element has certain properties.
Now I want that the user is not able to change certain properties in this view, but the property has to stay and should not be deleted.
Is there a possibility to hide or disable the combobox/text input or to make a field readonly?

I would be really happy if you could help me.
Thanks
Re: Disable a property in diagram editor [message #997538 is a reply to message #997408] Tue, 08 January 2013 08:35 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi Hans,

this is an EMF related problem. Go to the property in you .genmodel and set its "Property Type" to read only.

Ralph
Re: Disable a property in diagram editor [message #997579 is a reply to message #997538] Tue, 08 January 2013 12:53 Go to previous messageGo to next message
Hans Müller is currently offline Hans MüllerFriend
Messages: 2
Registered: January 2013
Junior Member
Hi Ralph,
thanks for your quick answer Smile
I have found this property and changed it to readonly.
But how do I propagate it to the model editor. I'm using Eugenia to generate the code.
Do you know which steps I have to do, to see the result in the editor finally?

edit:
I want to emphasize that the property should be not settable in the view of the user. I have found that problem in another forum:
eclipsezone.com/eclipse/forums/t116005.html
But there is no solution mentioned.

[Updated on: Tue, 08 January 2013 13:20]

Report message to a moderator

Re: Disable a property in diagram editor [message #998119 is a reply to message #997579] Wed, 09 January 2013 12:05 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi

the GMF Editor uses the generated Edit code. All you need to do is to generate Edit code after setting the property.

Ralph
Previous Topic:Search: Someone who creates a model for me
Next Topic:Validation of root diagram element
Goto Forum:
  


Current Time: Thu Mar 28 23:10:33 GMT 2024

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

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

Back to the top