Author: tfmorris
Date: 2007-08-13 19:18:26-0700
New Revision: 13320
Modified:
trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java
Log:
Fix event property name debug code to check given metaclass as well as its superclasses
Modified: trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java?view=diff&rev=13320&p1=trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java&p2=trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java&r1=13319&r2=13320
==============================================================================
--- trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java (original)
+++ trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java 2007-08-13 19:18:26-0700
@@ -863,15 +863,9 @@
}
MofClass metaclass = (MofClass) metaobject;
+ addAttributeAndReferenceNames(names, metaclass);
for (MofClass superclass : (List<MofClass>)metaclass.allSupertypes()) {
- // TODO: This won't find associations which aren't navigable in
- // this direction
- for (Object o : superclass.getContents()) {
- if (o instanceof javax.jmi.model.Reference
- || o instanceof javax.jmi.model.Attribute) {
- names.add(((javax.jmi.model.ModelElement) o).getName());
- }
- }
+ addAttributeAndReferenceNames(names, superclass);
}
for (String attribute : attributes) {
@@ -886,6 +880,8 @@
* all associations, check the types of their association
* ends for one which matches our class, then get the name
*/
+ // TODO: We also have code registering for the names of
+ // a tagged value like "derived"
LOG.error("Property '" + attribute
+ "' for class '"
+ metaclass.getName()
@@ -897,6 +893,18 @@
}
}
}
+
+ private void addAttributeAndReferenceNames(HashSet<String> names,
+ MofClass superclass) {
+ // TODO: This won't find associations which aren't navigable in
+ // this direction
+ for (Object o : superclass.getContents()) {
+ if (o instanceof javax.jmi.model.Reference
+ || o instanceof javax.jmi.model.Attribute) {
+ names.add(((javax.jmi.model.ModelElement) o).getName());
+ }
+ }
+ }
/**
* Getter provided for the dev module to allow it to discover the
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.