commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gu...@apache.org
Subject svn commit: r960905 [4/4] - in /commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling: model/ src/org/apache/commons/scxml/modeling/ src/org/apache/commons/scxml/modeling/impl/ src/org/apache/commons/scxml/modeli...
Date Tue, 06 Jul 2010 14:44:46 GMT
Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/RaiseImpl.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/RaiseImpl.java?rev=960905&r1=960904&r2=960905&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/RaiseImpl.java
(original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/RaiseImpl.java
Tue Jul  6 14:44:45 2010
@@ -18,14 +18,22 @@
  */
 package org.apache.commons.scxml.modeling.impl;
 
+import java.util.Collection;
+import org.apache.commons.scxml.modeling.Content;
 import org.apache.commons.scxml.modeling.ModelingPackage;
+import org.apache.commons.scxml.modeling.Param;
 import org.apache.commons.scxml.modeling.Raise;
 
 import org.eclipse.emf.common.notify.Notification;
 
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EClass;
 
+import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
 
 /**
  * <!-- begin-user-doc -->
@@ -35,6 +43,8 @@ import org.eclipse.emf.ecore.impl.ENotif
  * The following features are implemented:
  * <ul>
  *   <li>{@link org.apache.commons.scxml.modeling.impl.RaiseImpl#getEvent <em>Event</em>}</li>
+ *   <li>{@link org.apache.commons.scxml.modeling.impl.RaiseImpl#getParam <em>Param</em>}</li>
+ *   <li>{@link org.apache.commons.scxml.modeling.impl.RaiseImpl#getContent <em>Content</em>}</li>
  * </ul>
  * </p>
  *
@@ -62,6 +72,26 @@ public class RaiseImpl extends Executabl
 	protected String event = EVENT_EDEFAULT;
 
 	/**
+	 * The cached value of the '{@link #getParam() <em>Param</em>}' containment
reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getParam()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList param;
+
+	/**
+	 * The cached value of the '{@link #getContent() <em>Content</em>}' containment
reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getContent()
+	 * @generated
+	 * @ordered
+	 */
+	protected Content content;
+
+	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -105,10 +135,84 @@ public class RaiseImpl extends Executabl
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public EList getParam() {
+		if (param == null) {
+			param = new EObjectContainmentEList(Param.class, this, ModelingPackage.RAISE__PARAM);
+		}
+		return param;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public Content getContent() {
+		return content;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetContent(Content newContent, NotificationChain msgs) {
+		Content oldContent = content;
+		content = newContent;
+		if (eNotificationRequired()) {
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelingPackage.RAISE__CONTENT,
oldContent, newContent);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setContent(Content newContent) {
+		if (newContent != content) {
+			NotificationChain msgs = null;
+			if (content != null)
+				msgs = ((InternalEObject)content).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelingPackage.RAISE__CONTENT,
null, msgs);
+			if (newContent != null)
+				msgs = ((InternalEObject)newContent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelingPackage.RAISE__CONTENT,
null, msgs);
+			msgs = basicSetContent(newContent, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, ModelingPackage.RAISE__CONTENT,
newContent, newContent));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain
msgs) {
+		switch (featureID) {
+			case ModelingPackage.RAISE__PARAM:
+				return ((InternalEList)getParam()).basicRemove(otherEnd, msgs);
+			case ModelingPackage.RAISE__CONTENT:
+				return basicSetContent(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
 		switch (featureID) {
 			case ModelingPackage.RAISE__EVENT:
 				return getEvent();
+			case ModelingPackage.RAISE__PARAM:
+				return getParam();
+			case ModelingPackage.RAISE__CONTENT:
+				return getContent();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -123,6 +227,13 @@ public class RaiseImpl extends Executabl
 			case ModelingPackage.RAISE__EVENT:
 				setEvent((String)newValue);
 				return;
+			case ModelingPackage.RAISE__PARAM:
+				getParam().clear();
+				getParam().addAll((Collection)newValue);
+				return;
+			case ModelingPackage.RAISE__CONTENT:
+				setContent((Content)newValue);
+				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -137,6 +248,12 @@ public class RaiseImpl extends Executabl
 			case ModelingPackage.RAISE__EVENT:
 				setEvent(EVENT_EDEFAULT);
 				return;
+			case ModelingPackage.RAISE__PARAM:
+				getParam().clear();
+				return;
+			case ModelingPackage.RAISE__CONTENT:
+				setContent((Content)null);
+				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -150,6 +267,10 @@ public class RaiseImpl extends Executabl
 		switch (featureID) {
 			case ModelingPackage.RAISE__EVENT:
 				return EVENT_EDEFAULT == null ? event != null : !EVENT_EDEFAULT.equals(event);
+			case ModelingPackage.RAISE__PARAM:
+				return param != null && !param.isEmpty();
+			case ModelingPackage.RAISE__CONTENT:
+				return content != null;
 		}
 		return super.eIsSet(featureID);
 	}

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/ScriptImpl.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/ScriptImpl.java?rev=960905&r1=960904&r2=960905&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/ScriptImpl.java
(original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/ScriptImpl.java
Tue Jul  6 14:44:45 2010
@@ -21,8 +21,10 @@ package org.apache.commons.scxml.modelin
 import org.apache.commons.scxml.modeling.ModelingPackage;
 import org.apache.commons.scxml.modeling.Script;
 
+import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.ecore.EClass;
 
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.impl.EObjectImpl;
 
 /**
@@ -30,11 +32,34 @@ import org.eclipse.emf.ecore.impl.EObjec
  * An implementation of the model object '<em><b>Script</b></em>'.
  * <!-- end-user-doc -->
  * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.apache.commons.scxml.modeling.impl.ScriptImpl#getScript_content
<em>Script content</em>}</li>
+ * </ul>
  * </p>
  *
  * @generated
  */
-public class ScriptImpl extends EObjectImpl implements Script {
+public class ScriptImpl extends ExecutableContentImpl implements Script {
+	/**
+	 * The default value of the '{@link #getScript_content() <em>Script content</em>}'
attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getScript_content()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String SCRIPT_CONTENT_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getScript_content() <em>Script content</em>}'
attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getScript_content()
+	 * @generated
+	 * @ordered
+	 */
+	protected String script_content = SCRIPT_CONTENT_EDEFAULT;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -53,4 +78,94 @@ public class ScriptImpl extends EObjectI
 		return ModelingPackage.Literals.SCRIPT;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getScript_content() {
+		return script_content;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setScript_content(String newScript_content) {
+		String oldScript_content = script_content;
+		script_content = newScript_content;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, ModelingPackage.SCRIPT__SCRIPT_CONTENT,
oldScript_content, script_content));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public Object eGet(int featureID, boolean resolve, boolean coreType) {
+		switch (featureID) {
+			case ModelingPackage.SCRIPT__SCRIPT_CONTENT:
+				return getScript_content();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void eSet(int featureID, Object newValue) {
+		switch (featureID) {
+			case ModelingPackage.SCRIPT__SCRIPT_CONTENT:
+				setScript_content((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case ModelingPackage.SCRIPT__SCRIPT_CONTENT:
+				setScript_content(SCRIPT_CONTENT_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case ModelingPackage.SCRIPT__SCRIPT_CONTENT:
+				return SCRIPT_CONTENT_EDEFAULT == null ? script_content != null : !SCRIPT_CONTENT_EDEFAULT.equals(script_content);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String toString() {
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (script_content: ");
+		result.append(script_content);
+		result.append(')');
+		return result.toString();
+	}
+
 } //ScriptImpl

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/ServiceTemplateImpl.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/ServiceTemplateImpl.java?rev=960905&r1=960904&r2=960905&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/ServiceTemplateImpl.java
(original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/ServiceTemplateImpl.java
Tue Jul  6 14:44:45 2010
@@ -229,14 +229,14 @@ public class ServiceTemplateImpl extends
 	protected EList parallel;
 
 	/**
-	 * The cached value of the '{@link #getDataModel() <em>Data Model</em>}' containment
reference list.
+	 * The cached value of the '{@link #getDataModel() <em>Data Model</em>}' containment
reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @see #getDataModel()
 	 * @generated
 	 * @ordered
 	 */
-	protected EList dataModel;
+	protected DataModel dataModel;
 
 	/**
 	 * The cached value of the '{@link #getScript() <em>Script</em>}' containment
reference.
@@ -445,10 +445,7 @@ public class ServiceTemplateImpl extends
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EList getDataModel() {
-		if (dataModel == null) {
-			dataModel = new EObjectContainmentEList(DataModel.class, this, ModelingPackage.SERVICE_TEMPLATE__DATA_MODEL);
-		}
+	public DataModel getDataModel() {
 		return dataModel;
 	}
 
@@ -457,6 +454,40 @@ public class ServiceTemplateImpl extends
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetDataModel(DataModel newDataModel, NotificationChain msgs)
{
+		DataModel oldDataModel = dataModel;
+		dataModel = newDataModel;
+		if (eNotificationRequired()) {
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelingPackage.SERVICE_TEMPLATE__DATA_MODEL,
oldDataModel, newDataModel);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setDataModel(DataModel newDataModel) {
+		if (newDataModel != dataModel) {
+			NotificationChain msgs = null;
+			if (dataModel != null)
+				msgs = ((InternalEObject)dataModel).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelingPackage.SERVICE_TEMPLATE__DATA_MODEL,
null, msgs);
+			if (newDataModel != null)
+				msgs = ((InternalEObject)newDataModel).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelingPackage.SERVICE_TEMPLATE__DATA_MODEL,
null, msgs);
+			msgs = basicSetDataModel(newDataModel, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, ModelingPackage.SERVICE_TEMPLATE__DATA_MODEL,
newDataModel, newDataModel));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public Script getScript() {
 		return script;
 	}
@@ -511,7 +542,7 @@ public class ServiceTemplateImpl extends
 			case ModelingPackage.SERVICE_TEMPLATE__PARALLEL:
 				return ((InternalEList)getParallel()).basicRemove(otherEnd, msgs);
 			case ModelingPackage.SERVICE_TEMPLATE__DATA_MODEL:
-				return ((InternalEList)getDataModel()).basicRemove(otherEnd, msgs);
+				return basicSetDataModel(null, msgs);
 			case ModelingPackage.SERVICE_TEMPLATE__SCRIPT:
 				return basicSetScript(null, msgs);
 		}
@@ -595,8 +626,7 @@ public class ServiceTemplateImpl extends
 				getParallel().addAll((Collection)newValue);
 				return;
 			case ModelingPackage.SERVICE_TEMPLATE__DATA_MODEL:
-				getDataModel().clear();
-				getDataModel().addAll((Collection)newValue);
+				setDataModel((DataModel)newValue);
 				return;
 			case ModelingPackage.SERVICE_TEMPLATE__SCRIPT:
 				setScript((Script)newValue);
@@ -643,7 +673,7 @@ public class ServiceTemplateImpl extends
 				getParallel().clear();
 				return;
 			case ModelingPackage.SERVICE_TEMPLATE__DATA_MODEL:
-				getDataModel().clear();
+				setDataModel((DataModel)null);
 				return;
 			case ModelingPackage.SERVICE_TEMPLATE__SCRIPT:
 				setScript((Script)null);
@@ -680,7 +710,7 @@ public class ServiceTemplateImpl extends
 			case ModelingPackage.SERVICE_TEMPLATE__PARALLEL:
 				return parallel != null && !parallel.isEmpty();
 			case ModelingPackage.SERVICE_TEMPLATE__DATA_MODEL:
-				return dataModel != null && !dataModel.isEmpty();
+				return dataModel != null;
 			case ModelingPackage.SERVICE_TEMPLATE__SCRIPT:
 				return script != null;
 		}

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/StateImpl.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/StateImpl.java?rev=960905&r1=960904&r2=960905&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/StateImpl.java
(original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/impl/StateImpl.java
Tue Jul  6 14:44:45 2010
@@ -22,6 +22,7 @@ import java.util.Collection;
 
 import org.apache.commons.scxml.modeling.Anchor;
 import org.apache.commons.scxml.modeling.FinalState;
+import org.apache.commons.scxml.modeling.Finalize;
 import org.apache.commons.scxml.modeling.HistoryState;
 import org.apache.commons.scxml.modeling.InitialState;
 import org.apache.commons.scxml.modeling.Invoke;
@@ -60,8 +61,8 @@ import org.eclipse.emf.ecore.util.Intern
  *   <li>{@link org.apache.commons.scxml.modeling.impl.StateImpl#getFinalState <em>Final
State</em>}</li>
  *   <li>{@link org.apache.commons.scxml.modeling.impl.StateImpl#getSubParallel <em>Sub
Parallel</em>}</li>
  *   <li>{@link org.apache.commons.scxml.modeling.impl.StateImpl#getHistoryState <em>History
State</em>}</li>
- *   <li>{@link org.apache.commons.scxml.modeling.impl.StateImpl#getAnchor <em>Anchor</em>}</li>
  *   <li>{@link org.apache.commons.scxml.modeling.impl.StateImpl#getInvoke <em>Invoke</em>}</li>
+ *   <li>{@link org.apache.commons.scxml.modeling.impl.StateImpl#getFinalize <em>Finalize</em>}</li>
  * </ul>
  * </p>
  *
@@ -179,24 +180,24 @@ public class StateImpl extends NamedElem
 	protected EList historyState;
 
 	/**
-	 * The cached value of the '{@link #getAnchor() <em>Anchor</em>}' containment
reference list.
+	 * The cached value of the '{@link #getInvoke() <em>Invoke</em>}' containment
reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getAnchor()
+	 * @see #getInvoke()
 	 * @generated
 	 * @ordered
 	 */
-	protected EList anchor;
+	protected Invoke invoke;
 
 	/**
-	 * The cached value of the '{@link #getInvoke() <em>Invoke</em>}' containment
reference.
+	 * The cached value of the '{@link #getFinalize() <em>Finalize</em>}' containment
reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getInvoke()
+	 * @see #getFinalize()
 	 * @generated
 	 * @ordered
 	 */
-	protected Invoke invoke;
+	protected Finalize finalize;
 
 	/**
 	 * <!-- begin-user-doc -->
@@ -440,18 +441,6 @@ public class StateImpl extends NamedElem
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EList getAnchor() {
-		if (anchor == null) {
-			anchor = new EObjectContainmentEList(Anchor.class, this, ModelingPackage.STATE__ANCHOR);
-		}
-		return anchor;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
 	public Invoke getInvoke() {
 		return invoke;
 	}
@@ -495,6 +484,49 @@ public class StateImpl extends NamedElem
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public Finalize getFinalize() {
+		return finalize;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetFinalize(Finalize newFinalize, NotificationChain msgs)
{
+		Finalize oldFinalize = finalize;
+		finalize = newFinalize;
+		if (eNotificationRequired()) {
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelingPackage.STATE__FINALIZE,
oldFinalize, newFinalize);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setFinalize(Finalize newFinalize) {
+		if (newFinalize != finalize) {
+			NotificationChain msgs = null;
+			if (finalize != null)
+				msgs = ((InternalEObject)finalize).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelingPackage.STATE__FINALIZE,
null, msgs);
+			if (newFinalize != null)
+				msgs = ((InternalEObject)newFinalize).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelingPackage.STATE__FINALIZE,
null, msgs);
+			msgs = basicSetFinalize(newFinalize, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, ModelingPackage.STATE__FINALIZE,
newFinalize, newFinalize));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain
msgs) {
 		switch (featureID) {
 			case ModelingPackage.STATE__ON_ENTRY:
@@ -511,10 +543,10 @@ public class StateImpl extends NamedElem
 				return ((InternalEList)getSubParallel()).basicRemove(otherEnd, msgs);
 			case ModelingPackage.STATE__HISTORY_STATE:
 				return ((InternalEList)getHistoryState()).basicRemove(otherEnd, msgs);
-			case ModelingPackage.STATE__ANCHOR:
-				return ((InternalEList)getAnchor()).basicRemove(otherEnd, msgs);
 			case ModelingPackage.STATE__INVOKE:
 				return basicSetInvoke(null, msgs);
+			case ModelingPackage.STATE__FINALIZE:
+				return basicSetFinalize(null, msgs);
 		}
 		return super.eInverseRemove(otherEnd, featureID, msgs);
 	}
@@ -544,10 +576,10 @@ public class StateImpl extends NamedElem
 				return getSubParallel();
 			case ModelingPackage.STATE__HISTORY_STATE:
 				return getHistoryState();
-			case ModelingPackage.STATE__ANCHOR:
-				return getAnchor();
 			case ModelingPackage.STATE__INVOKE:
 				return getInvoke();
+			case ModelingPackage.STATE__FINALIZE:
+				return getFinalize();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -590,13 +622,12 @@ public class StateImpl extends NamedElem
 				getHistoryState().clear();
 				getHistoryState().addAll((Collection)newValue);
 				return;
-			case ModelingPackage.STATE__ANCHOR:
-				getAnchor().clear();
-				getAnchor().addAll((Collection)newValue);
-				return;
 			case ModelingPackage.STATE__INVOKE:
 				setInvoke((Invoke)newValue);
 				return;
+			case ModelingPackage.STATE__FINALIZE:
+				setFinalize((Finalize)newValue);
+				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -635,12 +666,12 @@ public class StateImpl extends NamedElem
 			case ModelingPackage.STATE__HISTORY_STATE:
 				getHistoryState().clear();
 				return;
-			case ModelingPackage.STATE__ANCHOR:
-				getAnchor().clear();
-				return;
 			case ModelingPackage.STATE__INVOKE:
 				setInvoke((Invoke)null);
 				return;
+			case ModelingPackage.STATE__FINALIZE:
+				setFinalize((Finalize)null);
+				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -670,10 +701,10 @@ public class StateImpl extends NamedElem
 				return subParallel != null && !subParallel.isEmpty();
 			case ModelingPackage.STATE__HISTORY_STATE:
 				return historyState != null && !historyState.isEmpty();
-			case ModelingPackage.STATE__ANCHOR:
-				return anchor != null && !anchor.isEmpty();
 			case ModelingPackage.STATE__INVOKE:
 				return invoke != null;
+			case ModelingPackage.STATE__FINALIZE:
+				return finalize != null;
 		}
 		return super.eIsSet(featureID);
 	}

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/util/ModelingSwitch.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/util/ModelingSwitch.java?rev=960905&r1=960904&r2=960905&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/util/ModelingSwitch.java
(original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling/src/org/apache/commons/scxml/modeling/util/ModelingSwitch.java
Tue Jul  6 14:44:45 2010
@@ -248,6 +248,7 @@ public class ModelingSwitch {
 			case ModelingPackage.SCRIPT: {
 				Script script = (Script)theEObject;
 				Object result = caseScript(script);
+				if (result == null) result = caseExecutableContent(script);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}



Mime
View raw message