[Uml-devel] kdesdk/umbrello/umbrello/codegenerators
Brian Thomas
thomas at mail630.gsfc.nasa.gov
Thu Apr 15 11:51:04 UTC 2004
CVS commit by thomas:
Set scope of this accessor appropriately...was doing incorrectly for accessors derived from associations
M +16 -12 javacodeaccessormethod.cpp 1.7
--- kdesdk/umbrello/umbrello/codegenerators/javacodeaccessormethod.cpp #1.6:1.7
@@ -135,5 +135,5 @@ void JavaCodeAccessorMethod::updateMetho
// gather defs
JavaCodeGenerationPolicy::ScopePolicy scopePolicy = javapolicy->getAttributeAccessorScope();
- QString strVis = "";
+ QString strVis = javadoc->scopeToJavaDecl(javafield->getVisibility());
QString fieldName = javafield->getFieldName();
QString fieldType = javafield->getTypeName();
@@ -142,4 +142,8 @@ void JavaCodeAccessorMethod::updateMetho
objectType = fieldName;
QString endLine = javadoc->getParentGenerator()->getNewLineEndingChars();
+
+ // set scope of this accessor appropriately..if its an attribute,
+ // we need to be more sophisticated
+ if(javafield->parentIsAttribute())
switch (scopePolicy) {
case JavaCodeGenerationPolicy::Public:
@@ -150,5 +154,5 @@ void JavaCodeAccessorMethod::updateMetho
default:
case JavaCodeGenerationPolicy::FromParent:
- strVis = javadoc->scopeToJavaDecl(javafield->getVisibility());
+ // do nothing..already have taken parent value
break;
}
More information about the umbrello-devel
mailing list