Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Use custom properties sheet
Use custom properties sheet [message #547656] Mon, 19 July 2010 09:42 Go to next message
Dewas is currently offline DewasFriend
Messages: 21
Registered: March 2010
Location: Toulouse (France)
Junior Member
Hello,

I want to have a new tab in my properties sheet who show just a selection of properties about the selected element in my diagram.

I have look in the gmf gen file the properties sheet entry, but I don't found how to use it to have custom properties with the core properties.

Can somebody help me?


DEWAS Albert
Master Degree in the IUP Intelligent Systems
Trainee to Continental Corporation Toulouse
Re: Use custom properties sheet [message #547674 is a reply to message #547656] Mon, 19 July 2010 10:36 Go to previous messageGo to next message
Robert Wloch is currently offline Robert WlochFriend
Messages: 109
Registered: July 2009
Senior Member
Hi Dewas,

the contents of the "Core"-Tab are controlled by EMF. Hence, you'll need to look into your genmodel file(s):

* Browse to the element's feature that you want to hide.
* Have it shown in the properties view.
* There you'll see two categories "Ecore" and "Edit".
* In the "Edit" category you can set the "Property Type" to what ever you need (writable, read-only, or none).

After you changed that you have to regenerate the edit code in order to see the effect.

Rob
Re: Use custom properties sheet [message #548061 is a reply to message #547656] Tue, 20 July 2010 14:41 Go to previous messageGo to next message
Dewas is currently offline DewasFriend
Messages: 21
Registered: March 2010
Location: Toulouse (France)
Junior Member
Ok, thanks Rob.
It should be convenient for me at the moment, I can select at least the elements which I wish to show.

It's a pity that this choice will apply to all the diagrams and sub-diagram connected to my genmodel.
Is it possible to use several genmodel for the same model ecore and to keep synchronized my several diagrams?


DEWAS Albert
Master Degree in the IUP Intelligent Systems
Trainee to Continental Corporation Toulouse
Re: Use custom properties sheet [message #548205 is a reply to message #548061] Wed, 21 July 2010 05:53 Go to previous message
Robert Wloch is currently offline Robert WlochFriend
Messages: 109
Registered: July 2009
Senior Member
Dewas wrote on Tue, 20 July 2010 10:41
Ok, thanks Rob.
It should be convenient for me at the moment, I can select at least the elements which I wish to show.

It's a pity that this choice will apply to all the diagrams and sub-diagram connected to my genmodel.
Is it possible to use several genmodel for the same model ecore and to keep synchronized my several diagrams?

I'm afraid it's not possible as the genmodel generates your "global" domain model.

But you can change the XXXPropertySection.java that's generated into your diagram plugin ("sheet" package). Its getPropertySource() method should return different IPropertySources for your diagrams. The default is to use EMF's adapter factory to create the IPropertySource depending on the genmodel configuration.
What you probably should do there is to ignore the getAdapterFactory(object) call and use your own diagram specific custom factory to create the IPropertySource. Have a look at your generated XXXItemProviderAdapterFactory in your EMF edit plugin to see how it's done.

Rob
Previous Topic:Ports/anchors with Affixed Parent Side
Next Topic:Having problems integrating new model in ecore
Goto Forum:
  


Current Time: Sat May 25 13:29:30 GMT 2024

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

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

Back to the top