svn commit: r17039 - trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2009-04-05 03:50:16-0700
New Revision: 17039

Modified:
   trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java

Log:
Rid the class of most warnings (only 1 remaining)

Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java?view=diff&pathrev=17039&r1=17038&r2=17039
==============================================================================
--- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java	(original)
+++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java	2009-04-05 03:50:16-0700
@@ -30,15 +30,12 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 import javax.jmi.reflect.InvalidObjectException;
 import javax.jmi.reflect.RefObject;
 
 import org.apache.log4j.Logger;
 import org.argouml.model.DummyModelCommand;
-import org.argouml.model.ExtensionMechanismsFactory;
 import org.argouml.model.IllegalModelElementConnectionException;
 import org.argouml.model.InvalidElementException;
 import org.argouml.model.MetaTypes;
@@ -141,7 +138,6 @@
 import org.omg.uml.foundation.core.UmlAssociation;
 import org.omg.uml.foundation.core.UmlClass;
 import org.omg.uml.foundation.core.Usage;
-import org.omg.uml.foundation.datatypes.AggregationKind;
 import org.omg.uml.modelmanagement.ElementImport;
 import org.omg.uml.modelmanagement.Subsystem;
 import org.omg.uml.modelmanagement.UmlPackage;
@@ -422,9 +418,9 @@
 
         if (elementType == metaTypes.getAssociation()) {
             connection =
-                getCore().buildAssociation((Classifier) fromElement,
-                    (AggregationKind) fromStyle, (Classifier) toElement,
-                    (AggregationKind) toStyle, (Boolean) unidirectional);
+                getCore().buildAssociation(fromElement,
+                    fromStyle, toElement,
+                    toStyle, ((Boolean) unidirectional).booleanValue());
         } else if (elementType == metaTypes.getAssociationEnd()) {
             if (fromElement instanceof UmlAssociation) {
                 connection =
@@ -440,7 +436,8 @@
         } else if (elementType == metaTypes.getAssociationRole()) {
             connection =
                 getCollaborations().buildAssociationRole(fromElement,
-                    fromStyle, toElement, toStyle, (Boolean) unidirectional);
+                    fromStyle, toElement, toStyle,
+                    ((Boolean) unidirectional).booleanValue());
         } else if (elementType == metaTypes.getGeneralization()) {
             connection = getCore().buildGeneralization(fromElement, toElement);
         } else if (elementType == metaTypes.getPackageImport()) {
@@ -591,21 +588,25 @@
             element = this.modelImpl.getUseCasesFactory().
                 buildExtensionPoint(container);            
         } else if (elementType == this.metaTypes.getTemplateParameter()) {
-            TemplateParameter templateParam = getCore().createTemplateParameter();
+            TemplateParameter templateParam =
+                getCore().createTemplateParameter();
             Parameter param = getCore().createParameter();
             param.setName("T");
             templateParam.setParameter(param);
             // bounds are defined as param tagged values
             if (container instanceof ModelElement) {
-                for (String tagName : new String[]{"extends","super"}) {
-                    TaggedValue bound = (TaggedValue)getExtensionMechanisms().buildTaggedValue(
-                            getExtensionMechanisms().buildTagDefinition(tagName, null, 
-                                    ((ModelElement)container).getNamespace()),
+                for (String tagName : new String[]{"extends", "super"}) {
+                    TaggedValue bound = 
+                        getExtensionMechanisms().buildTaggedValue(
+                            getExtensionMechanisms().buildTagDefinition(
+                                    tagName, null, 
+                                    ((ModelElement) container).getNamespace()),
                             new String[]{""});
                     param.getTaggedValue().add(bound);
                 }
-                templateParam.setTemplate((ModelElement)container);
-                ((ModelElement) container).getTemplateParameter().add(templateParam);
+                ModelElement template = (ModelElement) container;
+                templateParam.setTemplate(template);
+                template.getTemplateParameter().add(templateParam);
             }
             return templateParam;            
         } else {

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=1550337

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.