Book a Demo

Author Topic: Misc Class Diagram Issues  (Read 3571 times)

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Misc Class Diagram Issues
« on: October 14, 2007, 02:53:52 pm »
Having achieved a transform of the objects in my Domain Object diagram to the Class model, (see http://www.sparxsystems.com/cgi-bin/yabb/YaBB.pl?board=general;action=display;num=1191600949;start=0 ), I am building some Class diagrams.

The Domain diagram was attributes and no operations since this current application is mostly one that deals with storing data with complex linkages rather than anything that is a complex operation.  Thus, most of the operations are either implied by the attributes or are implied by the implementation requirements.  In the Class diagrams, though, I would like to show the operations, both the generated getters and setters and the others that we will need since we will be generating code at least in part directly from EA.

In this class model, there is a *lot* of connectivity ... just the nature of the problem space.  In particular, there are two classes that are connected to just about everything.  This made for some interesting drawing challenges in the Domain model, helped considerably by defining stereotypes for those two relationships so that I could give the connectors distinctive colors.

Because of the addition of the operations, I don't really want to draw one diagram of the whole thing now since I like to print things on letter paper.  Maybe if my C sized printer were behaving itself, I would consider it, but it's not.  So, I am drawing a series of diagrams, each focused on a different primary class so that one can see the relationships of that class to everything it connects to.

This brings up the first question.  When I drop in one of those heavily connected classes, it naturally shows connections to just about everything else in the diagram.  This is distracting since it isn't the focus of that diagram.  The one way I have found to control this is Right Click, Set Visibility, Hide Connector.  Is this the best way to do this and is it considered kosher?

The second question is that there are a certain number of association classes in this model.  E.g., A and B might be linked with an association that has an association class called something like ABRelationship in order to provide attributes to the relationship.  In the Class diagram, when I put A and B in a diagram together, an association appears as expected, but without the association class.  If I think add the association class to the diagram, it shows no relationship to A, B, or the association between them.  It is as if it has forgotten its role in the transformation.

So, is this expected and how do I reconnect it?  Quick Link doesn't seem to want to connect to the connector.

thomaskilian

  • Guest
Re: Misc Class Diagram Issues
« Reply #1 on: October 14, 2007, 10:41:09 pm »
Quote
This brings up the first question.  When I drop in one of those heavily connected classes, it naturally shows connections to just about everything else in the diagram.  This is distracting since it isn't the focus of that diagram.  The one way I have found to control this is Right Click, Set Visibility, Hide Connector.  Is this the best way to do this and is it considered kosher?

The second question is that there are a certain number of association classes in this model.  E.g., A and B might be linked with an association that has an association class called something like ABRelationship in order to provide attributes to the relationship.  In the Class diagram, when I put A and B in a diagram together, an association appears as expected, but without the association class.  If I think add the association class to the diagram, it shows no relationship to A, B, or the association between them.  It is as if it has forgotten its role in the transformation.

So, is this expected and how do I reconnect it?  Quick Link doesn't seem to want to connect to the connector.

1) Yes. It is the only way and it is kosher. Visibility of connectors is always per diagram and you may switch it on/off via the Relations window. I also have an add-in to toggle e.g. Information Flow and Dependencies.
2) I *think* it has to do with the transformation template. And the only cure would be to go into the template and to change it accordingly. Not sure, though.

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Misc Class Diagram Issues
« Reply #2 on: October 15, 2007, 07:58:39 am »
So, the best way to fix it would be to change the template, but how can I fix it in the generated classes?

thomaskilian

  • Guest
Re: Misc Class Diagram Issues
« Reply #3 on: October 15, 2007, 01:48:15 pm »
Probably by re-generating them with the changed transformation.

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Misc Class Diagram Issues
« Reply #4 on: October 15, 2007, 01:52:35 pm »
Well, I was trying to avoid that since I don't believe there is a reverse transformation to get the changes which have now been made back into the domain model.  In the domain model, being that it was largely conceptual, although probably more aligned with the implementation than is the norm, there were only hints at things like common base classes from which all classes of a certain type inherited core features and behavior.  Post conversion, I have now added these aspects, so I don't really want to go back to the Domain model and regenerate.  It would probably be less work to just blow away the unattached association classes and drop in new ones, but it seems like I should be able to reconnect them, somehow.

thomaskilian

  • Guest
Re: Misc Class Diagram Issues
« Reply #5 on: October 15, 2007, 01:58:28 pm »
I just can recommend add-ins for that kind of job. Also tedious but not as boring as doing it manually.