svn commit: r13412 - branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: b00__1
Date: 2007-08-20 01:02:31-0700
New Revision: 13412

Modified:
   branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
   branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java

Log:
Fix the attributes (Property) to work

Modified: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java?view=diff&rev=13412&p1=branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java&p2=branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java&r1=13411&r2=13412
==============================================================================
--- branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java	(original)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java	2007-08-20 01:02:31-0700
@@ -730,7 +730,7 @@
     }
 
     public Object getModel(Object handle) {
-        throw new NotYetImplementedException();
+        return ((Element) handle).getModel();
     }
 
     public Object getModelElement(Object handle) {

Modified: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java?view=diff&rev=13412&p1=branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java&p2=branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java&r1=13411&r2=13412
==============================================================================
--- branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java	(original)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java	2007-08-20 01:02:31-0700
@@ -70,20 +70,20 @@
         Listener(PropertyChangeListener listener, String[] properties) {
             this.listener = listener;
             if (properties != null) {
-                props = null;
-                addProperties(properties);
+                setProperties(properties);
             }
         }
 
-        void addProperties(String[] properties) {
+        void setProperties(String[] properties) {
             if (properties == null) {
-                return;
-            }
-            if (props == null) {
-                props = new HashSet<String>();
-            }
-            for (String s : properties) {
-                props.add(s);
+                props = null;
+            } else {
+                if (props == null) {
+                    props = new HashSet<String>();
+                }
+                for (String s : properties) {
+                    props.add(s);
+                }
             }
         }
 
@@ -202,10 +202,7 @@
             } else {
                 for (Listener l : list) {
                     if (l.getListener() == listener) {
-                        // TODO: Do we really want to add new properties to the
-                        // already registered listener or we want to replace the
-                        // old properties
-                        l.addProperties(propertyNames);
+                        l.setProperties(propertyNames);
                         found = true;
                         break;
                     }
@@ -449,6 +446,9 @@
     
     private String mapPropertyName(String name) {
         // TODO: map UML2 names to UML1.x names
+        if (name.equals("ownedAttribute")) {
+            return "feature";
+        }
         return name;
     }
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.