| View previous topic :: View next topic |
| Author |
Message |
marton_sigmond
Joined: 13 Nov 2007 Posts: 10 Location: Hungary
|
Posted: Wed Nov 21, 2007 1:46 pm Post subject: class diagram - same class/interface more than once |
|
|
If I am about to insert a class/interface into a diagram (popup->Insert->Class/Interface), and that type already exists in that diagram, I get the following error message: The type "TypeName" exists in this diagram.
This is a very serious limitation.
Please change it.
Thanks,
Marton |
|
| Back to top |
|
 |
dominiksh
Joined: 18 Jun 2007 Posts: 5
|
Posted: Thu Nov 22, 2007 9:54 am Post subject: |
|
|
| I agree with Marton. The possibility to insert a class (interface, enum) into a diagram more than once would be really helpful, especially when working with large diagrams. |
|
| Back to top |
|
 |
yves.yang Site Admin
Joined: 04 Aug 2006 Posts: 462
|
Posted: Thu Nov 22, 2007 10:07 am Post subject: |
|
|
Hi,
We just control the unicity of the type in a package. I cannot see the problem. You can put other class, interface and enum more than once if the name is differnent. Or I misunderstand your point.
Best regards
Yves YANG |
|
| Back to top |
|
 |
marton_sigmond
Joined: 13 Nov 2007 Posts: 10 Location: Hungary
|
Posted: Thu Nov 22, 2007 10:17 am Post subject: |
|
|
Hi Yves YANG,
please follow this procedure and you will understand the point:
1) Open up a class diagram
2) Right click with the mouse on the diagram
3) Go into the Insert submenu
4) Select Class
5) Type JButton (for example)
6) Hit Enter
The JButton class appears in the diagram.
Now repeat the steps from 2 to 6, and when you hit Enter again you will get the following error message: The type "JButton" exists in this diagram.
Regards,
Marton |
|
| Back to top |
|
 |
yves.yang Site Admin
Joined: 04 Aug 2006 Posts: 462
|
Posted: Thu Nov 22, 2007 12:26 pm Post subject: |
|
|
You cannot create the second JButtton. It is an expected behavior. I cannot see the problem.
best regards
Yves YANG |
|
| Back to top |
|
 |
marton_sigmond
Joined: 13 Nov 2007 Posts: 10 Location: Hungary
|
Posted: Thu Nov 22, 2007 1:43 pm Post subject: |
|
|
Yves YANG,
let us distinguish the creation and the insertion of a class.
Naturally, creating two classes with the same name in the same package is wrong, so avoiding this is expected.
However, inserting the same class into the same diagram two times should be allowed.
Of course I did not want to create the javax.swing.JButton class at all.
But I did want to insert it two times into my diagram.
Please follow the steps from my previous post, and you will understand what I am talking about.
Thanks,
Marton |
|
| Back to top |
|
 |
yves.yang Site Admin
Joined: 04 Aug 2006 Posts: 462
|
Posted: Thu Nov 22, 2007 1:49 pm Post subject: |
|
|
OK, I get your point. Yes, you may have only one graphic prensentation of a type in a diagram. We think it may introduce some troubles if we allow more than one, for example, how display the inheritance, association and dependence.
Best regards
Yves YANG |
|
| Back to top |
|
 |
|