Conditional style for EMF Map entries as Nodes in List container [message #1766828] |
Tue, 27 June 2017 12:53 |
Eclipse User |
|
|
|
Hello everyone,
Configuration :
Eclipse
Version: Neon.3 (4.6.3)
Build id: M20170301-0400
Sirius
4.1.4.201703211416
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 :
https://wiki.eclipse.org/EMF/FAQ#How_do_I_create_a_Map_in_EMF.3F
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 :
ServiceInformationsContainer
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 : [self.target.eGet('key') = 'cpu' and self.target.eGet('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" :
[ self.name.contains('cpu') and self.name.contains('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 !
|
|
|
Powered by
FUDForum. Page generated in 0.08040 seconds