svn commit: r16128 - trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2008-11-21 22:26:47-0800
New Revision: 16128

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java

Log:
Mark as deprecated since it is unused and is a duplicate (but update deprecated method usage anyway)

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java?view=diff&rev=16128&p1=trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java&p2=trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java&r1=16127&r2=16128
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java	2008-11-21 22:26:47-0800
@@ -34,6 +34,7 @@
 import org.argouml.kernel.ProjectSettings;

 import org.argouml.kernel.UmlModelMutator;

 import org.argouml.model.Model;

+import org.argouml.notation.providers.uml.NotationUtilityUml;

 import org.tigris.gef.undo.UndoableAction;

 

 

@@ -43,7 +44,10 @@
  * TODO: Appears to be unused?

  * 

  * @author Bob Tarling

+ * @deprecated for 0.27.2 by tfmorris.  Use 

+ * {@link org.argouml.uml.ActionAddStereotype}.

  */

+@Deprecated

 @UmlModelMutator

 class ActionAddStereotype extends UndoableAction {

     private Object modelElement;

@@ -68,9 +72,8 @@
     private static String buildString(Object st) {

         Project p = ProjectManager.getManager().getCurrentProject();

         ProjectSettings ps = p.getProjectSettings();

-        return ps.getLeftGuillemot() 

-            + Model.getFacade().getName(st)

-            + ps.getRightGuillemot();

+        return NotationUtilityUml.generateStereotype(st, 

+                ps.getDefaultDiagramSettings().isUseGuillemets());

     }

 

     /*
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.