svn commit: r16449 - trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigState.java

Michiel van der Wulp <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2008-12-28 08:30:54-0800
New Revision: 16449

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

Log:
I think this is a better way of initializing the notation provider.

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigState.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigState.java?view=diff&pathrev=16449&r1=16448&r2=16449
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigState.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigState.java	2008-12-28 08:30:54-0800
@@ -33,6 +33,8 @@
 import org.argouml.model.AssociationChangeEvent;
 import org.argouml.model.AttributeChangeEvent;
 import org.argouml.model.Model;
+import org.argouml.notation.Notation;
+import org.argouml.notation.NotationName;
 import org.argouml.notation.NotationProvider;
 import org.argouml.notation.NotationProviderFactory2;
 import org.argouml.uml.diagram.DiagramSettings;
@@ -104,7 +106,14 @@
      */
     public FigState(Object owner, Rectangle bounds, DiagramSettings settings) {
         super(owner, bounds, settings);
+
         initializeState();
+
+        NotationName notation = Notation.findNotation(
+                getNotationSettings().getNotationLanguage());
+        notationProviderBody =
+            NotationProviderFactory2.getInstance().getNotationProvider(
+                    NotationProviderFactory2.TYPE_STATEBODY, getOwner(), this, notation);
     }
 
     private void initializeState() {
@@ -151,10 +160,12 @@
             notationProviderBody.cleanListener(this, own);
         }
         super.initNotationProviders(own);
+        NotationName notation = Notation.findNotation(
+                getNotationSettings().getNotationLanguage());
         if (Model.getFacade().isAState(own)) {
             notationProviderBody =
                 NotationProviderFactory2.getInstance().getNotationProvider(
-                        NotationProviderFactory2.TYPE_STATEBODY, own, this);
+                        NotationProviderFactory2.TYPE_STATEBODY, own, this, notation);
         }
     }

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

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.