Enterprise Architect object diagram refactoring

2.3k Views Asked by At

I've created class diagram. Each class has its attributes and operations.

Then I created Object diagram. On this diagram I put instances of my classes. And I define Run State for each attribute.

During several iterations we have some of the attributes renamed or deprecated or deleted. Is there a way to refactor class diagrams in a right way? So that when I rename an attribute of a class in class diagram it is also changed in object diagram(where this class was instantiated)? I assume there should be some kind of refactoring feature in EA, cause renaming is just one of the refactoring tasks.

I use Sparx Enterprise Architect 8.0

1

There are 1 best solutions below

8
observer On

EA actually does that for you. Just open your object diagram first. Then select your class in the project browser and drag it onto your object diagram. EA will then ask you how to paste it. Select "instance (object)". Any changes that you make to the class afterwards should immediately be reflected in any instance (object). I created a test case with a class named "class". After instantiating it, I renamed the int property from "sdf" to "sdff". The corresponding object property was changed by EA. Also a deleted property was deleted from the instances automagically.

Tested with EA 10 (I don't have v8 installed but it is very likely to work the same way).