From: Benjamin B. <bg...@us...> - 2005-05-31 13:12:57
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13859/Plugin/com/ibm/ecute/rsa/core/internal/properties Modified Files: QualifiersPropertySection.java Log Message: 2.1 beta 1a fixed some CIM MOF import errors in RSA/RSM Index: QualifiersPropertySection.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties/QualifiersPropertySection.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- QualifiersPropertySection.java 25 May 2005 15:45:48 -0000 1.15 +++ QualifiersPropertySection.java 31 May 2005 13:12:47 -0000 1.16 @@ -842,65 +842,65 @@ update(notification, eobject); } - public void mapQualifierToModel(Element element, String qualifierName, String newValue){ - if (element instanceof Class){ - if(qualifierName.equalsIgnoreCase("Description")){ - Comment descr = element.createOwnedComment(UML2Package.eINSTANCE.getComment()); - descr.setBody(newValue); - Stereotype stereo = descr.getApplicableStereotype("Default::Documentation"); - descr.apply(stereo); - } - if(qualifierName.equalsIgnoreCase("OCL")){ - List elementList = ((Class)element).getPackage().getOwnedElements(); - ArrayList constraintList = new ArrayList(); - for (int i = 0; i < elementList.size(); i++){ - if (elementList.get(i) instanceof Constraint) - constraintList.add(elementList.get(i)); - } - if (constraintList != null){ - for(int j = 0; j < constraintList.size(); j++){ - Constraint constraint = (Constraint)constraintList.get(j); - List constrainedElements = constraint.getConstrainedElements(); - for(int k = 0; k < constrainedElements.size(); k++){ - if(constrainedElements.get(k) instanceof Class){ - if(((Class)constrainedElements.get(k)).getName().equalsIgnoreCase(((Class)element).getName())){ - String tempBody, body = ""; - // prepare constraint body content - if(newValue.startsWith("{")){ - int length = newValue.length(); - tempBody = newValue.substring(2, length - 2); - } else { - tempBody = newValue; - } - int index = tempBody.indexOf(","); - boolean multiple = false; - if (index != -1) - multiple = true; - while (index != -1){ - int length = tempBody.length(); - body = body.concat(tempBody.substring(0, index - 1)); - body = body.concat("\n"); - tempBody = tempBody.substring(index + 2); - index = tempBody.indexOf(","); - } - if (multiple){ - body = body.concat(tempBody.substring(index + 1)); - } - if (!multiple) - body = tempBody; - - //set constraint body and language - ((OpaqueExpression)constraint.getSpecification()).setBody(body); - - - } - } - } - } - } - } - } - } +// public void mapQualifierToModel(Element element, String qualifierName, String newValue){ +// if (element instanceof Class){ +// if(qualifierName.equalsIgnoreCase("Description")){ +// Comment descr = element.createOwnedComment(UML2Package.eINSTANCE.getComment()); +// descr.setBody(newValue); +// Stereotype stereo = descr.getApplicableStereotype("Default::Documentation"); +// descr.apply(stereo); +// } +// if(qualifierName.equalsIgnoreCase("OCL")){ +// List elementList = ((Class)element).getPackage().getOwnedElements(); +// ArrayList constraintList = new ArrayList(); +// for (int i = 0; i < elementList.size(); i++){ +// if (elementList.get(i) instanceof Constraint) +// constraintList.add(elementList.get(i)); +// } +// if (constraintList != null){ +// for(int j = 0; j < constraintList.size(); j++){ +// Constraint constraint = (Constraint)constraintList.get(j); +// List constrainedElements = constraint.getConstrainedElements(); +// for(int k = 0; k < constrainedElements.size(); k++){ +// if(constrainedElements.get(k) instanceof Class){ +// if(((Class)constrainedElements.get(k)).getName().equalsIgnoreCase(((Class)element).getName())){ +// String tempBody, body = ""; +// // prepare constraint body content +// if(newValue.startsWith("{")){ +// int length = newValue.length(); +// tempBody = newValue.substring(2, length - 2); +// } else { +// tempBody = newValue; +// } +// int index = tempBody.indexOf(","); +// boolean multiple = false; +// if (index != -1) +// multiple = true; +// while (index != -1){ +// int length = tempBody.length(); +// body = body.concat(tempBody.substring(0, index - 1)); +// body = body.concat("\n"); +// tempBody = tempBody.substring(index + 2); +// index = tempBody.indexOf(","); +// } +// if (multiple){ +// body = body.concat(tempBody.substring(index + 1)); +// } +// if (!multiple) +// body = tempBody; +// +// //set constraint body and language +// ((OpaqueExpression)constraint.getSpecification()).setBody(body); +// +// +// } +// } +// } +// } +// } +// } +// } +// } public boolean getShowAll(){ return showAllButton.getSelection(); |