svn commit: r16587 - branches/work_issue1048_dthompson/src/argouml-app: . META-INF lib src/org/argouml/i18n src/org/argouml/notation/providers/uml src/org/argouml/ui src/org/argouml/uml/diagram/collaboration/ui src/org/argouml/uml/diagram/ui tests/org/argouml/profile

Dave Thompson <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: dthompson
Date: 2009-01-13 12:43:18-0800
New Revision: 16587

Added:
   branches/work_issue1048_dthompson/src/argouml-app/lib/gef-0.13M4.jar
      - copied unchanged from r16586, /trunk/src/argouml-app/lib/gef-0.13M4.jar
Removed:
   branches/work_issue1048_dthompson/src/argouml-app/lib/gef-0.13M3.jar
Modified:
   branches/work_issue1048_dthompson/src/argouml-app/   (props changed)
   branches/work_issue1048_dthompson/src/argouml-app/.classpath
   branches/work_issue1048_dthompson/src/argouml-app/ArgoUML DEBUG.launch
   branches/work_issue1048_dthompson/src/argouml-app/ArgoUML.launch
   branches/work_issue1048_dthompson/src/argouml-app/META-INF/MANIFEST.MF
   branches/work_issue1048_dthompson/src/argouml-app/build.properties
   branches/work_issue1048_dthompson/src/argouml-app/lib/.classpath
   branches/work_issue1048_dthompson/src/argouml-app/lib/build.properties
   branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/i18n/aboutbox.properties
   branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/AbstractMessageNotationUml.java
   branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/MessageNotationUml.java
   branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/SDMessageNotationUml.java
   branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/ui/AboutBox.java
   branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigAssociationRole.java
   branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigClassifierRole.java
   branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java
   branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/FigStereotypesGroup.java
   branches/work_issue1048_dthompson/src/argouml-app/tests/org/argouml/profile/   (props changed)

Log:
Merging changes from trunk to branch (catch up).

Modified: branches/work_issue1048_dthompson/src/argouml-app/.classpath
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/.classpath?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/.classpath	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/.classpath	2009-01-13 12:43:18-0800
@@ -6,8 +6,7 @@
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/commons-logging-1.0.2.jar"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/gef"/>
-	<classpathentry exported="true" kind="lib" path="lib/gef-0.13M3.jar" sourcepath="/gef/src"/>
+	<classpathentry exported="true" kind="lib" path="lib/gef-0.13M4.jar" sourcepath="/gef/src"/>
 	<classpathentry exported="true" kind="lib" path="lib/ocl-argo-1.1.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/swidgets-0.1.4.jar" sourcepath="/swidgets/src"/>
 	<classpathentry exported="true" kind="lib" path="lib/toolbar-1.4.1-20071227.jar" sourcepath="/toolbar/src"/>

Modified: branches/work_issue1048_dthompson/src/argouml-app/ArgoUML DEBUG.launch
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/ArgoUML%20DEBUG.launch?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/ArgoUML DEBUG.launch	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/ArgoUML DEBUG.launch	2009-01-13 12:43:18-0800
@@ -28,7 +28,7 @@
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry path=&quot;3&quot; projectName=&quot;argouml-app&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/antlr-2.7.7.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/commons-logging-1.0.2.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/gef-0.13M3.jar&quot; path=&quot;3&quot; sourceAttachmentPath=&quot;/gef/src&quot; sourceRootPath=&quot;&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/gef-0.13M4.jar&quot; path=&quot;3&quot; sourceAttachmentPath=&quot;/gef/src&quot; sourceRootPath=&quot;&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/ocl-argo-1.1.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/swidgets-0.1.4.jar&quot; path=&quot;3&quot; sourceAttachmentPath=&quot;/swidgets/src&quot; sourceRootPath=&quot;&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/toolbar-1.4.1-20071227.jar&quot; path=&quot;3&quot; sourceAttachmentPath=&quot;/toolbar/src&quot; sourceRootPath=&quot;&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>

Modified: branches/work_issue1048_dthompson/src/argouml-app/ArgoUML.launch
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/ArgoUML.launch?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/ArgoUML.launch	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/ArgoUML.launch	2009-01-13 12:43:18-0800
@@ -28,7 +28,7 @@
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry path=&quot;3&quot; projectName=&quot;argouml-app&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/antlr-2.7.7.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/commons-logging-1.0.2.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/gef-0.13M3.jar&quot; path=&quot;3&quot; sourceAttachmentPath=&quot;/gef/src&quot; sourceRootPath=&quot;&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/gef-0.13M4.jar&quot; path=&quot;3&quot; sourceAttachmentPath=&quot;/gef/src&quot; sourceRootPath=&quot;&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/ocl-argo-1.1.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/swidgets-0.1.4.jar&quot; path=&quot;3&quot; sourceAttachmentPath=&quot;/swidgets/src&quot; sourceRootPath=&quot;&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/argouml-app/lib/toolbar-1.4.1-20071227.jar&quot; path=&quot;3&quot; sourceAttachmentPath=&quot;/toolbar/src&quot; sourceRootPath=&quot;&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>

Modified: branches/work_issue1048_dthompson/src/argouml-app/META-INF/MANIFEST.MF
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/META-INF/MANIFEST.MF?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/META-INF/MANIFEST.MF	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/META-INF/MANIFEST.MF	2009-01-13 12:43:18-0800
@@ -167,7 +167,7 @@
 Eclipse-RegisterBuddy: org.argouml.core.infra
 Bundle-ClassPath: lib/antlr-2.7.7.jar,
  lib/commons-logging-1.0.2.jar,
- lib/gef-0.13M3.jar,
+ lib/gef-0.13M4.jar,
  lib/ocl-argo-1.1.jar,
  lib/swidgets-0.1.4.jar,
  lib/toolbar-1.4.1-20071227.jar,

Modified: branches/work_issue1048_dthompson/src/argouml-app/build.properties
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/build.properties?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/build.properties	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/build.properties	2009-01-13 12:43:18-0800
@@ -3,7 +3,7 @@
                .,\
                lib/antlr-2.7.7.jar,\
                lib/commons-logging-1.0.2.jar,\
-               lib/gef-0.13M3.jar,\
+               lib/gef-0.13M4.jar,\
                lib/ocl-argo-1.1.jar,\
                lib/swidgets-0.1.4.jar,\
                lib/toolbar-1.4.1-20071227.jar

Modified: branches/work_issue1048_dthompson/src/argouml-app/lib/.classpath
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/lib/.classpath?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/lib/.classpath	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/lib/.classpath	2009-01-13 12:43:18-0800
@@ -8,6 +8,6 @@
 	<classpathentry exported="true" kind="lib" path="swidgets-0.1.4.jar"/>
 	<classpathentry exported="true" kind="lib" path="toolbar-1.4.1-20071227.jar" sourcepath="/toolbar"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry exported="true" kind="lib" path="gef-0.13M3.jar" sourcepath="/gef"/>
+	<classpathentry exported="true" kind="lib" path="gef-0.13M4.jar" sourcepath="/gef"/>
 	<classpathentry kind="output" path="build-eclipse"/>
 </classpath>

Modified: branches/work_issue1048_dthompson/src/argouml-app/lib/build.properties
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/lib/build.properties?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/lib/build.properties	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/lib/build.properties	2009-01-13 12:43:18-0800
@@ -5,4 +5,4 @@
                ocl-argo-1.1.jar,\
                swidgets-0.1.4.jar,\
                toolbar-1.4.jar,\
-               gef-0.13M3.jar
+               gef-0.13M4.jar

Removed: branches/work_issue1048_dthompson/src/argouml-app/lib/gef-0.13M3.jar
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/lib/gef-0.13M3.jar?view=markup&pathrev=16586

Modified: branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/i18n/aboutbox.properties
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/i18n/aboutbox.properties?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/i18n/aboutbox.properties	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/i18n/aboutbox.properties	2009-01-13 12:43:18-0800
@@ -155,6 +155,7 @@
 	We wouldn't be here without your work!\n
 
 aboutbox.used-tools-header = \nUses the following tools:\n
+aboutbox.loaded-modules-header = \nThe following modules are loaded:\n
 
 aboutbox.tab.splash = Splash
 aboutbox.tab.version = Version

Modified: branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/AbstractMessageNotationUml.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/AbstractMessageNotationUml.java?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/AbstractMessageNotationUml.java	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/AbstractMessageNotationUml.java	2009-01-13 12:43:18-0800
@@ -56,9 +56,9 @@
  * <pre>
  * intno := integer|name
  * seq := intno ['.' intno]*
- * recurrance := '*'['//'] | '*'['//']'[' <i>iteration </i>']' | '['
+ * recurrence := '*'['//'] | '*'['//']'[' <i>iteration </i>']' | '['
  * <i>condition </i>']'
- * seqelem := {[intno] ['['recurrance']']}
+ * seqelem := {[intno] ['['recurrence']']}
  * seq_expr := seqelem ['.' seqelem]*
  * ret_list := lvalue [',' lvalue]*
  * arg_list := rvalue [',' rvalue]*
@@ -78,8 +78,8 @@
  * Actually, only a subset of this syntax is currently supported, and some
  * is not even planned to be supported. The exceptions are intno, which
  * allows a number possibly followed by a sequence of letters in the range
- * 'a' - 'z', seqelem, which does not allow a recurrance, and message, which
- * does allow one recurrance near seq_expr. (formerly: name: action )
+ * 'a' - 'z', seqelem, which does not allow a recurrence, and message, which
+ * does allow one recurrence near seq_expr. (formerly: name: action )
  *
  *
  * @see MessageNotationUml
@@ -112,6 +112,92 @@
         parameterCustomSep = initParameterSeparators();
     }
 
+    protected String toString(final Object umlMessage, 
+            boolean showSequenceNumbers) {
+        Iterator it;
+        Collection umlPredecessors;
+        Object umlAction;
+        Object umlActivator; // this is a Message UML object
+        MsgPtr ptr;
+        int lpn;
+        
+        /* Supported format: 
+         *     predecessors number ":" action
+         * The 3 parts of the string to generate: */
+        StringBuilder predecessors = new StringBuilder(); // includes the "/"
+        String number; // the "seq_expr" from the header javadoc
+        // the ":" is not included in "number" - it is always present
+        String action = "";
+
+        if (umlMessage == null) {
+            return "";
+        }
+
+        ptr = new MsgPtr();
+        lpn = recCountPredecessors(umlMessage, ptr) + 1;
+        umlActivator = Model.getFacade().getActivator(umlMessage);
+
+        umlPredecessors = Model.getFacade().getPredecessors(umlMessage);
+        it = (umlPredecessors != null) ? umlPredecessors.iterator() : null;
+        if (it != null && it.hasNext()) {
+            MsgPtr ptr2 = new MsgPtr();
+            int precnt = 0;
+
+            while (it.hasNext()) {
+                Object msg = /*(MMessage)*/ it.next();
+                int mpn = recCountPredecessors(msg, ptr2) + 1;
+
+                if (mpn == lpn - 1
+                    && umlActivator == Model.getFacade().getActivator(msg)
+                    && Model.getFacade().getPredecessors(msg).size() < 2
+                    && (ptr2.message == null
+                        || countSuccessors(ptr2.message) < 2)) {
+                    continue;
+                }
+
+                if (predecessors.length() > 0) {
+                    predecessors.append(", ");
+                }
+                predecessors.append(
+                        generateMessageNumber(msg, ptr2.message, mpn));
+                precnt++;
+            }
+
+            if (precnt > 0) {
+                predecessors.append(" / ");
+            }
+        }
+
+        number = generateMessageNumber(umlMessage, ptr.message, lpn);
+
+        umlAction = Model.getFacade().getAction(umlMessage);
+        if (umlAction != null) {
+            if (Model.getFacade().getRecurrence(umlAction) != null) {
+                number = generateRecurrence(
+                        Model.getFacade().getRecurrence(umlAction))
+                    + " "
+                    + number;
+                /* TODO: The recurrence goes in front of the action? 
+                 * Does this not contradict the header JavaDoc? */
+            }
+
+            action = NotationUtilityUml.generateActionSequence(umlAction);
+
+            /* Dirty fix for issue 1758 (Needs to be amended
+             * when we start supporting parameters):
+             */
+            if (!action.endsWith(")")) {
+                action = action + "()";
+            }
+        }
+
+        if (!showSequenceNumbers) {
+            return action;
+        }
+        return predecessors + number + " : " + action;
+    }
+
+    
     protected List<CustomSeparator> initParameterSeparators() {
         List<CustomSeparator> separators = new ArrayList<CustomSeparator>();
         separators.add(MyTokenizer.SINGLE_QUOTED_SEPARATOR);

Modified: branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/MessageNotationUml.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/MessageNotationUml.java?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/MessageNotationUml.java	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/MessageNotationUml.java	2009-01-13 12:43:18-0800
@@ -24,12 +24,9 @@
 
 package org.argouml.notation.providers.uml;
 
-import java.util.Collection;
-import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.log4j.Logger;
-import org.argouml.model.Model;
 import org.argouml.notation.NotationSettings;
 
 /**
@@ -41,10 +38,10 @@
  * <pre>
  * intno := integer|name
  * seq := intno ['.' intno]*
- * recurrance := '*'['//'] 
+ * recurrence := '*'['//'] 
  *      | '*'['//']'[' <code>iteration </code>']' 
  *      | '['<code>condition </code>']'
- * seqelem := {[intno] ['['recurrance']']}
+ * seqelem := {[intno] ['['recurrence']']}
  * seq_expr := seqelem ['.' seqelem]*
  * ret_list := lvalue [',' lvalue]*
  * arg_list := rvalue [',' rvalue]*
@@ -61,14 +58,14 @@
  *
  * This syntax is compatible with the UML 1.4.2 specification.<p>
  * 
- * TODO: The '//' in the recurrance should be '||' according the standard.
+ * TODO: The '//' in the recurrence should be '||' according the standard.
 See issue 5606. <p>
  *
  * Actually, only a subset of this syntax is currently supported, and some
  * is not even planned to be supported. The exceptions are intno, which
  * allows a number possibly followed by a sequence of letters in the range
- * 'a' - 'z', seqelem, which does not allow a recurrance, and message, which
- * does allow one recurrance near seq_expr. (formerly: name: action )
+ * 'a' - 'z', seqelem, which does not allow a recurrence, and message, which
+ * does allow one recurrence near seq_expr. (formerly: name: action )
  *
  * @author michiel
  */
@@ -91,7 +88,7 @@
 
     @Override
     public String toString(Object modelElement, NotationSettings settings) {
-        return toString(modelElement);
+        return toString(modelElement, true);
     }
 
     /*
@@ -104,88 +101,7 @@
     @SuppressWarnings("deprecation")
     @Deprecated
     public String toString(final Object modelElement, final Map args) {
-        return toString(modelElement);
-    }
-
-    private String toString(final Object umlMessage) {
-        Iterator it;
-        Collection umlPredecessors;
-        Object umlAction;
-        Object umlActivator; // this is a Message UML object
-        MsgPtr ptr;
-        int lpn;
-
-        /* Supported format: 
-         *     predecessors number ":" action
-         * The 3 parts of the string to generate: */
-        StringBuilder predecessors = new StringBuilder(); // includes the "/"
-        String number; // the "seq_expr" from the header javadoc
-        // the ":" is not included in "number" - it is always present
-        String action = "";
-
-        if (umlMessage == null) {
-            return "";
-        }
-
-        ptr = new MsgPtr();
-        lpn = recCountPredecessors(umlMessage, ptr) + 1;
-        umlActivator = Model.getFacade().getActivator(umlMessage);
-
-        umlPredecessors = Model.getFacade().getPredecessors(umlMessage);
-        it = (umlPredecessors != null) ? umlPredecessors.iterator() : null;
-        if (it != null && it.hasNext()) {
-            MsgPtr ptr2 = new MsgPtr();
-            int precnt = 0;
-
-            while (it.hasNext()) {
-                Object msg = /*(MMessage)*/ it.next();
-                int mpn = recCountPredecessors(msg, ptr2) + 1;
-
-                if (mpn == lpn - 1
-                    && umlActivator == Model.getFacade().getActivator(msg)
-                    && Model.getFacade().getPredecessors(msg).size() < 2
-                    && (ptr2.message == null
-                        || countSuccessors(ptr2.message) < 2)) {
-                    continue;
-                }
-
-                if (predecessors.length() > 0) {
-                    predecessors.append(", ");
-                }
-                predecessors.append(
-                        generateMessageNumber(msg, ptr2.message, mpn));
-                precnt++;
-            }
-
-            if (precnt > 0) {
-                predecessors.append(" / ");
-            }
-        }
-
-        number = generateMessageNumber(umlMessage, ptr.message, lpn);
-
-        umlAction = Model.getFacade().getAction(umlMessage);
-        if (umlAction != null) {
-            if (Model.getFacade().getRecurrence(umlAction) != null) {
-                number = generateRecurrence(
-                        Model.getFacade().getRecurrence(umlAction))
-                    + " "
-                    + number;
-                /* TODO: The recurrence goes in front of the action? 
-                 * Does this not contradict the header JavaDoc? */
-            }
-
-            action = NotationUtilityUml.generateActionSequence(umlAction);
-
-            /* Dirty fix for issue 1758 (Needs to be amended
-             * when we start supporting parameters):
-             */
-            if (!action.endsWith(")")) {
-        	action = action + "()";
-            }
-        }
-
-        return predecessors + number + " : " + action;
+        return toString(modelElement, true);
     }
 
 }

Modified: branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/SDMessageNotationUml.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/SDMessageNotationUml.java?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/SDMessageNotationUml.java	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/notation/providers/uml/SDMessageNotationUml.java	2009-01-13 12:43:18-0800
@@ -24,11 +24,8 @@
 
 package org.argouml.notation.providers.uml;
 
-import java.util.Collection;
-import java.util.Iterator;
 import java.util.Map;
 
-import org.argouml.model.Model;
 import org.argouml.notation.NotationProvider;
 import org.argouml.notation.NotationSettings;
 import org.argouml.notation.SDNotationSettings;
@@ -42,9 +39,9 @@
  * <pre>
  * intno := integer|name
  * seq := intno ['.' intno]*
- * recurrance := '*'['//'] | '*'['//']'[' <code>iteration </code>']' | '['
+ * recurrence := '*'['//'] | '*'['//']'[' <code>iteration </code>']' | '['
  * <code>condition </code>']'
- * seqelem := {[intno] ['['recurrance']']}
+ * seqelem := {[intno] ['['recurrence']']}
  * seq_expr := seqelem ['.' seqelem]*
  * ret_list := lvalue [',' lvalue]*
  * arg_list := rvalue [',' rvalue]*
@@ -64,8 +61,8 @@
  * Actually, only a subset of this syntax is currently supported, and some
  * is not even planned to be supported. The exceptions are intno, which
  * allows a number possibly followed by a sequence of letters in the range
- * 'a' - 'z', seqelem, which does not allow a recurrance, and message, which
- * does allow one recurrance near seq_expr. (formerly: name: action )
+ * 'a' - 'z', seqelem, which does not allow a recurrence, and message, which
+ * does allow one recurrence near seq_expr. (formerly: name: action )
  *
  * @author michiel
  */
@@ -107,76 +104,4 @@
                 !NotationProvider.isValue("hideSequenceNrs", args));
     }
 
-    private String toString(final Object modelElement, 
-            boolean showSequenceNumbers) {
-        String action = "";
-        StringBuilder predecessors = new StringBuilder();
-        int lpn;
-
-        if (modelElement == null) {
-            return "";
-        }
-
-        MsgPtr ptr = new MsgPtr();
-        lpn = recCountPredecessors(modelElement, ptr) + 1;
-        Object rt = Model.getFacade().getActivator(modelElement);
-
-        Collection pre = Model.getFacade().getPredecessors(modelElement);
-        Iterator it = (pre != null) ? pre.iterator() : null;
-        if (it != null && it.hasNext()) {
-            MsgPtr ptr2 = new MsgPtr();
-            int precnt = 0;
-
-            while (it.hasNext()) {
-                Object msg = /*(MMessage)*/ it.next();
-                int mpn = recCountPredecessors(msg, ptr2) + 1;
-
-                if (mpn == lpn - 1
-                    && rt == Model.getFacade().getActivator(msg)
-                    && Model.getFacade().getPredecessors(msg).size() < 2
-                    && (ptr2.message == null
-                        || countSuccessors(ptr2.message) < 2)) {
-                    continue;
-                }
-
-                if (predecessors.length() > 0) {
-                    predecessors.append(", ");
-                }
-                predecessors.append(
-                        generateMessageNumber(msg, ptr2.message, mpn));
-                precnt++;
-            }
-
-            if (precnt > 0) {
-                predecessors.append(" / ");
-            }
-        }
-
-        String number = generateMessageNumber(modelElement, ptr.message, lpn);
-
-        Object act = Model.getFacade().getAction(modelElement);
-        if (act != null) {
-            if (Model.getFacade().getRecurrence(act) != null) {
-                number =
-                    generateRecurrence(Model.getFacade().getRecurrence(act))
-                    + " "
-                    + number;
-            }
-
-            action = NotationUtilityUml.generateActionSequence(act);
-
-            /* Dirty fix for issue 1758 (Needs to be amended
-             * when we start supporting parameters):
-             */
-            if (!action.endsWith(")")) {
-                action = action + "()";
-            }
-        }
-
-        if (!showSequenceNumbers) {
-            return action;
-        }
-        return predecessors + number + " : " + action;
-    }
-
 }

Modified: branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/ui/AboutBox.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/ui/AboutBox.java?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/ui/AboutBox.java	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/ui/AboutBox.java	2009-01-13 12:43:18-0800
@@ -31,6 +31,7 @@
 import java.awt.Insets;
 import java.awt.Toolkit;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.Map;
 
 import javax.swing.JPanel;
@@ -40,6 +41,8 @@
 import javax.swing.border.EmptyBorder;
 
 import org.argouml.i18n.Translator;
+import org.argouml.moduleloader.ModuleLoader2;
+import org.argouml.profile.ProfileFacade;
 import org.argouml.util.ArgoDialog;
 import org.argouml.util.Tools;
 
@@ -198,10 +201,21 @@
         buf.append("* NetBeans MDR (mdr.netbeans.org    )\n");
         buf.append("* TU-Dresden OCL-Compiler "
                 	  + "(dresden-ocl.sourceforge.net)\n");
-        buf.append("* ANTLR 2.7.2 (www.antlr.org)\n");
+        buf.append("* ANTLR 2.7.7 (www.antlr.org) *DEPRECATED*\n");
 
-        buf.append("\n\n");
+        buf.append("\n");
+        buf.append(localize("aboutbox.loaded-modules-header"));
+        Iterator<String> iter = ModuleLoader2.allModules().iterator();
+        while (iter.hasNext()) {
+            String moduleName = iter.next();
+            buf.append("\nModule: ");
+            buf.append(moduleName);
+            buf.append("\nDescription: ");
+            String desc = ModuleLoader2.getDescription(moduleName);
+            buf.append(desc.replaceAll("\n\n", "\n"));
+        }
 
+        buf.append("\n\n");
         buf.append(localize("aboutbox.thanks"));
         buf.append("\n");
         return buf.toString();

Modified: branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigAssociationRole.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigAssociationRole.java?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigAssociationRole.java	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigAssociationRole.java	2009-01-13 12:43:18-0800
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2008 The Regents of the University of California. All
+// Copyright (c) 1996-2009 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
@@ -56,7 +56,7 @@
     /**
      * Main Constructor
      * 
-     * @deprecate for 0.27.3 by tfmorris. Use
+     * @deprecated for 0.27.3 by tfmorris. Use
      *            {@link #FigAssociationRole(Object, DiagramSettings)}.
      */
     @SuppressWarnings("deprecation")
@@ -72,7 +72,7 @@
      * 
      * @param edge the owning UML element
      * @param lay the layer
-     * @deprecate for 0.27.3 by tfmorris. Use
+     * @deprecated for 0.27.3 by tfmorris. Use
      *            {@link #FigAssociationRole(Object, DiagramSettings)}.
      */
     @SuppressWarnings("deprecation")
@@ -112,6 +112,12 @@
     	messages.damage();
     }
 
+@Override
+public void computeRouteImpl() {
+    super.computeRouteImpl();
+    messages.updateArrows();
+}
+    
 } /* end class FigAssociationRole */
 
 /**
@@ -121,7 +127,7 @@
 
     /**
      * Constructor for FigMessageGroup.
-     * @deprecate for 0.27.3 by tfmorris. Use
+     * @deprecated for 0.27.3 by tfmorris. Use
      *            {@link #FigMessageGroup(Object, DiagramSettings)}.
      */
     @SuppressWarnings("deprecation")
@@ -134,7 +140,7 @@
      * Constructor for FigMessageGroup.
      * 
      * @param figs
-      * @deprecate for 0.27.3 by tfmorris. Use
+     * @deprecated for 0.27.3 by tfmorris. Use
      *            {@link #FigMessageGroup(Object, DiagramSettings)}.
      */
     @SuppressWarnings("deprecation")
@@ -209,7 +215,15 @@
     public void addFig(Fig f) {
 	super.addFig(f);
 	updateFigPositions();
+	updateArrows();
 	calcBounds();
     }
+    
+    void updateArrows() {
+        for (FigMessage fm : (List<FigMessage>) getFigs()) {
+            fm.updateArrow();
+        }
+    }
+
 }
 

Modified: branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigClassifierRole.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigClassifierRole.java?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigClassifierRole.java	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigClassifierRole.java	2009-01-13 12:43:18-0800
@@ -55,6 +55,10 @@
  */
 public class FigClassifierRole extends FigNodeModelElement {
 
+    private static final int DEFAULT_HEIGHT = 50;
+
+    private static final int DEFAULT_WIDTH = 90;
+
     /**
      * The minimum padding top and bottom.
      */
@@ -126,37 +130,41 @@
         }
     }
 
+    /**
+     * There should be no size calculations here, 
+     * since not all attributes are set yet.
+     */
     private void initClassifierRoleFigs() {
         // The big port and cover. Color of the big port is irrelevant
 
-        setBigPort(new FigRect(X0, Y0, 90, 50, DEBUG_COLOR, DEBUG_COLOR));
-        cover   = new FigRect(X0, Y0, 90, 50, LINE_COLOR, FILL_COLOR);
+        setBigPort(new FigRect(X0, Y0, DEFAULT_WIDTH, DEFAULT_HEIGHT,
+                DEBUG_COLOR, DEBUG_COLOR));
+        cover = new FigRect(X0, Y0, DEFAULT_WIDTH, DEFAULT_HEIGHT, LINE_COLOR,
+                FILL_COLOR);
 
-        // The stereotype. Width is the same as the cover, height is whatever
-        // its minimum permitted is. The text should be centred.
-
-        Dimension stereoMin = getStereotypeFig().getMinimumSize();
+        // The stereotype. Width is the same as the cover, height is its default
+        // (since the font is not yet set). The text should be centered.
 
         getStereotypeFig().setLineWidth(0);
         getStereotypeFig().setVisible(true);
         //getStereotypeFig().setFilled(false);
         getStereotypeFig().setFillColor(DEBUG_COLOR);
-        getStereotypeFig().setBounds(X0, Y0, 90, stereoMin.height);
+        getStereotypeFig().setBounds(X0, Y0, 
+                DEFAULT_WIDTH, getStereotypeFig().getHeight());
 
-        // The name. Width is the same as the cover, height is whatever its
-        // minimum permitted is. The text of the name will be centred by
+        // The name. Width is the same as the cover, height is the default.
+        // The text of the name will be centered by
         // default. In the same place as the stereotype, since at this stage
         // the stereotype is not displayed. Being a classifier role it is
         // underlined
 
-        Dimension nameMin = getNameFig().getMinimumSize();
-
         getNameFig().setLineWidth(0);
         getNameFig().setReturnAction(FigText.END_EDITING);
         getNameFig().setFilled(false);
         getNameFig().setUnderline(true);
 
-        getNameFig().setBounds(X0, Y0, 90, nameMin.height);
+        getNameFig().setBounds(X0, Y0, 
+                DEFAULT_WIDTH, getStereotypeFig().getHeight());
 
         // add Figs to the FigNode in back-to-front order
 
@@ -383,7 +391,8 @@
         int extraEach = (newH - nameMin.height - stereoMin.height) / 2;
         if (!(stereoMin.height == 0 && stereoMin.width == 0)) {
             /* At least one stereotype is visible */
-            getStereotypeFig().setBounds(x, y + extraEach, newW, getStereotypeFig().getHeight());
+            getStereotypeFig().setBounds(x, y + extraEach, newW, 
+                    getStereotypeFig().getHeight());
         }
         getNameFig().setBounds(x, y + stereoMin.height + extraEach, newW,
                 nameMin.height);

Modified: branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java	2009-01-13 12:43:18-0800
@@ -62,7 +62,7 @@
     /**
      * The current arrow direction set to constants above.
      */
-    private int arrowDirection = 0;
+    private int arrowDirection = -1;
 
     /**
      * The main constructor.
@@ -500,10 +500,10 @@
 
 
     /**
-     * Determines the direction of the message arrow. Deetermination of the type
-     * of arrow happens in modelchanged.
+     * Determines the direction of the message arrow. Determination of the type
+     * of arrow happens in modelChanged.
      */
-    protected void updateArrow() {
+    public void updateArrow() {
   	Object mes = getOwner(); // Message
 	if (mes == null || getLayer() == null) {
 	    return;

Modified: branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/FigStereotypesGroup.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/FigStereotypesGroup.java?view=diff&pathrev=16587&r1=16586&r2=16587
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/FigStereotypesGroup.java	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/FigStereotypesGroup.java	2009-01-13 12:43:18-0800
@@ -251,6 +251,22 @@
         return null;
     }
     
+    /**
+     * Get all the child figs that represent the individual stereotypes
+     * @return a List of the stereotype Figs
+     */
+    private List<FigStereotype> getStereotypeFigs() {
+        final List<FigStereotype> stereotypeFigs =
+            new ArrayList<FigStereotype>();
+        for (Object f : getFigs()) {
+            if (f instanceof FigStereotype) {
+                FigStereotype fs = (FigStereotype) f;
+                stereotypeFigs.add(fs);
+            }
+        }
+        return stereotypeFigs;
+    }
+    
     private FigKeyword findFigKeyword() {
         for (Object f : getFigs()) {
             if (f instanceof FigKeyword) {
@@ -431,7 +447,7 @@
         Object modelElement = getOwner();
         
         if (modelElement != null) {
-            Collection stereos = Model.getFacade().getStereotypes(modelElement);
+            List<FigStereotype> stereos = getStereotypeFigs();
             if (stereos.size() > 0 || keyword != null) {
                 int minWidth = 0;
                 int minHeight = 0;

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

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.