Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: zipperle on August 27, 2009, 04:37:07 pm

Title: Moving operations / methods and their source code
Post by: zipperle on August 27, 2009, 04:37:07 pm
Hello,

I will try to explain what i am trying to do. I am currently refactoring our software. There are a some classes which are required to split into several classes. What I want to do is, create a new class in model and move an operation from the original class to the new one. This is no problem, but I want the method´s implementation (source code) to be moved too. That would be great and would save me a lot of time avoiding copy & paste the source code manually :) But all I tried (generate code, etc.) did not work. Is there a way to realize this?

Thanks,

Christian
Title: Re: Moving operations / methods and their source c
Post by: Geert Bellekens on August 27, 2009, 04:46:58 pm
No, sorry :'(

Geert
Title: Re: Moving operations / methods and their source c
Post by: zipperle on August 27, 2009, 04:57:19 pm
It´s a pity :(
Do you think this is an uncommon feature? Or is there a chance that this will be realized in future releases?
Title: Re: Moving operations / methods and their source c
Post by: Geert Bellekens on August 27, 2009, 05:05:31 pm
I think the chances for that feature to make it in the next few releases is pretty slim.
I believe implementing such a feature would mean a serious change in the whole code generation architecture. As far as I understand EA does not keep track of the relation between an operation in code and an operation in the model, so It wouldn't know if an operation had moved, or was just deleted in one class and created in another.

Geert
Title: Re: Moving operations / methods and their source c
Post by: «Midnight» on August 27, 2009, 10:07:45 pm
Didn't someone recently post a reference to an EA add-in for refactoring systems? I think it helped for things like moving operations (perhaps features in general) between classes.

Search the forum, going back a year (it was probably more than 3 months ago). I think the add-in project is on SourceForge or something similar. Remember to use the Search button on the left-side menu just above the forum page contents. [The one between Help and My Center.] The 'quick search' (the "Search the Forum" and magnifying glass button) will not allow you the necessary flexibility.