svn commit: r19195 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: thn
Date: 2011-04-05 08:44:17-0700
New Revision: 19195
Modified:
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
Log:
UML2 issue 6217: fix by Laurent Braud for Use case diagram
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=19195&r1=19194&r2=19195
==============================================================================
--- 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 2011-04-05 08:44:17-0700
@@ -10,7 +10,8 @@
* Tom Morris - initial implementation
* Bogdan Pistol - initial implementation
* Bob Tarling
- * Thomas Neustupny
+ * Thomas Neustupny
+ * Laurent Braud
*****************************************************************************/
package org.argouml.model.euml;
@@ -681,9 +682,29 @@
// return result;
}
- public Collection getExtenders(Object handle) {
- throw new NotYetImplementedException();
-
+ /**
+ *
+ * @param handle
+ * @see org.argouml.model.Facade#getExtenders(java.lang.Object)
+ */
+ public Collection<Extend> getExtenders(Object handle) {
+ if (isAUseCase(handle)) {
+ ArrayList<Extend> extenders = new ArrayList<Extend>();
+ Model oModel=((Element) handle).getModel();
+ EList<Element> allElement = oModel.allOwnedElements();
+ for (Element element : allElement) {
+ if(isAExtend(element)){
+ Extend aExtend = (Extend) element;
+
+ if(aExtend.getExtendedCase().equals(handle)){
+ extenders.add(aExtend);
+ }
+ }
+ }
+ return extenders;
+ }
+
+ throw new IllegalArgumentException();
}
public Collection<Extend> getExtends(Object handle) {
@@ -789,9 +810,29 @@
}
- public Collection getIncluders(Object handle) {
- throw new NotYetImplementedException();
-
+ /**
+ *
+ * @param handle
+ * @see org.argouml.model.Facade#getIncluders(java.lang.Object)
+ */
+ public Collection<Include> getIncluders(Object handle) {
+
+ if (isAUseCase(handle)) {
+ ArrayList<Include> includers = new ArrayList<Include>();
+ Model oModel = ((Element) handle).getModel();
+ EList<Element> allElement=oModel.allOwnedElements();
+ for (Element element : allElement) {
+ if(isAInclude(element)){
+ Include aInclude = (Include) element;
+ if(aInclude.getAddition().equals(handle)){
+ includers.add(aInclude);
+ }
+ }
+ }
+ return includers;
+ }
+
+ throw new IllegalArgumentException();
}
public Collection<Include> getIncludes(Object handle) {
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2717191
To unsubscribe from this discussion, e-mail: [[email protected]].