svn commit: r14625 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2008-05-05 00:55:33-0700
New Revision: 14625

Modified:
   trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java

Log:
Issue 5072: deprecate buildPackage() method with UUID parameter

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java?view=diff&rev=14625&p1=trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java&p2=trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java&r1=14624&r2=14625
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java	2008-05-05 00:55:33-0700
@@ -90,16 +90,29 @@
         return (ElementImport) run.getParams().get(0);
     }
 
+    @Deprecated
+    @SuppressWarnings("deprecation")
     public org.eclipse.uml2.uml.Package buildPackage(String name, String uuid) {
         org.eclipse.uml2.uml.Package pkg =
                 (org.eclipse.uml2.uml.Package) createPackage();
         if (name != null) {
             pkg.setName(name);
         }
-        // TODO: What about UUID?  This has been gone since UML 1.4 transition - tfm
+        // We could throw an exception if uuid is not null, but since the
+        // Javadoc technically says that it is only used if the element doesn't
+        // already have one set, we're going to assume we can ignore it.
         return pkg;
     }
 
+    public org.eclipse.uml2.uml.Package buildPackage(String name) {
+        org.eclipse.uml2.uml.Package pkg =
+                (org.eclipse.uml2.uml.Package) createPackage();
+        if (name != null) {
+            pkg.setName(name);
+        }
+        return pkg;
+    }
+    
     public Object copyPackage(Object source, Object ns) {
         // TODO: Auto-generated method stub
         return null;
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.