Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

class diagram - same class/interface more than once

 
Post new topic   Reply to topic     Forum Index -> Feature discussion
View previous topic :: View next topic  
Author Message
marton_sigmond



Joined: 13 Nov 2007
Posts: 10
Location: Hungary

PostPosted: Wed Nov 21, 2007 1:46 pm    Post subject: class diagram - same class/interface more than once Reply with quote

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
View user's profile Send private message
dominiksh



Joined: 18 Jun 2007
Posts: 5

PostPosted: Thu Nov 22, 2007 9:54 am    Post subject: Reply with quote

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
View user's profile Send private message
yves.yang
Site Admin


Joined: 04 Aug 2006
Posts: 462

PostPosted: Thu Nov 22, 2007 10:07 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
marton_sigmond



Joined: 13 Nov 2007
Posts: 10
Location: Hungary

PostPosted: Thu Nov 22, 2007 10:17 am    Post subject: Reply with quote

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
View user's profile Send private message
yves.yang
Site Admin


Joined: 04 Aug 2006
Posts: 462

PostPosted: Thu Nov 22, 2007 12:26 pm    Post subject: Reply with quote

You cannot create the second JButtton. It is an expected behavior. I cannot see the problem.

best regards
Yves YANG
Back to top
View user's profile Send private message Send e-mail Visit poster's website
marton_sigmond



Joined: 13 Nov 2007
Posts: 10
Location: Hungary

PostPosted: Thu Nov 22, 2007 1:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
yves.yang
Site Admin


Joined: 04 Aug 2006
Posts: 462

PostPosted: Thu Nov 22, 2007 1:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Feature discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum