svn commit: r17514 - trunk/src: argouml-core-model-euml/src/org/argouml/model/euml argouml-core-model-mdr/src/org/argouml/model/mdr argouml-core-model/src/org/argouml/model
Thomas Neustupny <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: thn
Date: 2009-11-21 12:59:06-0800
New Revision: 17514
Modified:
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java
trunk/src/argouml-core-model/src/org/argouml/model/Facade.java
Log:
UML2: adding isAExtension and isAProperty methods
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=17514&r1=17513&r2=17514
==============================================================================
--- 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-11-21 12:59:06-0800
@@ -71,6 +71,7 @@
import org.eclipse.uml2.uml.Event;
import org.eclipse.uml2.uml.Expression;
import org.eclipse.uml2.uml.Extend;
+import org.eclipse.uml2.uml.Extension;
import org.eclipse.uml2.uml.ExtensionPoint;
import org.eclipse.uml2.uml.Feature;
import org.eclipse.uml2.uml.FinalState;
@@ -157,7 +158,7 @@
public String getUmlVersion() {
// TODO: Can we get this from the metamodel?
- return "2.1.1"; //$NON-NLS-1$
+ return "2.2"; //$NON-NLS-1$
}
public boolean equalsPseudostateKind(Object ps1, Object ps2) {
@@ -1719,6 +1720,10 @@
return handle instanceof Extend;
}
+ public boolean isAExtension(Object handle) {
+ return handle instanceof Extension;
+ }
+
public boolean isAExtensionPoint(Object handle) {
return handle instanceof ExtensionPoint;
}
@@ -1878,7 +1883,11 @@
public boolean isAProfile(Object handle) {
return handle instanceof Profile;
}
-
+
+ public boolean isAProperty(Object handle) {
+ return handle instanceof Property;
+ }
+
public boolean isAPseudostate(Object handle) {
return handle instanceof Pseudostate;
}
Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java?view=diff&pathrev=17514&r1=17513&r2=17514
==============================================================================
--- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java (original)
+++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java 2009-11-21 12:59:06-0800
@@ -438,6 +438,11 @@
return handle instanceof Extend;
}
+ public boolean isAExtension(Object handle) {
+ throw new NotImplementedException(
+ "There are no extensions in UML 1.x");
+ }
+
public boolean isAExtensionPoint(Object handle) {
return handle instanceof ExtensionPoint;
}
@@ -587,6 +592,11 @@
return false;
}
+ public boolean isAProperty(Object handle) {
+ throw new NotImplementedException(
+ "There are no UML Property objects in UML 1.x");
+ }
+
public boolean isAPseudostate(Object handle) {
return handle instanceof Pseudostate;
}
Modified: trunk/src/argouml-core-model/src/org/argouml/model/Facade.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model/src/org/argouml/model/Facade.java?view=diff&pathrev=17514&r1=17513&r2=17514
==============================================================================
--- trunk/src/argouml-core-model/src/org/argouml/model/Facade.java (original)
+++ trunk/src/argouml-core-model/src/org/argouml/model/Facade.java 2009-11-21 12:59:06-0800
@@ -509,6 +509,14 @@
boolean isAExtend(Object handle);
/**
+ * Recognizer for Extension. For UML2 only.
+ *
+ * @param handle candidate
+ * @return true if handle is an ExtensionPoint
+ */
+ boolean isAExtension(Object handle);
+
+ /**
* Recognizer for ExtensionPoint.
*
* @param handle candidate
@@ -793,9 +801,17 @@
* model instance with a <<profile>> stereotype.
*
* @param handle candidate
- * @return true if handle is a Model
+ * @return true if handle is a Profile
*/
boolean isAProfile(Object handle);
+
+ /**
+ * Recognizer for Property. UML 2 only.
+ *
+ * @param handle candidate
+ * @return true if handle is a Property
+ */
+ boolean isAProperty(Object handle);
/**
* Recognizer for Pseudostate.
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2422905
To unsubscribe from this discussion, e-mail: [[email protected]].