[Uml-devel] [Bug 79648] code import for other languages

Oliver Kellogg okellogg at users.sourceforge.net
Sat Jan 7 10:11:05 UTC 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=79648         




------- Additional Comments From okellogg users sourceforge net  2006-01-07 19:10 -------
SVN commit 495324 by okellogg:

Add class PythonImport. Only imports classes and operations,
no attributes yet. Python people to the front ;)
CCBUG:79648


 M  +2 -0      Makefile.am  
 A             classimport.cpp   [License: no copyright GPL (v2+)]
 M  +5 -0      classimport.h  
 M  +2 -2      import_utils.cpp  
 A             pythonimport.cpp   [License: GPL (v2+)]
 A             pythonimport.h   [License: GPL (v2+)]


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/Makefile.am #495323:495324
 @ -17,6 +17,7  @
 classifiercodedocument.cpp \
 classifierlistitem.cpp \
 classifierwidget.cpp \
+classimport.cpp \
 codeaccessormethod.cpp \
 codeblock.cpp \
 codeblockwithcomments.cpp \
 @ -73,6 +74,7  @
 packagewidget.cpp \
 plugin.cpp \
 pluginloader.cpp \
+pythonimport.cpp \
 seqlinewidget.cpp \
 statewidget.cpp \
 stereotype.cpp \
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/classimport.h #495323:495324
 @ -36,6 +36,11  @
      */
     virtual void importFiles(QStringList files) = 0;
 
+    /**
+     * Factory method.
+     */
+    static ClassImport *createImporterByFileExt(QString filename);
+
 };
 
 #endif
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/import_utils.cpp #495323:495324
 @ -118,10 +118,10  @
         int isConst = name.contains(QRegExp("^const "));
         name.remove(QRegExp("^const\\s+"));
         QString typeName(name);
-        const int isAdorned = typeName.contains( QRegExp("[^\\w: ]") );
+        const int isAdorned = typeName.contains( QRegExp("[^\\w:\\. ]") );
         const int isPointer = typeName.contains('*');
         const int isRef = typeName.contains('&');
-        typeName.remove(QRegExp("[^\\w: ].*$"));
+        typeName.remove(QRegExp("[^\\w:\\. ].*$"));
         UMLObject *origType = umldoc->findUMLObject(typeName, Uml::ot_UMLObject, parentPkg);
         if (origType == NULL) {
             // Still not found. Create the stripped down type.




More information about the umbrello-devel mailing list