Summary: | importing java subinterface before superinterface results in superinterface not being treated as an interface | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | JP Fournier <jfournier121> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Slackware | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
JP Fournier
2006-07-14 02:52:18 UTC
umbrello version - 1.5.4 - snapshot kdesdk-561582 I see two possible ways for resolving this: 1) primitive - the mention of "interface" means that the superclass must also be an interface 2) thorough - On seeing the mention of ClassInfo in Info, the importer could try to find, open, and import the ClassInfo.java file before continuing with parsing Info.java I took a stab at solving this bug using approach #1. diff is below. regards jp jape@puma:~/tmp/uml/kdesdk-561582$ diff -c umbrello-561582/umbrello/import_utils.cpp umbrello/umbrello/import_utils.cpp *** umbrello-561582/umbrello/import_utils.cpp 2006-07-15 07:24:49.000000000 -0400 --- umbrello/umbrello/import_utils.cpp 2006-07-15 07:37:24.000000000 -0400 *************** *** 321,326 **** --- 321,328 ---- } void createGeneralization(UMLClassifier *child, UMLClassifier *parent) { + // if the child is an interface, so is the parent. + parent->setInterface( child->isInterface()); UMLAssociation *assoc = new UMLAssociation( Uml::at_Generalization, child, parent ); UMLDoc *umldoc = UMLApp::app()->getDocument(); SVN commit 562840 by okellogg: createGeneralization(UMLClassifier*, UMLClassifier*): If the child is an interface then the parent must also be an interface. Thanks to JP Fournier for helping. BUG:130793 M +2 -0 ChangeLog M +3 -0 umbrello/import_utils.cpp --- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #562839:562840 @@ -3,6 +3,8 @@ * Bugs/wishes from http://bugs.kde.org: * Fix crash when importing classes from a java file (129107, 130093) * Crash after single click on the "UML Model" tree window (126560/129252) +* Importing java subinterface before superinterface results in superinterface + not being treated as an interface (130793) Version 1.5.3 --- branches/KDE/3.5/kdesdk/umbrello/umbrello/import_utils.cpp #562839:562840 @@ -321,6 +321,9 @@ } void createGeneralization(UMLClassifier *child, UMLClassifier *parent) { + // if the child is an interface, so is the parent. + if (child->isInterface()) + parent->setInterface(true); UMLAssociation *assoc = new UMLAssociation( Uml::at_Generalization, child, parent ); UMLDoc *umldoc = UMLApp::app()->getDocument(); |