Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Revive public to private
Revive public to private [message #876402] Thu, 24 May 2012 10:26
Davide Rossi is currently offline Davide Rossi
Messages: 5
Registered: July 2009
Junior Member
I'm trying to port the public2private example to the latest ATL and to UML2.
The fix I'm stuck with now is the containment of newly created elements in refining mode.
With the following code

rule ReadOnlyPublicAttribute {
	from
		s : UML!Property (
			(s.visibility = #public) and
			(s.isReadOnly)
		)
	to
		t : UML!Property (
			visibility <- #private
		),

		-- getter
		tg : UML!Operation (
			name <- 'get' + s.name.firstToUpper(),
			visibility <- #public,
			isQuery <- true,
			ownedParameter <- tgr
		),
		tgr : UML!Parameter (
                ...


a new model is created but the getter operations, in the UML model are children of platform instead of being children of the class containing the property (s).
In the original code this was fixed by setting the owner feature which is no more changeable now.
How can this be fixed?

Thanks,
Davide.

[Updated on: Thu, 24 May 2012 10:27]

Report message to a moderator

Previous Topic:ATL collection and Iteration ?
Next Topic:sortng elements in a collection?
Goto Forum:
  


Current Time: Thu Apr 17 14:30:45 EDT 2014

Powered by FUDForum. Page generated in 0.02003 seconds