[Uml-devel] branches/work/soc-umbrello/umbrello

Andi Fischer andi.fischer at hispeed.ch
Wed Oct 7 20:10:06 UTC 2009


SVN commit 1032432 by fischer:

Patch from Markus Schulz applied - codegenerator for Vala.

 M  +2 -0      CMakeLists.txt  
 M  +4 -0      codegenerators/codegenfactory.cpp  
 A             codegenerators/vala (directory)  
 A             codegenerators/vala/valawriter.cpp   [License: GPL (v2+)]
 A             codegenerators/vala/valawriter.h   [License: GPL (v2+)]
 M  +4 -0      model_utils.cpp  
 M  +1 -0      umbrelloui.rc  
 M  +8 -0      uml.cpp  
 M  +1 -0      uml.h  
 M  +1 -0      umlnamespace.h  


--- branches/work/soc-umbrello/umbrello/CMakeLists.txt #1032431:1032432
@@ -30,6 +30,7 @@
   ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/ruby/
   ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/sql/
   ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/tcl/
+  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/vala/
   ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/xml/
   ${CMAKE_CURRENT_SOURCE_DIR}/codegenwizard/
   ${CMAKE_CURRENT_SOURCE_DIR}/controller/
@@ -127,6 +128,7 @@
     codegenerators/ruby/rubywriter.cpp
     codegenerators/sql/sqlwriter.cpp
     codegenerators/tcl/tclwriter.cpp
+    codegenerators/vala/valawriter.cpp
     codegenerators/xml/xmlschemawriter.cpp
     codegenerators/xml/xmlelementcodeblock.cpp
     codegenerators/xml/xmlcodecomment.cpp
--- branches/work/soc-umbrello/umbrello/codegenerators/codegenfactory.cpp #1032431:1032432
@@ -40,6 +40,7 @@
 #include "aswriter.h"
 #include "jswriter.h"
 #include "tclwriter.h"
+#include "valawriter.h"
 #include "xmlschemawriter.h"
 
 // the new
@@ -174,6 +175,9 @@
         case Uml::pl_Tcl:
             obj = new TclWriter();
             break;
+        case Uml::pl_Vala:
+            obj = new ValaWriter();
+            break;
         case Uml::pl_XMLSchema:
             obj = new XMLSchemaWriter();
             break;
--- branches/work/soc-umbrello/umbrello/model_utils.cpp #1032431:1032432
@@ -880,6 +880,8 @@
             return "SQL";
         case Uml::pl_Tcl:
             return "Tcl";
+        case Uml::pl_Vala:
+            return "Vala";
         case Uml::pl_XMLSchema:
             return "XMLSchema";
         default:
@@ -929,6 +931,8 @@
         return Uml::pl_SQL;
     if (str == "Tcl")
         return Uml::pl_Tcl;
+    if (str == "Vala")
+        return Uml::pl_Vala;
     if (str == "XMLSchema")
         return Uml::pl_XMLSchema;
     return Uml::pl_Reserved;
--- branches/work/soc-umbrello/umbrello/umbrelloui.rc #1032431:1032432
@@ -71,6 +71,7 @@
       <Action name="setLang_python"/>
       <Action name="setLang_ruby"/>
       <Action name="setLang_tcl"/>
+      <Action name="setLang_vala"/>
       <Action name="setLang_xmlschema"/>
     </Menu>
     <Separator/>
--- branches/work/soc-umbrello/umbrello/uml.cpp #1032431:1032432
@@ -290,6 +290,7 @@
     setProgLangAction(Uml::pl_Ruby,         "Ruby",            "setLang_ruby");
     setProgLangAction(Uml::pl_SQL,          "SQL",             "setLang_sql");
     setProgLangAction(Uml::pl_Tcl,          "Tcl",             "setLang_tcl");
+    setProgLangAction(Uml::pl_Vala,         "Vala",            "setLang_vala");
     setProgLangAction(Uml::pl_XMLSchema,    "XMLSchema",       "setLang_xmlschema");
 
     connect(m_langAct[Uml::pl_ActionScript], SIGNAL(triggered()), this, SLOT(setLang_actionscript()));
@@ -310,6 +311,7 @@
     connect(m_langAct[Uml::pl_Ruby],         SIGNAL(triggered()), this, SLOT(setLang_ruby()));
     connect(m_langAct[Uml::pl_SQL],          SIGNAL(triggered()), this, SLOT(setLang_sql()));
     connect(m_langAct[Uml::pl_Tcl],          SIGNAL(triggered()), this, SLOT(setLang_tcl()));
+    connect(m_langAct[Uml::pl_Vala],         SIGNAL(triggered()), this, SLOT(setLang_vala()));
     connect(m_langAct[Uml::pl_XMLSchema],    SIGNAL(triggered()), this, SLOT(setLang_xmlschema()));
 
     fileNew->setToolTip(i18n("Creates a new document"));
@@ -2067,6 +2069,11 @@
     setActiveLanguage(Uml::pl_Tcl);
 }
 
+void UMLApp::setLang_vala()
+{
+    setActiveLanguage(Uml::pl_Vala);
+}
+
 void UMLApp::setLang_xmlschema()
 {
     setActiveLanguage(Uml::pl_XMLSchema);
@@ -2114,6 +2121,7 @@
         pl == Uml::pl_Pascal ||
         pl == Uml::pl_Java ||
         pl == Uml::pl_JavaScript ||
+        pl == Uml::pl_Vala ||
         pl == Uml::pl_Python)  // CHECK: more?
         return ".";
     return "::";
--- branches/work/soc-umbrello/umbrello/uml.h #1032431:1032432
@@ -286,6 +286,7 @@
     void setLang_ruby();
     void setLang_sql();
     void setLang_tcl();
+    void setLang_vala();
     void setLang_xmlschema();
 
 private:
--- branches/work/soc-umbrello/umbrello/umlnamespace.h #1032431:1032432
@@ -295,6 +295,7 @@
         pl_Ruby,
         pl_SQL,
         pl_Tcl,
+        pl_Vala,
         pl_XMLSchema,
         pl_Reserved
     };




More information about the umbrello-devel mailing list