Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Conditional Style using Enumeration Type
Conditional Style using Enumeration Type [message #1698793] Wed, 17 June 2015 21:49 Go to next message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
Hi,

I have a question on a conditional style.
Like the following image, "Softgoal" has a "label:SatisficingLabelType" which is an Enum type containing "Undecided", "Satisficed", and etc. I want to show node style depending on the label value of a Softgoal node. In a conditional style, how shoud I write a query depending on the value of the label? I tried to use [self.label.toString.matches('Satisficed')=true/], but it does not work.
Could someone help me?
Thank you so much.

Best Regards,
Eunjung Park
Re: Conditional Style using Enumeration Type [message #1698798 is a reply to message #1698793] Wed, 17 June 2015 22:03 Go to previous messageGo to next message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
Hi,
I could figure out.
I should have used [self.label.toString().matches('Satisficed')=true/].
Thanks.

Eunjung Park
Re: Conditional Style using Enumeration Type [message #1698820 is a reply to message #1698798] Thu, 18 June 2015 07:35 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Le 18/06/2015 00:03, eunjung park a écrit :
> Hi,
> I could figure out.
> I should have used [self.label.toString().matches('Satisficed')=true/].
> Thanks.
>
> Eunjung Park

As explained on a previous post [1] and on the Acceleo wiki [2], you can
test an EEnum typed attribute as shown in the following Acceleo expression:
[self.label = SatisficingLabelType::Satisficed'/]

:: is the qualifier separator in Acceleo MTL.

Regards
--
Maxime - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1]
https://www.eclipse.org/forums/index.php/m/1695955/?srch=enumeration#msg_1695955
[2]
https://wiki.eclipse.org/Acceleo/FAQ#How_do_I_compare_data_to_an_enumeration_value.3F


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Conditional Style using Enumeration Type [message #1699071 is a reply to message #1698820] Sat, 20 June 2015 08:56 Go to previous message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
Hi Maxime.

Thank you so much.
I can use right expression.
Thanks again.

Best Regards,
Eunjung Park
Previous Topic:Is it possible to show edges in a container?
Next Topic:Composite Layout
Goto Forum:
  


Current Time: Tue Apr 23 09:37:02 GMT 2024

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

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

Back to the top