From: Benjamin B. <bg...@us...> - 2005-07-15 13:43:49
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30178/Plugin/com/ibm/ecute/plugins/output/funcionality Modified Files: RSAModelCreator.java Log Message: Qualifier flavors: qualifier values of qualifiers "Aggregation", "Composition", "Aggregate", "Min", "Max" and "Key" on references are inherited by subclasses on MOF import Index: RSAModelCreator.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality/RSAModelCreator.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- RSAModelCreator.java 11 Jul 2005 07:29:19 -0000 1.15 +++ RSAModelCreator.java 15 Jul 2005 13:43:38 -0000 1.16 @@ -110,6 +110,7 @@ private IUMLDiagramHelper diagramHelper; //private FlavorsHelper flavorsHelper; + private boolean associationTwisted = false; private QualifiersList qualifiersList = null; @@ -122,14 +123,6 @@ leftDataTypes = new Hashtable(); leftDataTypeKeys = new ArrayList(); diagramHelper = UMLModeler.getUMLDiagramHelper(); -// flavorsHelper = new FlavorsHelper(uml2Model); -// if(!flavorsHelper.existsQualifierListConstraint()){ -// flavorsHelper.createQualifiersListConstraint(); -// } -// qualifiersList = flavorsHelper.getQualifiersList(); -// Qualifier qualifier = qualifiersList.GetElement("Override"); -// String flavor = qualifier.stringFlavor(); -// boolean test = flavorsHelper.isNativeMappedQualifier("bender"); } public int AddAssociation(String className1, String roleName1, String className2, String roleName2, Object diagram) { @@ -143,6 +136,13 @@ lastClass = associationclass; lastElement = associationclass; + + +// if(lastAssocProp2 != null && roleName1.equalsIgnoreCase(lastAssocProp2.getName())){ +// associationTwisted = true; +// } else { +// associationTwisted = false; +// } if (className1 == null || className2 == null) { if (lastRootClass != null) { @@ -240,18 +240,21 @@ // } // } - if ((className1 == null) || (className2 == null)) + if ((className1 == null) || (className2 == null)){ return NOLINKS; + } //Create Association Type type1 = getClass(className1, lastCategory, true); - if (type1 == null) + if (type1 == null){ return NOLINK1; - + } + Type type2 = getClass(className2, lastCategory, true); - if (type2 == null) + if (type2 == null){ return NOLINK2; - + } + Property assocProp1 = associationclass.createOwnedEnd(UML2Package.eINSTANCE.getProperty()); assocProp1.setType(type1); assocProp1.setName(roleName1); @@ -605,15 +608,23 @@ // because of the different role order in RSA theElement is // lastAssocProp2 if type TLINK1 if (type == TLINK1) { - //theElement = lastAssocProp1; - theElement = lastAssocProp2; - otherElement = lastAssocProp1; +// if(associationTwisted){ +// theElement = lastAssocProp1; +// otherElement = lastAssocProp2; +// } else { + theElement = lastAssocProp2; + otherElement = lastAssocProp1; + //} } // lastAssocProp1 if type TLINK2 if (type == TLINK2) { - //theElement = lastAssocProp2; - theElement = lastAssocProp1; - otherElement = lastAssocProp2; +// if(associationTwisted){ +// theElement = lastAssocProp2; +// otherElement = lastAssocProp1; +// } else { + theElement = lastAssocProp1; + otherElement = lastAssocProp2; +// } } if (name.equalsIgnoreCase("Description") && qualifiers) { |