Author Topic: How to add existing class to class diagram  (Read 928 times)

RainerQ

  • EA User
  • **
  • Posts: 118
  • Karma: +1/-0
    • View Profile
How to add existing class to class diagram
« on: February 04, 2010, 10:48:06 pm »
Hi

I am currently evaluating EA.
I imported a existing C# project.
On of my first steps now is to create a little class diagram from the imported classes.

Is there a possibility to simply add a existing class to a diagram with out the need to first "find" it in the project browser?

Thanks for help and hints.

Regards
Rainer

ebeb

  • EA User
  • **
  • Posts: 169
  • Karma: +0/-0
    • View Profile
Re: How to add existing class to class diagram
« Reply #1 on: February 05, 2010, 01:00:30 am »
What exactly do you mean by "simply"?  ::)

If you have a well-structured code tree, it souldn't be very hard to find the class you need and "simply" drag it onto the diagram. You could also select multiple classes with shift and drag them onto the diagram.

If this is too complicated, maybe you could elaborate on how you imagine a simpler way. :)

-Jan

RainerQ

  • EA User
  • **
  • Posts: 118
  • Karma: +1/-0
    • View Profile
Re: How to add existing class to class diagram
« Reply #2 on: February 05, 2010, 07:42:35 pm »
Hi Jan,

one "simple" way I could think of is:
-> Context menue
--> Add
---> Existing Class
EA could then provide a list of all classes in the model Listbox from wich I then can Drag/Drop the desired on.

Regards
Rainer

ebeb

  • EA User
  • **
  • Posts: 169
  • Karma: +0/-0
    • View Profile
Re: How to add existing class to class diagram
« Reply #3 on: February 05, 2010, 09:57:46 pm »
Actually, the project browser is the list you are talking about ;) This is just a question of a different workflow. Because if it would work as you described, that what would be in this list box? In a complex model, there could be tons of classes. Then you have a tiny list box and you can scroll till the end of the day.
Then, eventually, you would want to use the project browser!

I don't really see the problem, if you create a new class diagram, the classes you would add are most likely in the same package. So you open that very package in project browser and drag all your classes onto the diagram. This is must faster or in your terms "simpler" than to use the context menu.

In case you don't know where the class is, you could use icon "Find in project browser" from the PB toolbar and enter the name of the class. That EA jumps immediately to the element and you can drag it on to the diagram.

If you want to see a flat view of your classes, right click on the model and then "Show Element List". Unfortunately, you can not float that window so you can not view this window AND your class diagram at the same time.