[Uml-devel] kdesdk/umbrello/umbrello/codegenerators
Brian Thomas
thomas at mail630.gsfc.nasa.gov
Wed Apr 14 14:30:12 UTC 2004
CVS commit by thomas:
bug fix + feature : 1. Fix: In Java interfaces 'extend' other interfaces, they dont 'implement' them. 2. Minor feature: Only declare abstract on class declarations, not on interfaces
M +9 -2 javaclassdeclarationblock.cpp 1.11
--- kdesdk/umbrello/umbrello/codegenerators/javaclassdeclarationblock.cpp #1.10:1.11
@@ -88,5 +88,6 @@ void JavaClassDeclarationBlock::updateCo
// Now set START/ENDING Text
QString startText = "";
- if (c->getAbstract())
+ // In Java, we need declare abstract only on classes
+ if (c->getAbstract() && !isInterface)
startText.append("abstract ");
@@ -130,5 +131,11 @@ void JavaClassDeclarationBlock::updateCo
i = 0;
if(nrof_superinterfaces >0)
+ {
+ // In Java interfaces "extend" other interfaces. Classes "implement" interfaces
+ if(isInterface)
+ startText.append(" extends ");
+ else
startText.append(" implements ");
+ }
for (UMLClassifier * concept= superinterfaces.first(); concept; concept = superinterfaces.next())
{
More information about the umbrello-devel
mailing list