ATL transformation: out (transformed) file keep the changes

156 views Asked by At

I have the following .atl file:

-- @atlcompiler emftvm 

-- @path Requirements=/ATL Project/metamodels/requirements.ecore
-- @path UseCase=http://www.eclipse.org/uml2/5.0.0/UML

module requirement2usecase;
create OUT : UC  from IN : MMRequirements;

rule RequirementModel2UseCase {
    from
        s: MMRequirements!Model
    to
        t: UC!Model (
            name <- s.title,
            packagedElement <- s.groups->select(x | x.oclIsKindOf(MMRequirements!RequirementGroup))
        ) 
}

The transformation file that is generated by this code, always creates a new file, even if there is a file with the same name at the same location.

Sometimes I want to change the generated file, but when I run the .atl file again, I will loose that changes;

My question is if there is a way to change or the code or the runner configuration so I could solve this problem.

Note: if someone could create the tag ATL-transformation it will be appreciated

[EDIT:]

I will contextualize this issue with this tutorial

If you check the Running the transformation chapter, you see that, after the transformation, it is generated a .xmi file. After the transformation, I want to change the file and save that changes. But if I transform again the instance by using the metamodels (.encore) files I will loose my changes on .xmi file. It seams that the older file is deleted and replaced by the new file generated.

What i want is to avoid the deletion of the file, so I can manage to keep the changes that "by hand" I did.

0

There are 0 answers