[Uml-devel] kdesdk/umbrello/umbrello
Jonathan Riddell
jri at jriddell.org
Wed Mar 12 10:43:06 UTC 2003
CVS commit by jriddell:
Update to actionscript and javascipt code generators to use the correct object name
on superclasses (rather than the assocaition name)
Thanks to Brian Thomas for pointing that out.
M +4 -1 codegenerator.h 1.3
M +2 -1 codegenerators/aswriter.cpp 1.2
M +2 -1 codegenerators/jswriter.cpp 1.2
--- kdesdk/umbrello/umbrello/codegenerator.h #1.2:1.3
@@ -156,4 +156,7 @@ protected:
QString getHeadingFile(QString file);
+ /**
+ * Replaces spaces with underscores and capitalises as defined in m_modname
+ */
QString cleanName(QString);
--- kdesdk/umbrello/umbrello/codegenerators/aswriter.cpp #1.1:1.2
@@ -119,5 +119,6 @@ void ASWriter::writeClass(UMLConcept *c)
for(association = generalizations.first(), i = generalizations.count();
association && i; association = generalizations.next(), i--) {
- as << classname << ".prototype = new " << cleanName(association->getName()) << " ();" << endl;
+ UMLObject* obj = m_doc->findUMLObject(association->getRoleBId());
+ as << classname << ".prototype = new " << cleanName(obj->getName()) << " ();" << endl;
}
--- kdesdk/umbrello/umbrello/codegenerators/jswriter.cpp #1.1:1.2
@@ -120,5 +120,6 @@ void JSWriter::writeClass(UMLConcept *c)
for (association = generalizations.first(), i = generalizations.count();
association && i; association = generalizations.next(), i--) {
- js << classname << ".prototype = new " << cleanName(association->getName()) << " ();" << endl;
+ UMLObject* obj = m_doc->findUMLObject(association->getRoleBId());
+ js << classname << ".prototype = new " << cleanName(obj->getName()) << " ();" << endl;
}
More information about the umbrello-devel
mailing list