Skip to main content


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 14:26
Davide Rossi is currently offline Davide RossiFriend
Messages: 22
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 14:27]

Report message to a moderator

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


Current Time: Fri Apr 19 11:32:41 GMT 2024

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

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

Back to the top