Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Conditional style for EMF Map entries as Nodes in List container
Conditional style for EMF Map entries as Nodes in List container [message #1766828] Tue, 27 June 2017 16:53
Remy Iroll is currently offline Remy IrollFriend
Messages: 1
Registered: June 2017
Junior Member
Hello everyone,

Configuration :
Version: Neon.3 (4.6.3)
Build id: M20170301-0400

I try to apply a conditional style on nodes that are elements of a list.
I followed the recommandations for building a Map in Ecore :

My ecore model is as below :
ServiceInformations : EClass
EReference (0...*,containement=true) serviceInformations : StringToStringMap

StringToStringMap : EClass
Instance type name : java.util.Map$Entry
key : EString
value : EString

My sirius specification model :

Domain class : System.ServiceInformations
Semantic candidate : feature:serviceInformations
Children presentation : List

SubNode of ServiceInformationsContainer
Domain class : System.StringToStringMap
Semantic candidate : feature:serviceInformations
Styles :
Default : Square grey with black label
Conditional Style : ['key') = 'cpu' and'value') = '10%' /] : Square grey with red label

You can see with the screenshots that the default style works great.
But the conditional style is not working, although the expression is evaluate as "true" when I enter the expression in the "Interpreter" view (with the list item "cpu : 10%" is selected). The following expression is also evaluate as "true" :
['cpu') and'10%')/]
but it is more a workaround...

My problem is that the list item "cpu : 10%" is not in red in my diagram.
I try to delete the diagram, and regenerate it but it doesn't work.

Thanks for your help !

Previous Topic:Changing the default label provider of the Model Explorer
Next Topic:A node is source of a relation only once
Goto Forum:

Current Time: Mon Apr 19 01:17:33 GMT 2021

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

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

Back to the top