[Uml-devel] KDE/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Fri Jan 13 12:23:04 UTC 2006
SVN commit 497779 by okellogg:
apply commit 497778 from branches/KDE/3.5
M +16 -2 javaimport.cpp
--- trunk/KDE/kdesdk/umbrello/umbrello/javaimport.cpp #497778:497779
@@ -205,11 +205,25 @@
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Enum,
name, m_scope[m_scopeIndex], m_comment);
UMLEnum *enumType = static_cast<UMLEnum*>(ns);
- advance(); // skip name
+ skipStmt("{");
while (m_srcIndex < srcLength - 1 && advance() != "}") {
Import_Utils::addEnumLiteral(enumType, m_source[m_srcIndex]);
- if (advance() != ",")
+ QString next = advance();
+ if (next == "{" || next == "(") {
+ if (! skipToClosing(next[0]))
+ return false;
+ next = advance();
+ }
+ if (next != ",") {
+ if (next == ";") {
+ // @todo handle methods in enum
+ // For now, we cheat (skip them)
+ m_source[m_srcIndex] = "{";
+ if (! skipToClosing('{'))
+ return false;
+ }
break;
+ }
}
return true;
}
More information about the umbrello-devel
mailing list