svn commit: r17159 - branches/BRANCH_0_28_x/src/argouml-core-diagrams-sequence2: . src/org/argouml/sequence2/diagram

Linus Tolke <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: linus
Date: 2009-06-28 05:02:59-0700
New Revision: 17159

Modified:
   branches/BRANCH_0_28_x/src/argouml-core-diagrams-sequence2/   (props changed)
   branches/BRANCH_0_28_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramGraphModel.java
   branches/BRANCH_0_28_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/UMLSequenceDiagram.java

Log:
Merged in r17147 from trunk (solution to Issue 5811).

Modified: branches/BRANCH_0_28_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramGraphModel.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_28_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramGraphModel.java?view=diff&pathrev=17159&r1=17158&r2=17159
==============================================================================
--- branches/BRANCH_0_28_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramGraphModel.java	(original)
+++ branches/BRANCH_0_28_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramGraphModel.java	2009-06-28 05:02:59-0700
@@ -149,6 +149,7 @@
      */
     public Object getCollaboration() {
         if (collaboration == null) {
+            LOG.debug("The collaboration is null so creating a new collaboration");
             collaboration =
                 Model.getCollaborationsFactory().buildCollaboration(
                         ProjectManager.getManager().getCurrentProject()
@@ -163,6 +164,7 @@
      * @param c the collaboration
      */
     public void setCollaboration(Object c) {
+        LOG.debug("Setting the collaboration of sequence diagram to " + c);
         collaboration = c;
         Collection interactions = Model.getFacade().getInteractions(c);
         if (!interactions.isEmpty()) {

Modified: branches/BRANCH_0_28_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/UMLSequenceDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_28_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/UMLSequenceDiagram.java?view=diff&pathrev=17159&r1=17158&r2=17159
==============================================================================
--- branches/BRANCH_0_28_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/UMLSequenceDiagram.java	(original)
+++ branches/BRANCH_0_28_x/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/UMLSequenceDiagram.java	2009-06-28 05:02:59-0700
@@ -104,6 +104,24 @@
         setNamespace(collaboration);
     }
     
+    
+    /**
+     * Method called by PGML parser during diagram load to initialize a diagram.
+     * We are passed the owner of that diagram which is the collaboration.
+     * @param owner UML model element representing the collaboration
+     * @see org.tigris.gef.base.Diagram#initialize(java.lang.Object)
+     */
+    @Override
+    public void initialize(Object owner) {
+        super.initialize(owner);
+        SequenceDiagramGraphModel gm =
+            (SequenceDiagramGraphModel) getGraphModel();
+        gm.setCollaboration(owner);
+    }
+
+    
+    
+    
     /**
      * Get the Uml actions that can be performed in the diagram 
      * @return An array with the Uml actions

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

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.