Book a Demo

Author Topic: Automatic adjust of operation of realization  (Read 2860 times)

dagraf

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Automatic adjust of operation of realization
« on: November 25, 2008, 06:36:04 pm »
Hi,

I'd like to write an add-in which handles adjustment of operation names of realization. If operations OpA and OpB from ClassA are realized by ClassB, ClassB has the operations OpA and OpB. When I now rename OpA to OperationA from ClassA my add-in has to rename this function in ClassB.
Now my problem is that each function has its own GUID and there is no relation between the functions.  :-/ Has anyone an idea how to handle this?

Thanks for your answers!  :)

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Automatic adjust of operation of realization
« Reply #1 on: November 25, 2008, 07:40:25 pm »
There's no relation indeed. That's why I think EA's inbuilt function to add realizing or overriding operations is worthless.

You can roll your own though, and don't even need an AddIn. In the Settings-UML dialog, tab "Tagged Value Types", you can define a type, e.g. "RealizationRef", and enter

Code: [Select]
Type=RefGUID;
Values=Operation;

in the detail field.

Then you can give each realizing operation a tagged value of type RealizationRef which points to the operation it realizes.

Of course you can write an AddIn to replace the "Element-Advanced-Overrides & Implementations" menu, but then you'll need to roll you own dialog with operation selection as well.