svn commit: r14796 - trunk/src/argouml-app/src/org/argouml/notation/providers: java uml

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2008-05-23 23:15:55-0700
New Revision: 14796

Modified:
   trunk/src/argouml-app/src/org/argouml/notation/providers/java/AssociationEndNameNotationJava.java
   trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AssociationEndNameNotationUml.java
   trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java
   trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java
   trunk/src/argouml-app/src/org/argouml/notation/providers/uml/OperationNotationUml.java

Log:
Another step towards the removal of the dependency from the Notation subsystem on the Project.

Modified: trunk/src/argouml-app/src/org/argouml/notation/providers/java/AssociationEndNameNotationJava.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/notation/providers/java/AssociationEndNameNotationJava.java?view=diff&rev=14796&p1=trunk/src/argouml-app/src/org/argouml/notation/providers/java/AssociationEndNameNotationJava.java&p2=trunk/src/argouml-app/src/org/argouml/notation/providers/java/AssociationEndNameNotationJava.java&r1=14795&r2=14796
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/notation/providers/java/AssociationEndNameNotationJava.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/notation/providers/java/AssociationEndNameNotationJava.java	2008-05-23 23:15:55-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 2006-2007 The Regents of the University of California. All
+// Copyright (c) 2006-2008 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -96,7 +96,7 @@
         }
 
         String stereoString = 
-            NotationUtilityUml.generateStereotype(modelElement);
+            NotationUtilityUml.generateStereotype(modelElement, args);
 
         return stereoString + visibility + name;
     }

Modified: trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AssociationEndNameNotationUml.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AssociationEndNameNotationUml.java?view=diff&rev=14796&p1=trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AssociationEndNameNotationUml.java&p2=trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AssociationEndNameNotationUml.java&r1=14795&r2=14796
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AssociationEndNameNotationUml.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AssociationEndNameNotationUml.java	2008-05-23 23:15:55-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 2006-2007 The Regents of the University of California. All
+// Copyright (c) 2006-2008 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -192,7 +192,7 @@
         }
 
         String stereoString = 
-            NotationUtilityUml.generateStereotype(modelElement);
+            NotationUtilityUml.generateStereotype(modelElement, args);
 
         return stereoString + visibility + name;
     }

Modified: trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java?view=diff&rev=14796&p1=trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java&p2=trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java&r1=14795&r2=14796
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java	2008-05-23 23:15:55-0700
@@ -532,7 +532,7 @@
                     NotationUtilityUml.generateVisibility(modelElement);
             // generateStereotype accepts a collection, despite its name
             String stereo = NotationUtilityUml.generateStereotype(
-                    Model.getFacade().getStereotypes(modelElement));
+                    Model.getFacade().getStereotypes(modelElement), args);
             String name = Model.getFacade().getName(modelElement);
             String multiplicity = generateMultiplicity(
                     Model.getFacade().getMultiplicity(modelElement));

Modified: trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java?view=diff&rev=14796&p1=trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java&p2=trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java&r1=14795&r2=14796
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java	2008-05-23 23:15:55-0700
@@ -898,11 +898,28 @@
     }
 
     /**
+     * TODO: Rewrite this, so that it does not use the Project.
+     * 
+     * @param st a stereotype UML object
+     *                 or a string
+     *                 or a collection of stereotypes
+     *                 or a modelelement of which the stereotypes are retrieved
+     * @param args arguments that may determine the notation
+     * @return a string representing the given stereotype(s)
+     */
+    public static String generateStereotype(Object st, Map args) {
+        return generateStereotype(st);
+    }
+
+    /**
      * @param st a stereotype UML object
      *                 or a string
      *                 or a collection of stereotypes
      *                 or a modelelement of which the stereotypes are retrieved
      * @return a string representing the given stereotype(s)
+     * @deprecated by mvw in V0.25.5. Use the previous method instead,
+     * with the arguments Map.
+     * Rationale: Use the args Map instead of accessing the Project from here.
      */
     public static String generateStereotype(Object st) {
         if (st == null) {

Modified: trunk/src/argouml-app/src/org/argouml/notation/providers/uml/OperationNotationUml.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/notation/providers/uml/OperationNotationUml.java?view=diff&rev=14796&p1=trunk/src/argouml-app/src/org/argouml/notation/providers/uml/OperationNotationUml.java&p2=trunk/src/argouml-app/src/org/argouml/notation/providers/uml/OperationNotationUml.java&r1=14795&r2=14796
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/notation/providers/uml/OperationNotationUml.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/notation/providers/uml/OperationNotationUml.java	2008-05-23 23:15:55-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 2005-2007 The Regents of the University of California. All
+// Copyright (c) 2005-2008 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -487,13 +487,13 @@
 
         try {
             String stereoStr = NotationUtilityUml.generateStereotype(
-                    Model.getFacade().getStereotypes(modelElement));
+                    Model.getFacade().getStereotypes(modelElement), args);
             boolean isReception = Model.getFacade().isAReception(modelElement);
             // TODO: needs I18N
             if (isReception) {
                 stereoStr =
                         NotationUtilityUml
-                                .generateStereotype(RECEPTION_KEYWORD)
+                                .generateStereotype(RECEPTION_KEYWORD, args)
                                 + " " + stereoStr;
             }
             String visStr = NotationUtilityUml.generateVisibility(modelElement);
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.