[Uml-devel] KDE/kdesdk/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Mon Mar 20 09:44:06 UTC 2006


SVN commit 520750 by okellogg:

apply commit 520749 from branches/KDE/3.5

 M  +1 -0      ChangeLog  
 M  +2 -0      umbrello/codegenerators/javacodegenerator.cpp  
 M  +4 -2      umbrello/codegenerators/javacodeoperation.cpp  
 M  +1 -1      umbrello/codegenerators/javawriter.cpp  


--- trunk/KDE/kdesdk/umbrello/ChangeLog #520749:520750
@@ -1,6 +1,7 @@
 Version 1.5.3
 
 * Bugs/wishes from http://bugs.kde.org:
+* Static variables in java code are not marked static (5591190)
 * Save autosave file to a more obvious place (72019)
 
 Version 1.5.2
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/javacodegenerator.cpp #520749:520750
@@ -142,6 +142,8 @@
 // Same thing again for "bool" to "boolean"
 QString JavaCodeGenerator::fixTypeName(QString string)
 {
+    if (string.isEmpty() || string.contains(QRegExp("^\\s+$")))
+        return "void";
     string.replace(QRegExp("^string$"),"String");
     string.replace(QRegExp("^bool$"),"boolean");
     return cleanName(string);
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/javacodeoperation.cpp #520749:520750
@@ -66,9 +66,11 @@
         if (paramNum != nrofParam )
             paramStr  += ", ";
     }
+    QString maybeStatic;
+    if (o->getStatic())
+        maybeStatic = "static ";
+    QString startText = strVis + " " + maybeStatic + returnType + methodName + " (" + paramStr + ")";
 
-    QString startText = strVis + " "+ returnType + methodName + " ( "+paramStr+")";
-
     // IF the parent is an interface, our operations look different
     // e.g. they have no body
     if(isInterface) {
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/javawriter.cpp #520749:520750
@@ -738,8 +738,8 @@
 
         str = ""; // reset for next method
         str += ((op->getAbstract() || isInterface) ? "abstract ":"");
-        str += (op->getStatic() ? "static":"");
         str += scopeToJavaDecl(op->getVisibility()) + " ";
+        str += (op->getStatic() ? "static ":"");
         str += methodReturnType + " " +cleanName(op->getName()) + "( ";
 
         atl = op->getParmList();




More information about the umbrello-devel mailing list