Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » [Property Views] Customize property Views to display containment features.
[Property Views] Customize property Views to display containment features. [message #1751863] Mon, 16 January 2017 10:39 Go to next message
Aurelien Didier is currently offline Aurelien DidierFriend
Messages: 13
Registered: April 2015
Junior Member
I use the new Sirius property views for my editor, I have seen that the input.emfEditServices(self).getEStructuralFeatures() allows to get all the references except transient, derived and contaiment features.

However, there is a particular case where I need to display my containment feature in the property views.

How can I do that?

Regards,

Aurélien

Re: [Property Views] Customize property Views to display containment features. [message #1751873 is a reply to message #1751863] Mon, 16 January 2017 11:51 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Hi,

input.emfEditServices(self) is just a helper for easy access to common queries and EMF Edit integration (access to the IItemLabelProvider & co). In an interpreted expression in your properties views definitions, you have access to all the AQL language, so you can create expressions like this:

aql:self.eClass().eAllStructuralFeatures->select(f | f.containment)


or any variant. Note however that this kind of "meta-level" query is needed for the default rules (where you probably found the expression you mention) because they must be written to be completely generic. In concrete cases where you know the metamodel you may not need that and can simply refer to the actual concrete feature(s) you are interested in (e.g. aql:self.myFeature).

Regards,
Pierre-Charles David

--
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: [Property Views] Customize property Views to display containment features. [message #1752635 is a reply to message #1751873] Wed, 25 January 2017 16:50 Go to previous message
Aurelien Didier is currently offline Aurelien DidierFriend
Messages: 13
Registered: April 2015
Junior Member
Hi,

Thanks for your answer. Before posting the message i tried with 'aql:self.eClass().eAllStructuralFeatures' just to see if I could see the containment that way.

My mistake was that I had redefined the default properties in two differents odesign. However, it seems that only one of them was used (and I was modifying the other Confused I don't know if it was because the second odesign was wrong or not).

Anyway, thanks for you answer, it helped me a lot to solve my problem and to understand what was the point of this 'emfEditServices'.

Regards,

Aurélien
Previous Topic:Delete aird file from workspace
Next Topic:Create a node connected to an edge.
Goto Forum:
  


Current Time: Sat Apr 27 05:21:26 GMT 2024

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

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

Back to the top