added Randomize Seed to stochastic solver
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/META-INF/MANIFEST.MF b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/META-INF/MANIFEST.MF
index 1c7a38c..dbeb1dc 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/META-INF/MANIFEST.MF
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/META-INF/MANIFEST.MF
@@ -2,6 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.stem.solvers.stochastic;singleton:=true
+Automatic-Module-Name: org.eclipse.stem.solvers.stochastic
Bundle-Version: 3.0.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.stem.solvers.stochastic.provider.StochasticEditPlugin$Implementation
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/model/stochastic.ecore b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/model/stochastic.ecore
index 3e881bf..6b1ac96 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/model/stochastic.ecore
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/model/stochastic.ecore
@@ -6,5 +6,7 @@
<eClassifiers xsi:type="ecore:EClass" name="StandardStochastic" eSuperTypes="#//Stochastic">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="seed" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//ELong"
defaultValueLiteral="17"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="RandomizeSeed" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"
+ defaultValueLiteral="false"/>
</eClassifiers>
</ecore:EPackage>
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/model/stochastic.genmodel b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/model/stochastic.genmodel
index 105b4a6..78ca829 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/model/stochastic.genmodel
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/model/stochastic.genmodel
@@ -12,6 +12,7 @@
<genClasses ecoreClass="stochastic.ecore#//Stochastic"/>
<genClasses ecoreClass="stochastic.ecore#//StandardStochastic">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute stochastic.ecore#//StandardStochastic/seed"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute stochastic.ecore#//StandardStochastic/RandomizeSeed"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/plugin.properties b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/plugin.properties
index 396c13a..aff8317 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/plugin.properties
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/plugin.properties
@@ -25,3 +25,4 @@
dc_standard_stochastic_title=Stochastic Solver
dc_standard_stochastic_creator=S. Edlund
_UI_StandardStochastic_seed_feature = Seed
+_UI_StandardStochastic_RandomizeSeed_feature = Randomize Seed
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/StandardStochastic.java b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/StandardStochastic.java
index 4960203..050c142 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/StandardStochastic.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/StandardStochastic.java
@@ -10,10 +10,11 @@
*
* <p>
* The following features are supported:
+ * </p>
* <ul>
* <li>{@link org.eclipse.stem.solvers.stochastic.StandardStochastic#getSeed <em>Seed</em>}</li>
+ * <li>{@link org.eclipse.stem.solvers.stochastic.StandardStochastic#isRandomizeSeed <em>Randomize Seed</em>}</li>
* </ul>
- * </p>
*
* @see org.eclipse.stem.solvers.stochastic.StochasticPackage#getStandardStochastic()
* @model
@@ -47,4 +48,31 @@
* @generated
*/
void setSeed(long value);
+
+ /**
+ * Returns the value of the '<em><b>Randomize Seed</b></em>' attribute.
+ * The default value is <code>"false"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Randomize Seed</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Randomize Seed</em>' attribute.
+ * @see #setRandomizeSeed(boolean)
+ * @see org.eclipse.stem.solvers.stochastic.StochasticPackage#getStandardStochastic_RandomizeSeed()
+ * @model default="false"
+ * @generated
+ */
+ boolean isRandomizeSeed();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.stem.solvers.stochastic.StandardStochastic#isRandomizeSeed <em>Randomize Seed</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Randomize Seed</em>' attribute.
+ * @see #isRandomizeSeed()
+ * @generated
+ */
+ void setRandomizeSeed(boolean value);
} // StandardStochastic
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/StochasticPackage.java b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/StochasticPackage.java
index 4a16b5e..c726aa3 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/StochasticPackage.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/StochasticPackage.java
@@ -184,13 +184,22 @@
int STANDARD_STOCHASTIC__SEED = STOCHASTIC_FEATURE_COUNT + 0;
/**
+ * The feature id for the '<em><b>Randomize Seed</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STANDARD_STOCHASTIC__RANDOMIZE_SEED = STOCHASTIC_FEATURE_COUNT + 1;
+
+ /**
* The number of structural features of the '<em>Standard Stochastic</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int STANDARD_STOCHASTIC_FEATURE_COUNT = STOCHASTIC_FEATURE_COUNT + 1;
+ int STANDARD_STOCHASTIC_FEATURE_COUNT = STOCHASTIC_FEATURE_COUNT + 2;
/**
@@ -225,6 +234,17 @@
EAttribute getStandardStochastic_Seed();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.stem.solvers.stochastic.StandardStochastic#isRandomizeSeed <em>Randomize Seed</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Randomize Seed</em>'.
+ * @see org.eclipse.stem.solvers.stochastic.StandardStochastic#isRandomizeSeed()
+ * @see #getStandardStochastic()
+ * @generated
+ */
+ EAttribute getStandardStochastic_RandomizeSeed();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -274,6 +294,14 @@
*/
EAttribute STANDARD_STOCHASTIC__SEED = eINSTANCE.getStandardStochastic_Seed();
+ /**
+ * The meta object literal for the '<em><b>Randomize Seed</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute STANDARD_STOCHASTIC__RANDOMIZE_SEED = eINSTANCE.getStandardStochastic_RandomizeSeed();
+
}
} //StochasticPackage
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StandardStochasticImpl.java b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StandardStochasticImpl.java
index b797054..3a57326 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StandardStochasticImpl.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StandardStochasticImpl.java
@@ -64,10 +64,11 @@
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
+ * </p>
* <ul>
* <li>{@link org.eclipse.stem.solvers.stochastic.impl.StandardStochasticImpl#getSeed <em>Seed</em>}</li>
+ * <li>{@link org.eclipse.stem.solvers.stochastic.impl.StandardStochasticImpl#isRandomizeSeed <em>Randomize Seed</em>}</li>
* </ul>
- * </p>
*
* @generated
*/
@@ -92,6 +93,25 @@
protected long seed = SEED_EDEFAULT;
/**
+ * The default value of the '{@link #isRandomizeSeed() <em>Randomize Seed</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isRandomizeSeed()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean RANDOMIZE_SEED_EDEFAULT = false;
+ /**
+ * The cached value of the '{@link #isRandomizeSeed() <em>Randomize Seed</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isRandomizeSeed()
+ * @generated
+ * @ordered
+ */
+ protected boolean randomizeSeed = RANDOMIZE_SEED_EDEFAULT;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
@@ -521,9 +541,15 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
+ @Override
public long getSeed() {
+ if (this.randomizeSeed) {
+ long millis = System.currentTimeMillis();
+ seed = Math.abs((int) millis);
+ // System.out.println("seed = " + seed);
+ }
return seed;
}
@@ -532,6 +558,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public void setSeed(long newSeed) {
long oldSeed = seed;
seed = newSeed;
@@ -545,10 +572,35 @@
* @generated
*/
@Override
+ public boolean isRandomizeSeed() {
+ return randomizeSeed;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setRandomizeSeed(boolean newRandomizeSeed) {
+ boolean oldRandomizeSeed = randomizeSeed;
+ randomizeSeed = newRandomizeSeed;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StochasticPackage.STANDARD_STOCHASTIC__RANDOMIZE_SEED, oldRandomizeSeed, randomizeSeed));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StochasticPackage.STANDARD_STOCHASTIC__SEED:
return getSeed();
+ case StochasticPackage.STANDARD_STOCHASTIC__RANDOMIZE_SEED:
+ return isRandomizeSeed();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -564,6 +616,9 @@
case StochasticPackage.STANDARD_STOCHASTIC__SEED:
setSeed((Long)newValue);
return;
+ case StochasticPackage.STANDARD_STOCHASTIC__RANDOMIZE_SEED:
+ setRandomizeSeed((Boolean)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -579,6 +634,9 @@
case StochasticPackage.STANDARD_STOCHASTIC__SEED:
setSeed(SEED_EDEFAULT);
return;
+ case StochasticPackage.STANDARD_STOCHASTIC__RANDOMIZE_SEED:
+ setRandomizeSeed(RANDOMIZE_SEED_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -593,6 +651,8 @@
switch (featureID) {
case StochasticPackage.STANDARD_STOCHASTIC__SEED:
return seed != SEED_EDEFAULT;
+ case StochasticPackage.STANDARD_STOCHASTIC__RANDOMIZE_SEED:
+ return randomizeSeed != RANDOMIZE_SEED_EDEFAULT;
}
return super.eIsSet(featureID);
}
@@ -606,9 +666,11 @@
public String toString() {
if (eIsProxy()) return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
+ StringBuilder result = new StringBuilder(super.toString());
result.append(" (seed: ");
result.append(seed);
+ result.append(", RandomizeSeed: ");
+ result.append(randomizeSeed);
result.append(')');
return result.toString();
}
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StochasticFactoryImpl.java b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StochasticFactoryImpl.java
index b33b7df..c0038a9 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StochasticFactoryImpl.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StochasticFactoryImpl.java
@@ -7,6 +7,7 @@
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.stem.solvers.stochastic.*;
import org.eclipse.stem.solvers.stochastic.StandardStochastic;
import org.eclipse.stem.solvers.stochastic.Stochastic;
import org.eclipse.stem.solvers.stochastic.StochasticFactory;
@@ -27,7 +28,7 @@
*/
public static StochasticFactory init() {
try {
- StochasticFactory theStochasticFactory = (StochasticFactory)EPackage.Registry.INSTANCE.getEFactory("http:///org/eclipse/stem/solvers/stochastic");
+ StochasticFactory theStochasticFactory = (StochasticFactory)EPackage.Registry.INSTANCE.getEFactory(StochasticPackage.eNS_URI);
if (theStochasticFactory != null) {
return theStochasticFactory;
}
@@ -68,6 +69,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public Stochastic createStochastic() {
StochasticImpl stochastic = new StochasticImpl();
return stochastic;
@@ -78,6 +80,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public StandardStochastic createStandardStochastic() {
StandardStochasticImpl standardStochastic = new StandardStochasticImpl();
return standardStochastic;
@@ -88,6 +91,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public StochasticPackage getStochasticPackage() {
return (StochasticPackage)getEPackage();
}
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StochasticImpl.java b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StochasticImpl.java
index 72ef48d..be1ffb1 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StochasticImpl.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StochasticImpl.java
@@ -11,8 +11,6 @@
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Stochastic</b></em>'.
* <!-- end-user-doc -->
- * <p>
- * </p>
*
* @generated
*/
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StochasticPackageImpl.java b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StochasticPackageImpl.java
index 773951a..2ffde2e 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StochasticPackageImpl.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/impl/StochasticPackageImpl.java
@@ -69,7 +69,7 @@
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
+ *
* <p>This method is used to initialize {@link StochasticPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
@@ -83,7 +83,8 @@
if (isInited) return (StochasticPackage)EPackage.Registry.INSTANCE.getEPackage(StochasticPackage.eNS_URI);
// Obtain or create and register package
- StochasticPackageImpl theStochasticPackage = (StochasticPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof StochasticPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new StochasticPackageImpl());
+ Object registeredStochasticPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
+ StochasticPackageImpl theStochasticPackage = registeredStochasticPackage instanceof StochasticPackageImpl ? (StochasticPackageImpl)registeredStochasticPackage : new StochasticPackageImpl();
isInited = true;
@@ -96,6 +97,7 @@
SequencerPackage.eINSTANCE.eClass();
SolverPackage.eINSTANCE.eClass();
LoggerPackage.eINSTANCE.eClass();
+ EcorePackage.eINSTANCE.eClass();
// Create package meta-data objects
theStochasticPackage.createPackageContents();
@@ -106,7 +108,6 @@
// Mark meta-data to indicate it can't be changed
theStochasticPackage.freeze();
-
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(StochasticPackage.eNS_URI, theStochasticPackage);
return theStochasticPackage;
@@ -117,6 +118,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public EClass getStochastic() {
return stochasticEClass;
}
@@ -126,6 +128,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public EClass getStandardStochastic() {
return standardStochasticEClass;
}
@@ -135,6 +138,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public EAttribute getStandardStochastic_Seed() {
return (EAttribute)standardStochasticEClass.getEStructuralFeatures().get(0);
}
@@ -144,6 +148,17 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
+ public EAttribute getStandardStochastic_RandomizeSeed() {
+ return (EAttribute)standardStochasticEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public StochasticFactory getStochasticFactory() {
return (StochasticFactory)getEFactoryInstance();
}
@@ -171,6 +186,7 @@
standardStochasticEClass = createEClass(STANDARD_STOCHASTIC);
createEAttribute(standardStochasticEClass, STANDARD_STOCHASTIC__SEED);
+ createEAttribute(standardStochasticEClass, STANDARD_STOCHASTIC__RANDOMIZE_SEED);
}
/**
@@ -213,6 +229,7 @@
initEClass(standardStochasticEClass, StandardStochastic.class, "StandardStochastic", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getStandardStochastic_Seed(), theEcorePackage.getELong(), "seed", "17", 0, 1, StandardStochastic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getStandardStochastic_RandomizeSeed(), theEcorePackage.getEBoolean(), "RandomizeSeed", "false", 0, 1, StandardStochastic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/provider/StandardStochasticItemProvider.java b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/provider/StandardStochasticItemProvider.java
index 0f126c2..1c9887d 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/provider/StandardStochasticItemProvider.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/provider/StandardStochasticItemProvider.java
@@ -8,6 +8,7 @@
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -28,13 +29,7 @@
* @generated
*/
public class StandardStochasticItemProvider
- extends StochasticItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
+ extends StochasticItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
@@ -57,6 +52,7 @@
super.getPropertyDescriptors(object);
addSeedPropertyDescriptor(object);
+ addRandomizeSeedPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -72,8 +68,8 @@
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_StandardStochastic_seed_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_StandardStochastic_seed_feature", "_UI_StandardStochastic_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ getString("_UI_StandardStochastic_seed_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_StandardStochastic_seed_feature", "_UI_StandardStochastic_type"),
StochasticPackage.Literals.STANDARD_STOCHASTIC__SEED,
true,
false,
@@ -84,6 +80,28 @@
}
/**
+ * This adds a property descriptor for the Randomize Seed feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addRandomizeSeedPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_StandardStochastic_RandomizeSeed_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_StandardStochastic_RandomizeSeed_feature", "_UI_StandardStochastic_type"),
+ StochasticPackage.Literals.STANDARD_STOCHASTIC__RANDOMIZE_SEED,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
* This returns StandardStochastic.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -119,6 +137,7 @@
switch (notification.getFeatureID(StandardStochastic.class)) {
case StochasticPackage.STANDARD_STOCHASTIC__SEED:
+ case StochasticPackage.STANDARD_STOCHASTIC__RANDOMIZE_SEED:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/provider/StochasticItemProvider.java b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/provider/StochasticItemProvider.java
index bfc9f65..36a03bb 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/provider/StochasticItemProvider.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/provider/StochasticItemProvider.java
@@ -9,6 +9,7 @@
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
@@ -16,6 +17,7 @@
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.stem.core.solver.provider.SolverItemProvider;
+import org.eclipse.stem.solvers.stochastic.Stochastic;
/**
* This is the item provider adapter for a {@link org.eclipse.stem.solvers.stochastic.Stochastic} object.
@@ -24,13 +26,7 @@
* @generated
*/
public class StochasticItemProvider
- extends SolverItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
+ extends SolverItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/provider/StochasticItemProviderAdapterFactory.java b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/provider/StochasticItemProviderAdapterFactory.java
index 560c2ea..cfa965e 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/provider/StochasticItemProviderAdapterFactory.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/provider/StochasticItemProviderAdapterFactory.java
@@ -121,6 +121,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public ComposeableAdapterFactory getRootAdapterFactory() {
return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
}
@@ -131,6 +132,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
this.parentAdapterFactory = parentAdapterFactory;
}
@@ -179,6 +181,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public void addListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.addListener(notifyChangedListener);
}
@@ -189,6 +192,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public void removeListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.removeListener(notifyChangedListener);
}
@@ -199,6 +203,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public void fireNotifyChanged(Notification notification) {
changeNotifier.fireNotifyChanged(notification);
@@ -213,6 +218,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public void dispose() {
if (stochasticItemProvider != null) stochasticItemProvider.dispose();
if (standardStochasticItemProvider != null) standardStochasticItemProvider.dispose();
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/util/StochasticAdapterFactory.java b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/util/StochasticAdapterFactory.java
index bed0abd..cc43e08 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/util/StochasticAdapterFactory.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/util/StochasticAdapterFactory.java
@@ -9,6 +9,7 @@
import org.eclipse.stem.core.common.Identifiable;
import org.eclipse.stem.core.common.SanityChecker;
import org.eclipse.stem.core.solver.Solver;
+import org.eclipse.stem.solvers.stochastic.*;
import org.eclipse.stem.solvers.stochastic.StandardStochastic;
import org.eclipse.stem.solvers.stochastic.Stochastic;
import org.eclipse.stem.solvers.stochastic.StochasticPackage;
diff --git a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/util/StochasticSwitch.java b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/util/StochasticSwitch.java
index a22a91b..a924e52 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/util/StochasticSwitch.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/util/StochasticSwitch.java
@@ -8,6 +8,7 @@
import org.eclipse.stem.core.common.Identifiable;
import org.eclipse.stem.core.common.SanityChecker;
import org.eclipse.stem.core.solver.Solver;
+import org.eclipse.stem.solvers.stochastic.*;
import org.eclipse.stem.solvers.stochastic.StandardStochastic;
import org.eclipse.stem.solvers.stochastic.Stochastic;
import org.eclipse.stem.solvers.stochastic.StochasticPackage;
@@ -50,7 +51,7 @@
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @parameter ePackage the package in question.
+ * @param ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
diff --git a/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/META-INF/MANIFEST.MF b/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/META-INF/MANIFEST.MF
index 606ff44..1c1278c 100755
--- a/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/META-INF/MANIFEST.MF
+++ b/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/META-INF/MANIFEST.MF
@@ -2,6 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.stem.ui.solvers.stochastic;singleton:=true
+Automatic-Module-Name: org.eclipse.stem.ui.solvers.stochastic
Bundle-Version: 3.0.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.stem.solvers.stochastic.presentation.StochasticEditorPlugin$Implementation
diff --git a/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/presentation/StochasticActionBarContributor.java b/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/presentation/StochasticActionBarContributor.java
index b920587..127fa2b 100755
--- a/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/presentation/StochasticActionBarContributor.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/presentation/StochasticActionBarContributor.java
@@ -158,6 +158,7 @@
*/
@Override
public void contributeToToolBar(IToolBarManager toolBarManager) {
+ super.contributeToToolBar(toolBarManager);
toolBarManager.add(new Separator("stochastic-settings"));
toolBarManager.add(new Separator("stochastic-additions"));
}
@@ -194,6 +195,7 @@
//
submenuManager.addMenuListener
(new IMenuListener() {
+ @Override
public void menuAboutToShow(IMenuManager menuManager) {
menuManager.updateAll(true);
}
@@ -241,6 +243,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
// Remove any menu items for old selection.
//
diff --git a/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/presentation/StochasticModelWizard.java b/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/presentation/StochasticModelWizard.java
index 2debbbc..41694c2 100755
--- a/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/presentation/StochasticModelWizard.java
+++ b/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/presentation/StochasticModelWizard.java
@@ -147,6 +147,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
this.selection = selection;
@@ -253,6 +254,7 @@
final ISelection targetSelection = new StructuredSelection(modelFile);
getShell().getDisplay().asyncExec
(new Runnable() {
+ @Override
public void run() {
((ISetSelectionTarget)activePart).selectReveal(targetSelection);
}
@@ -369,6 +371,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @Override
public void createControl(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE); {
GridLayout layout = new GridLayout();
@@ -443,6 +446,7 @@
*/
protected ModifyListener validator =
new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
setPageComplete(validatePage());
}
diff --git a/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/presentation/messages.properties b/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/presentation/messages.properties
index fc57454..3f41ff1 100755
--- a/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/presentation/messages.properties
+++ b/org.eclipse.stem/core/org.eclipse.stem.ui.solvers.stochastic/src/org/eclipse/stem/solvers/stochastic/presentation/messages.properties
@@ -29,3 +29,7 @@
seedUNIT =
seedTT = Stochastic seed
+RandomizeSeed = Randomize Seed
+RandomizeSeedUNIT =
+RandomizeSeedTT = Randomize Seed ?
+
diff --git a/org.eclipse.stem/core/org.eclipse.stem.ui/plugin.xml b/org.eclipse.stem/core/org.eclipse.stem.ui/plugin.xml
index e50f57a..5aa8a7a 100644
--- a/org.eclipse.stem/core/org.eclipse.stem.ui/plugin.xml
+++ b/org.eclipse.stem/core/org.eclipse.stem.ui/plugin.xml
@@ -1881,6 +1881,30 @@
name="appName"
value="STEM">
</property>
+ <property
+ name="aboutImage"
+ value="branding/ohf64_64_32.gif">
+ </property>
+ <property
+ name="aboutText"
+ value="STEM - Spatiotemporal Epidemological Modeler">
+ </property>
+ <property
+ name="startupForegroundColor"
+ value="FFFFFF">
+ </property>
+ <property
+ name="startupMessageRect"
+ value="10,380,431,20">
+ </property>
+ <property
+ name="startupProgressRect"
+ value="0,413,431,15">
+ </property>
+ <property
+ name="preferenceCustomization"
+ value="plugin_customization.ini">
+ </property>
</product>
</extension>
<extension