svn commit: r13403 - branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: b00__1
Date: 2007-08-18 16:15:05-0700
New Revision: 13403
Modified:
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
Log:
Fix to work with any element not just NamedElements (for example a Generalization can be owned by a Class and it is not a NamedElement).
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=13403&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=13402&r2=13403
==============================================================================
--- 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-18 16:15:05-0700
@@ -771,8 +771,12 @@
// throw new IllegalArgumentException();
}
- public Namespace getNamespace(Object handle) {
- return ((NamedElement) handle).getNamespace();
+ public Object getNamespace(Object handle) {
+ Object o = ((Element) handle).getOwner();
+ if (o instanceof Namespace) {
+ return o;
+ }
+ return null;
}
public Object getNextEnd(Object handle) {