How to add inheritance to a class not using diagram?

Please use this forum for open discussions about Bouml.
Merci d'utiliser ce forum pour des discussions ouvertes à propos de Bouml.

How to add inheritance to a class not using diagram?

Postby thomas.beale » Sat 24 Mar 2012 21:34

I want to specify that class X inherits from class C, but class C is not on the current diagram. There appears to be no way to add an ancestor in the explorer view?
thomas.beale
 
Posts: 45
Joined: Wed 21 Mar 2012 20:37

Re: How to add inheritance to a class not using diagram?

Postby Bruno Pagès » Sat 24 Mar 2012 22:33

Yes you need to have the two classes in a class diagram to add the inheritance or other relations between them. After that you can remove one or the two classes, or the diagram itself, if you don't want to show the relation in a diagram.

Let's remark you can also write a plug-out to add the inheritance without having to use a diagram, in this case the plug-out will be applied for instance on the inheriting class and the inherited class may be marked to simplify the implementation of the plug-out and minimize manual manipulations ;)
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 474
Joined: Mon 20 Feb 2012 08:23
Location: France

Re: How to add inheritance to a class not using diagram?

Postby thomas.beale » Mon 26 Mar 2012 12:15

Is there any reason not to allow a right-click dialog to add inheritance in the explorer tree, just as for adding attributes? It seems like a natural thing to have...

- thomas
thomas.beale
 
Posts: 45
Joined: Wed 21 Mar 2012 20:37

Re: How to add inheritance to a class not using diagram?

Postby Bruno Pagès » Mon 26 Mar 2012 13:01

To create an attribute in a given class (or other named element in any container) is simple because it is just needed to specify first its name.

To create a relation it is needed to know the opposed side (I don't manage relations on air and I don't allow to change the extremities of a relation), so to allow that it should be necessary to use a dialog giving the (long) list of all compatible elements and I don't think this is easy to use, even if the kind of the relation is already known (having a long list of menu entries proposing the possible kind of relations for a given element depending on its type etc, or having a first level dialog to set the kind of the relation before a second level to choose the opposite side). Furthermore to hide an important relation like an inheritance rather than to show it in a least a diagram is a little bit the opposite of the UML goal/usage (my two cents).

Again this may be a good reason for you to develop a plug-out to extend Bouml (almost) as you like, the plug-out mechanism is a very important feature of Bouml probably not enough used, take time to write the first and I think you will write a lot after understanding all you can do with to help your work.
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 474
Joined: Mon 20 Feb 2012 08:23
Location: France


Return to Open discussions / Discussions ouvertes

Who is online

Users browsing this forum: No registered users and 0 guests

cron