Summary: | Support UML Profile for CORBA specification | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Oliver Kellogg <okellogg> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | ASSIGNED --- | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Oliver Kellogg
2004-05-11 08:48:14 UTC
CVS commit by okellogg: scan(): Split out lexer method from parseFile(). Implement interface attributes and inheritance. Align productions with the UML Profile for CORBA. CCBUG:81301 M +82 -72 idlimport.cpp 1.6 [POSSIBLY UNSAFE: popen] CVS commit by okellogg: createAutoAttributeAssociations(): UML Profile for CORBA standard says an attribute whose type is stereotyped <<CORBAInterface>> shall be mapped to a UniAssociation. CCBUG:81301 M +8 -4 umlview.cpp 1.206 --- kdesdk/umbrello/umbrello/umlview.cpp #1.205:1.206 @@ -2468,5 +2468,4 @@ void UMLView::createAutoAttributeAssocia if (tmpUmlObj == NULL) return; - Uml::Association_Type assocType = Uml::at_Composition; // if the underlying model object is really a UMLClass then if (tmpUmlObj->getBaseType() == Uml::ot_Datatype) { @@ -2493,4 +2492,5 @@ void UMLView::createAutoAttributeAssocia continue; } + Uml::Association_Type assocType = Uml::at_Composition; UMLWidget *w = findWidget( attrType->getID() ); // if the attribute type has a widget representation on this view @@ -2500,12 +2500,16 @@ void UMLView::createAutoAttributeAssocia // if the current diagram type permits compositions AssocRules::allowAssociation(assocType, widget, w, false)) { - // create a composition AssocWidget + // Create a composition AssocWidget, or, if the attribute type is + // stereotyped <<CORBAInterface>>, create a UniAssociation widget. + if (attrType->getStereotype(false) == "CORBAInterface") + assocType = at_UniAssociation; AssociationWidget *a = new AssociationWidget (this, widget, assocType, w); a->setUMLObject(attr); a->calculateEndingPoints(); a->setVisibility(attr->getScope(), B); - //a->setChangeability(true, B); - if (assocType == at_Aggregation) + /* + if (assocType == at_Aggregation || assocType == at_UniAssociation) a->setMulti("0..1", B); + */ a->setRoleName(attr->getName(), B); a->setActivated(true); Git commit 82048c574e7662505ed05116f93fc54db93c1027 by Oliver Kellogg. Committed on 11/01/2021 at 22:27. Pushed by okellogg into branch 'master'. umbrello/codegenerators/idl/idlwriter.cpp - In functions isOOClass and writeClass, on comparing against known stereotypes accept stereotype prefixes other than "CORBA". Reason: IDL v4 separates the language from CORBA. Several known tools use stereotypes prefixed with "idl" instead of "CORBA". - In function defaultDatatypes add missing types "long long", "unsigned long long", "long double". M +14 -12 umbrello/codegenerators/idl/idlwriter.cpp https://invent.kde.org/sdk/umbrello/commit/82048c574e7662505ed05116f93fc54db93c1027 Git commit 3388653cf22189081a12d9b7a234bb39672438a0 by Oliver Kellogg. Committed on 11/01/2021 at 22:54. Pushed by okellogg into branch 'master'. Progress on IDL import: umbrello/codeimport/idlimport.{h,cpp} - New function skipStructure skips to the end of a struct/union/ valuetype/interface declaration. - New function isValidScopedName returns true if the argument conforms to IDL syntax for scoped names. - For processing unions add members m_isUnionDefault of type bool and m_unionCases of type QStringList. umbrello/codeimport/idlimport.cpp - In function fillSource remove compressing of sequence or bounded string into single lexeme. - In function parseStmt, - extend documentation; - make local `keyword' non const; - on setting stereotypes use prefix "idl" in lieu of "CORBA" for compatibility with IDL4; - start fleshing out union handling; - on handling "typedef" start fleshing out sequence and bounded string. M +166 -26 umbrello/codeimport/idlimport.cpp M +7 -2 umbrello/codeimport/idlimport.h https://invent.kde.org/sdk/umbrello/commit/3388653cf22189081a12d9b7a234bb39672438a0 Git commit 54e6c2d97658302262cebbf843a423f27f23bd72 by Oliver Kellogg. Committed on 14/01/2021 at 22:55. Pushed by okellogg into branch 'master'. Flesh out bounded string / bounded sequence handling in IDL import: umbrello/codeimport/idlimport.h - Add member m_doc of type UMLDoc* for conventiently accessing UMLApp::app()->document(). umbrello/codeimport/idlimport.cpp - In constructor initialize m_doc. - In function parseStmt keyword "typedef" handling of template types : - In case of «idlSequence» create newType as Class instead of as Datatype. Reason: Umbrello does not currently support the menus and dialogs for adding/manipulating attributes of UMLDatatype. - Implement «idlSequence» / «idlString» stereotype attribute "bound" of type Uml::PrimitiveTypes::UnlimitedNatural. When applying «idlSequence», if the concrete tag value provided in UMLObject::tags() is empty then this means it is an unbounded sequence. - In case of «idlSequence» create an attribute "members" on newType. The type of the attribute is the origin type of the typedef (i.e. oldType). - Set the calculated stereotype on the newType object. - Append the extracted bound onto the tags() of the new type object. M +28 -8 umbrello/codeimport/idlimport.cpp M +3 -0 umbrello/codeimport/idlimport.h https://invent.kde.org/sdk/umbrello/commit/54e6c2d97658302262cebbf843a423f27f23bd72 Git commit 826889ae7d444761705e4a1efb6165696630a627 by Oliver Kellogg. Committed on 16/01/2021 at 09:58. Pushed by okellogg into branch 'master'. Flesh out union case handling in IDL import: umbrello/codeimport/idlimport.cpp - In function parseStmt while-loop handling attribute declaration, if m_unionCases is non empty then - attempt finding the "idlCase" stereotype in UMLDoc; - if it is not found then create it and append the tag definition "label" of type String onto its attribute definitions; - set the stereotype on `attr'; - append the joined m_unionCases labels onto attr->tags(); - clear the content of m_unionCases. M +12 -3 umbrello/codeimport/idlimport.cpp https://invent.kde.org/sdk/umbrello/commit/826889ae7d444761705e4a1efb6165696630a627 Git commit 1b35365e642e4094d916c1db8956f6961c12da46 by Oliver Kellogg. Committed on 17/01/2021 at 19:26. Pushed by okellogg into branch 'master'. In IDLWriter flesh out code generation for IDL union: umbrello/codegenerators/idl/idlwriter.cpp - In function writeClass, if `stype' contains "Union" then - retrieve the classifier's attributes into local `atl'; - pop first attribute off front of `atl' into local `discrim' and generate the "switch" type using discrim; - iterate over the remaining elements of `atl' and handle tags on each element (the tags are used for storing the union case labels or the "default" label) before printing each attribute. - Additional change in function writeClass: On handling Typedef fix crash when superclass is not set. M +39 -5 umbrello/codegenerators/idl/idlwriter.cpp https://invent.kde.org/sdk/umbrello/commit/1b35365e642e4094d916c1db8956f6961c12da46 |