Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Add an element to a sequence
Add an element to a sequence [message #1808647] Fri, 28 June 2019 07:41 Go to next message
Marshall Charron is currently offline Marshall CharronFriend
Messages: 72
Registered: August 2018
Member
Hi, I have the follwing rule.

rule copyComment {
	from 
		 inAttr1: ModelA!Attr1
	to 
 		com : ModelB!Comment(
			name <- 'anyname',
			value <- 'value1'
		)
		all : ModelB!AssignCom(
			comments <- // How to add com to the comments sequence ?
		)
}



I would like to add "com" to the "comments" sequence how can I achieve that ?

Thanks

[Updated on: Fri, 28 June 2019 07:42]

Report message to a moderator

Re: Add an element to a sequence [message #1808688 is a reply to message #1808647] Fri, 28 June 2019 15:22 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 581
Registered: September 2012
Location: Belgium
Senior Member

You can assign a literal sequence like this:
comments <- Sequence{'com'}

NB this is either added to or assigned to the property depending on the vm you use: see "Assignment/binding semantics" on https://wiki.eclipse.org/ATL/VM_Comparison


Cheers,
Dennis
Previous Topic:no viable alternative at input...
Next Topic:Invalid Context error in ATL
Goto Forum:
  


Current Time: Sat Nov 11 08:19:51 GMT 2023

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

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

Back to the top