[Uml-devel] [Bug 131825] java import - method parameter types not resolved correctly
Oliver Kellogg
okellogg at users.sourceforge.net
Fri Aug 4 06:17:21 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=131825
okellogg users sourceforge net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From okellogg users sourceforge net 2006-08-04 08:17 -------
SVN commit 569520 by okellogg:
Patch by JP Fournier helps avoid creation of unwanted placeholder types
for unqualified type names mentioned in method parameters.
BUG:131825
M +1 -0 ChangeLog
M +7 -1 umbrello/codeimport/javaimport.cpp
--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #569519:569520
@ -4,6 +4,7 @
* Java import - importing interfaces - absent visibility treated as package
instead of public (131327)
* Python code generation not independent of diagram view (131790)
+* Java import - method parameter types not resolved correctly (131825)
Version 1.5.4
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codeimport/javaimport.cpp #569519:569520
@ -308,7 +308,7 @
}
if (m_source[m_srcIndex] == "extends") {
const QString& baseName = advance();
- // try to resove the class we are extending, or if impossible
+ // try to resolve the class we are extending, or if impossible
// create a placeholder
UMLObject *parent = resolveClass( baseName );
if ( parent ) {
@ -463,6 +463,12 @
while (m_srcIndex < srcLength && m_source[m_srcIndex] != ")") {
QString typeName = joinTypename();
QString parName = advance();
+ // the Class might not be resolved yet so resolve it if necessary
+ UMLObject *obj = resolveClass(typeName);
+ if (obj) {
+ // by prepending the package, unwanted placeholder types will not get created
+ typeName = obj->getFullyQualifiedName(".");
+ }
UMLAttribute *att = Import_Utils::addMethodParameter(op, typeName, parName);
if (advance() != ",")
break;
More information about the umbrello-devel
mailing list