Bug 53383 - messages for operations in super classes
Summary: messages for operations in super classes
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: HI wishlist
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-24 19:56 UTC by Jonathan Riddell
Modified: 2004-03-27 19:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Implements wish (39.66 KB, patch)
2004-03-17 16:23 UTC, Esben Mose Hansen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Riddell 2003-01-24 19:56:18 UTC
Version:            (using KDE Devel)
Compiler:          gcc 2.95 
OS:          Linux

Sequence diagram messages should allow you to pick from the operations in super classes.

(I have no idea if this can be implemented since it requires looking at the associations in other diagrams.)
Comment 1 Stevan White 2003-06-02 23:45:46 UTC
I have the same problem.  In more detail

In a sequence diagram with two classes that are subclasses of other classes,
put a message from one to the other.

Select the message, right-click, and from the menu, pull down "Select Operation".

The "Select operation" dialog will open.  It has a pop-down menu under 
"Class operation", but this menu only lists operations defined in the immediate
class, not operations of its parent classes.
Comment 2 YeHaa 2004-02-26 15:20:48 UTC
Yes, I would need this functionality, too. Or as an alternative the possibility to copy&paste the operations between interfaces/classes without crashing.

Any hope that this will be implemented sometime?
Comment 3 Esben Mose Hansen 2004-03-17 16:23:40 UTC
Created attachment 5250 [details]
Implements wish

The patch implements this wish. A couple of comments:

Implementing this wish /correctly/ is much harder than it sounds. It would,
e.g., require knowledge of what programming language the project is ultimately
going to be implemented in. I'm not sure this is a good idea in any case. 

Instead, this patch adds all operations from all superclasses as long as their
signatures are unique. This should do the trick in 95% of the cases; let's
collect some more data before taking a stab at the remaining 5% :o) This is
about 20 lines of added/changed code, mainly in UMLClassifier::getOpList().

The remaing 300+ line changes fixes
1) about a dozen memory leaks when using
UMLClassifier::getFilteredOperationsList()
2) UMLClassifier::getOpList() returns a non-const pointer into the private
member m_OpsList. I changed this for two reasons: 
	a) It's bad practice revealing internals through the public interface
(encapsulation is the buzz word here)
	b) Not changing this would introduce memory-leaks akin to the one I
just eliminated for getFilteredOperationsList() with my patch.

The same changes should really should be made to the corresponding functions to
get the attribute list, the template list and the enumLiteral list. The patch
above does most of the hard work to do this; I'll be willing to take this the
rest of the way if desired. I'll create a new bug to track this if I do (read:
Write & tell me if you (UML devels) want this to happen)

Finally: Great work! I've long misssd a UML tool for Linux/KDE. There's some
work to be done, but the basics looks really cool.

Use/ignore as you see fit :)
Comment 4 Oliver Kellogg 2004-03-26 22:22:30 UTC
Hi Esben,

I applied your attached patch (id=5250).

Thanks for contributing.
Comment 5 Esben Mose Hansen 2004-03-26 23:05:05 UTC
Thank you for committing this. It's nice not having to maintain a patchset for every application I use :-D

I'll fix the other issues I mentioned sometime soon.. (getAttributes() et al should return by value)
Comment 6 Jonathan Riddell 2004-03-27 19:09:31 UTC
Seems to work well, I'll close this entry.  If you get round to the other fixes please open a new report on bugs.kde.org or just post a URL to the patch to uml-devel mailing list.

Thanks for your contribution Esben.