svn commit: r19293 - trunk/src/argouml-app: src/org/argouml/notation/providers/uml tests/org/argouml/notation/providers/uml

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2011-05-02 02:39:26-0700
New Revision: 19293

Modified:
   trunk/src/argouml-app/src/org/argouml/notation/providers/uml/OperationNotationUml.java
   trunk/src/argouml-app/tests/org/argouml/notation/providers/uml/TestAttributeAndOperationNotationUml.java

Log:
Removed NOTATION for derived Operations.
See issue 4252 for the reason.

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&pathrev=19293&r1=19292&r2=19293
==============================================================================
--- 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	2011-05-02 02:39:26-0700
@@ -173,14 +173,12 @@
     /**
      * Parse a line of text and aligns the Operation to the specification
      * given. The line should be on the following form:<ul>
-     * <li> / visibility name (parameter list) : return-type-expression
+     * <li> visibility name (parameter list) : return-type-expression
      * {property-string}
      * </ul>
      *
      * All elements are optional and, if left unspecified, will preserve their
      * old values.<p>
-     *
-     * The / for derived has to be the first non-white character. <p>
      * 
      * <em>Stereotypes</em> can be given between any element in the line on the
      * form: &lt;&lt;stereotype1,stereotype2,stereotype3&gt;&gt;<p>
@@ -210,19 +208,10 @@
         String token;
         String type = null;
         String visibility = null;
-        boolean derived = false;
         List<String> properties = null;
         int paramOffset = 0;
 
         s = s.trim();
-
-        /* Handle Derived: */
-        if (s.length() > 0 && "/".indexOf(s.charAt(0)) >= 0) {
-            derived = true;
-            s = s.substring(1);
-            s = s.trim();
-        }
-
         if (s.length() > 0 
                 && NotationUtilityUml.VISIBILITYCHARS.indexOf(s.charAt(0)) 
                     >= 0) {
@@ -327,8 +316,6 @@
         } catch (ParseException pre) {
             throw pre;
         }
-
-        NotationUtilityUml.setDerived(op, derived);
         
         if (parameterlist != null) {
             // parameterlist is guaranteed to contain at least "("

Modified: trunk/src/argouml-app/tests/org/argouml/notation/providers/uml/TestAttributeAndOperationNotationUml.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/notation/providers/uml/TestAttributeAndOperationNotationUml.java?view=diff&pathrev=19293&r1=19292&r2=19293
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/notation/providers/uml/TestAttributeAndOperationNotationUml.java	(original)
+++ trunk/src/argouml-app/tests/org/argouml/notation/providers/uml/TestAttributeAndOperationNotationUml.java	2011-05-02 02:39:26-0700
@@ -120,8 +120,8 @@
         + "{leaf,query} : String";
     private static final String OPER04 = "<<>> # name2()";
     private static final String OPER05 = "<< opstereo1, opstereo2 >>  name5()";
-    private static final String OPER06 = "/name";
-    private static final String OPER07 = "/<<stereo>>#name(a:Integer=1,b:String):Boolean{query, x=1,y=2,z}";
+    private static final String OPER06 = "name";
+    private static final String OPER07 = "<<stereo>>#name(a:Integer=1,b:String):Boolean{query, x=1,y=2,z}";
 
     private static final String NOPER01 = "name(";
     private static final String NOPER02 = "\"name\"()";
@@ -774,7 +774,6 @@
                 "query", null,
                 "root", null,
                 "sequential", null,
-                "derived", "true",
                 "x", "1",
                 "y", "2",
                 "z", "",
@@ -792,67 +791,6 @@
         op = Model.getCoreFactory().buildOperation(cl, returnType);
         checkProperties(op, OPER07, res7);
     }
-    /**
-     * Test the parsing of derived for an operation.
-     *
-     * @throws ParseException if the parsing fails.
-     */
-    public void testOperationDerived()
-        throws ParseException {
-        Object tv;
-        Object op;
-        Object returnType = project.getDefaultReturnType();
-        Object cl = Model.getCoreFactory().buildClass();
-        ExtensionMechanismsFactory emFactory =
-            Model.getExtensionMechanismsFactory();
-        ExtensionMechanismsHelper emHelper =
-            Model.getExtensionMechanismsHelper();
-
-        Model.getCoreHelper().setNamespace(cl, model);
-        Object stereo = emFactory.buildStereotype("mystereo", model);
-
-        op = Model.getCoreFactory().buildOperation(cl, returnType);
-        checkDerived(op, OPER01, false);
-        op = Model.getCoreFactory().buildOperation(cl, returnType);
-        checkDerived(op, OPER02, false);
-        op = Model.getCoreFactory().buildOperation(cl, returnType);
-        checkDerived(op, OPER03, false);
-        op = Model.getCoreFactory().buildOperation(cl, returnType);
-        checkDerived(op, OPER04, false);
-        op = Model.getCoreFactory().buildOperation(cl, returnType);
-        checkDerived(op, OPER05, false);
-        op = Model.getCoreFactory().buildOperation(cl, returnType);
-        checkDerived(op, OPER06, true);
-        op = Model.getCoreFactory().buildOperation(cl, returnType);
-        checkDerived(op, OPER07, true);
-
-        Object td = emFactory.buildTagDefinition(
-                Facade.DERIVED_TAG, stereo, null);
-        
-        op = Model.getCoreFactory().buildOperation(cl, returnType);        
-        tv = emFactory.buildTaggedValue(td, 
-                new String[] {"true"});
-        emHelper.addTaggedValue(op, tv);
-        checkDerived(op, OPER01, false);
-
-        op = Model.getCoreFactory().buildOperation(cl, returnType);
-        tv = emFactory.buildTaggedValue(td, 
-                new String[] {"false"});
-        emHelper.addTaggedValue(op, tv);
-        checkDerived(op, OPER06, true);
-
-        op = Model.getCoreFactory().buildOperation(cl, returnType);        
-        tv = emFactory.buildTaggedValue(td, 
-                new String[] {"foo"});
-        emHelper.addTaggedValue(op, tv);
-        checkDerived(op, OPER01, false);
-        
-        op = Model.getCoreFactory().buildOperation(cl, returnType);
-        tv = emFactory.buildTaggedValue(td, 
-                new String[] {"bar"});
-        emHelper.addTaggedValue(op, tv);
-        checkDerived(op, OPER06, true);
-    }
 
     /**
      * Test the parsing of an operation's stereotype.

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

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.