creating a RULE just to rename a ClassUNIT [message #1421444] |
Thu, 11 September 2014 11:23 |
Rafael Durelli Messages: 72 Registered: September 2012 |
Member |
|
|
Hello,
i'm new to ATL so sorry for any dumb questions. First let me contextualize what I like to do. I'm working with an instance of the KDM, which was generated by MODisco. I would like to use this instance of KDM and create a rule in ATL to rename an specifies ClassUnit. I tried the code below. But the this code runs and creates a separate ClassUnit excluding all other elements of the KDM.
-- @nsURI MM=http://www.eclipse.org/MoDisco/kdm/code
-- @nsURI MM1=http://www.eclipse.org/MoDisco/kdm/code
module teste;
create OUT : MM1 from IN : MM;
rule renameClass {
from
s : MM!ClassUnit (s.name = 'Client')
using {
newName : String = 'newName';
}
to
t : MM1!ClassUnit (
name <- newName
)
}
Does anyone know how to rename a element (ClassUnit) and just keep the other without change after the transformation?
Could you show me a basic example?
Thank you so much.
[Updated on: Thu, 11 September 2014 11:28] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04436 seconds