0

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.

Ricardo Rocha
  • 14,612
  • 20
  • 74
  • 130
  • Why did you post this question on UML tag ? What is the link between your question and UML ? – granier Nov 04 '17 at 20:10
  • @granier because the code that i'm presenting in here is to convert a requirements model to an use case model. Concluding, most of atl transformations is to transform models (for exemple, use case to class) and this is modeling and uml – Ricardo Rocha Nov 04 '17 at 20:14
  • You need to clearly indicate what you are asking, what it is related to, what you have done, and what you expect to find out from someone here. – Chris Sharp Nov 04 '17 at 20:37
  • So your question is more related to model transformation if i understood correctly. Is there an MDA tag ? Model transformation is not exactly related to UML and there are tools for that. – granier Nov 04 '17 at 22:37
  • @granier there is not such tag (I think). But I asked if some could create a tag ATL-transformation it will be appreciated because there is not this tag – Ricardo Rocha Nov 04 '17 at 22:51
  • @Ricardo there is a MDA tag : easy to find that ... So your question is more dedicated to mda : change your tag. And i see that you use eclipse, there are mda plugins for eclipse. – granier Nov 04 '17 at 22:56
  • @granier you suggests as well delete the eclipse tag and the java tag? – Ricardo Rocha Nov 04 '17 at 23:01
  • @ChrisSharp I contextualize the issue with an example from a tutorial. I hope it is more clear know. If not, please let me know. Thank you – Ricardo Rocha Nov 04 '17 at 23:02
  • no just UML or at least at the mda tag. i am not an expert about model transformation, i know just uml2text a little and an eclipse plugin for that – granier Nov 04 '17 at 23:03
  • @granier Thank you for your input. I already change so can be more clear for people what area this match – Ricardo Rocha Nov 04 '17 at 23:04
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/158254/discussion-between-granier-and-ricardo-rocha). – granier Nov 05 '17 at 11:19

0 Answers0