Book a Demo

Author Topic: Folders under classes  (Read 3685 times)

Bill Egge

  • EA User
  • **
  • Posts: 93
  • Karma: +0/-0
    • View Profile
Folders under classes
« on: August 18, 2005, 12:08:09 pm »
I was trying to add a sub folder under a class so that I could create activity diagrams for the individual methods of that class.

I found that I could add a diagram, but could not add a "folder".

Is what I am trying to do the wrong way of doing what I want, or should I create a feature request?

-Bill

JourneymanDave

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: Folders under classes
« Reply #1 on: August 18, 2005, 01:24:00 pm »
Bill, that's a perfectly valid thought process, but the mechanism for what you want to achieve is slightly different in EA than what you hypothesized.

Adding anything to the *class* on the diagram would impy a structural change to the class.  The class is fundamentally ignorant of diagrams, which are really just a convenient way for humans to interpret the architecture.  So, there's not a way to associate the next diagram to the class (although I'm about to make the case that associating a class to another diagram is valid).

Based on my read of what you've asked to do, you'll want to create another type of diagram.  Remember that the Class diagram shows static information about the class itself.  You've indicated that you want to also model behavioral aspects of the class.  This would require a different type of diagram, like an Activity diagram.  Structural and behavioral information can't easily be reflected on the same diagram.

I think the missing piece is how to associate the behavioral diagram with the class you put on the Class diagram.  Thankfully, those clever guys at Sparx have made this a drag-n-drop operation.  Try the following:
1) Open your Activity diagram in the main window (or create one...)
2) Expand the Project View tree to find your class on its original diagram
3) Drag the class icon from the tree onto the Activity diagram; you'll be prompted as to how to paste it (creating the association...)
4) Select "as Instance of Element (Object)" as your option.

I think this will give you what you originally wanted, or something close to it.