Book a Demo

Author Topic: How to manage a moved class file  (Read 2637 times)

flitjens

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
How to manage a moved class file
« on: August 25, 2022, 10:37:12 pm »
My question is fairly simple and hopefully the answer is just as simple too.

I work on a C# project with a lots of files, namespaces etc. It happens quite frequently that file locations change to different folders or even projects when one class is for example moved to a different library.

My question is the following: How to manage these refactoring issues when I imported the code into EA?

For example: I have a solution containing two libraries:

LibraryA contains class1
LibraryB contains class2

I imported the code and the model show two packages, one for each library, and each package containing their class. Now in VisualStudio I moved class1 to LibraryB.

When I press Ctrl-F12 on class1 I do not see any code associated with it. I tried to synchronize the root package which ideally should have moved Class1 to LibraryB, however this was not the case when I synchronized the package using reverse engineer (source -> model) using timestamps and include child packages.

I don't want to re-import the moved class since it causes problems with already created diagrams.

Summarized it are two questions:
  • What is the prefered method of handling these refactoring actions
  • How can I change the associated file location of a class.

Kind regards and thanks in advance for all help.