Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Problem with Helper
Problem with Helper [message #1065572] Wed, 26 June 2013 14:24 Go to next message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEM
Messages: 96
Registered: April 2013
Member
helper context UML!Class def : isDataType() : Boolean =
	if( self.getKeywords()<>'DataType' ) then
		false
	else
		true
	endif;

or
helper context UML!Class def : isDataType() : Boolean =
	if( self.getKeywords()='DataType' ) then
		true
	else
		false
	endif;

rule ClassType{
	from
		c : UML!Class (c.isDataType())
	to 
		ct : XsdEcore!ClassType(
			comment <- c.ownedComment		
		)
}


The problem Is that it does work properly and I don't know what wrong.
Can you help me please?

[Updated on: Wed, 26 June 2013 14:36]

Report message to a moderator

Re: Problem with Helper [message #1065591 is a reply to message #1065572] Wed, 26 June 2013 15:28 Go to previous message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 604
Registered: July 2009
Senior Member
Have you tried something simpler such as:
helper context UML!Class def : isDataType() : Boolean =
     self.getKeywords()='DataType'

Also, this depends on what is returned by the getKeywords() helper (you should check this).


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Previous Topic:add a new attributes to the new model
Next Topic:How to specify in the rule that one element contain another
Goto Forum:
  


Current Time: Thu Oct 02 02:26:01 GMT 2014

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

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