Book a Demo

Author Topic: Moving operations / methods and their source code  (Read 3530 times)

zipperle

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Moving operations / methods and their source code
« 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
« Last Edit: August 27, 2009, 04:38:56 pm by zipperle »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Moving operations / methods and their source c
« Reply #1 on: August 27, 2009, 04:46:58 pm »
No, sorry :'(

Geert

zipperle

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Moving operations / methods and their source c
« Reply #2 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?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Moving operations / methods and their source c
« Reply #3 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

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Moving operations / methods and their source c
« Reply #4 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.
No, you can't have it!