svn commit: r17055 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
Thomas Neustupny <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: thn
Date: 2009-04-06 10:28:50-0700
New Revision: 17055
Modified:
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
Log:
UML2 a first implementation of the getBaseClasses method
Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java?view=diff&pathrev=17055&r1=17054&r2=17055
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java (original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java 2009-04-06 10:28:50-0700
@@ -53,6 +53,7 @@
import org.eclipse.uml2.uml.CallAction;
import org.eclipse.uml2.uml.CallEvent;
import org.eclipse.uml2.uml.ChangeEvent;
+import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Collaboration;
import org.eclipse.uml2.uml.CollaborationUse;
@@ -304,9 +305,20 @@
throw new NotYetImplementedException();
}
- public Collection getBaseClasses(Object handle) {
- throw new NotYetImplementedException();
-
+ public Collection<String> getBaseClasses(Object handle) {
+ if (isAStereotype(handle)) {
+ // TODO: it's an implementation, but is it correct? - thn
+ EList<Class> eList =
+ ((Stereotype) handle).getAllExtendedMetaclasses();
+ ArrayList<String> list = new ArrayList<String>();
+ Iterator iter = eList.iterator();
+ while (iter.hasNext()) {
+ list.add(((Class) iter.next()).getName());
+ }
+ return list;
+ }
+ throw new IllegalArgumentException(
+ "handle must be instance of Stereotype");
}
public Collection getBases(Object handle) {
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=1563412
To unsubscribe from this discussion, e-mail: [[email protected]].