Book a Demo

Author Topic: Showing base classes/interfaces in the title area  (Read 4255 times)

Mitch

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Showing base classes/interfaces in the title area
« on: November 10, 2006, 01:36:54 pm »
When I import source code, I don't always import all of the base classes. As a result, when a class is on a diagram, and its base class was not imported, EA writes the name of the missing base class into the top right corner of the title area of the class. This is nice behavior.

However, if I subsequently import the base class, EA does not show the base class in the title area. Instead I need to drag the base class onto the diagram. This wastes space, and I don't really need the details of the base class on that particular diagram.

Is there anyway to tell EA to show the base class in the title area even if it know about the base class?

Thanks,

Mitch

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Showing base classes/interfaces in the title a
« Reply #1 on: November 10, 2006, 03:53:01 pm »
AFAIK there is no such option Mitch.

However, I stand to be corrected - anyone out there know about this?

If nobody can come up with anything, or it is confirmed that this cannot be done, IMHO this would make an excellent feature suggestion.
No, you can't have it!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Showing base classes/interfaces in the title a
« Reply #2 on: November 10, 2006, 06:47:22 pm »
Hi Mitch,

Do you have the
  • Show Additional Parents[/b][/color][/font] checkbox in the Diagram properties Checked?

    If not, then that's probably the cause.

    If yes, then when you drag the newly imported class on the diagram - does the Generalization relationship automatically appear?
    If it does, then if you remove the parent class from the diagram, does the parent classes name appear?

    If so, then it's a bug - formally report it.  

    EA stores the text (without context) of the name of the unknown parent class in a special column in the t_object table (GenLinks). So... for example, if you manually add a class of the same name, EA WON'T establish a Generalization link to it.  

    Now, this is reasonable, due to the lack of context in the original import.  You have to manually make the link to tell EA about the Generalization.  In fact, even if you make the link, you have to manually delete the original (deferred) link in the Set Parents and Interfaces Dialog [Ctrl+I].  I would argue that EA should at least check to see if a deferred reference to a class of the same name exists and ask you if it should unify the two references.

    In order to obtain better coupling, you'll probably need to go to one of the IDE integration products from Sparx (like VS2005, Eclipse, VS2003) which can supply more context about the relationships.  Some are at additional cost.


    HTH,
    Paolo
    [size=0]©2006 Paolo Cantoni, -Semantica-[/size]
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Mitch

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Showing base classes/interfaces in the title a
« Reply #3 on: November 13, 2006, 06:42:50 am »
Quote
Hi Mitch,

> Do you have the
  • Show Additional Parents[/b][/color][/font] checkbox in the Diagram properties Checked?

    Yes, it is set to show additional parents.

    >If yes, then when you drag the newly imported class on the diagram - does the Generalization relationship automatically appear?

    Yes, EA recognizes that the newly imported class is the real parent of the existing class.

    > If it does, then if you remove the parent class from the diagram, does the parent classes name appear?

    Yes, now the "addtional parent" does appear. Exactly what I wanted. I guess EA just needed a little "push".


    > HTH,

    It definitely did. Thanks, Mitch

    >Paolo
    [size=0]©2006 Paolo Cantoni, -Semantica-[/size]


Mitch

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Showing base classes/interfaces in the title a
« Reply #4 on: November 13, 2006, 07:38:25 am »
One more followup. I noticed that Interfaces are not considered "additional parents" (and therefore NOT displayed with the class when it is not on the diagram).

Is this the intention? Or a bug?

Is there a way to show the interface implemented by a class other than placing the interface element onto the diagram?

Mitch