Skip to main content


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 KAMDEMFriend
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 BruneliereFriend
Messages: 674
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, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
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: Tue Apr 23 07:51:39 GMT 2024

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

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

Back to the top