Commit ccd64958 authored by Alexander Diewald's avatar Alexander Diewald

Exploration(.*): Remove outdated EClasses.

* No migration needed due to the eClasses' abstract/interface nature.
* Removed ObectiveExpression
* Removed ConstraintExpression
* Removed ExplorationTargetExpression
* Removed GenericObjective
* Removed GenericConstraint
refs 3273
parent 9b0bec69
......@@ -8,7 +8,7 @@
<details key="documentation" value="If this constraint contains a quantifier, this flag states if the constraint shall be unfolded manually in the transformation to SMT."/>
</eAnnotations>
</eStructuralFeatures>
<eGenericSuperTypes eClassifier="ecore:EClass platform:/resource/org.fortiss.af3.exploration/model/exploration.ecore#//ConstraintExpression">
<eGenericSuperTypes eClassifier="ecore:EClass platform:/resource/org.fortiss.af3.exploration/model/exploration.ecore#//ExplorationConstraint">
<eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
</eGenericSuperTypes>
<eGenericSuperTypes eClassifier="#//CustomDimension"/>
......@@ -20,7 +20,7 @@
<details key="documentation" value="Additional constraints which have to hold when using this objective."/>
</eAnnotations>
</eStructuralFeatures>
<eGenericSuperTypes eClassifier="ecore:EClass platform:/resource/org.fortiss.af3.exploration/model/exploration.ecore#//ObjectiveExpression">
<eGenericSuperTypes eClassifier="ecore:EClass platform:/resource/org.fortiss.af3.exploration/model/exploration.ecore#//ExplorationObjective">
<eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
</eGenericSuperTypes>
<eGenericSuperTypes eClassifier="#//CustomDimension"/>
......
DeploymentSMTResult.java 2a1265e2e2eef2bb96a9ed556977dc24ad33bd59 RED
DeploymentToSchedule.java a856b52f66d1fcb0707c3b9e4498a82bca9575e9 RED
RouteUtils.java e54d56bcb2c698a2a33fb763a67dd4c5e2e8b765 RED
......
ConstraintExpressionHandler.java 93f0dc75ba7576eaaed3338dc94e4435d9848987 RED
ConstraintExpressionHandler.java 1024715f6f9ea2661a5769735c4bff65e41eb1e5 RED
DSERootHandler.java 7d5c8abebd7155ff7dda1198dd9a09438b9916c4 RED
ExplorationSpecificationHandler.java f8ba35a9e54f77d05d41aa51280d667225770f21 RED
ObjectiveExpressionHandler.java 0846bf0c6fb020dd923387a9443a790ad97c8c34 RED
ObjectiveExpressionHandler.java 4363c0fd215a3f800f63d93c59cd3cca80ec9d53 RED
RuleSetHandler.java 42a2dcd45fe9e516beaae622f5c226138b3565a4 RED
TaskToPlatformDeploymentHandler.java 5d54e0eb198f8449984037653cdbdf4b39288f08 RED
......@@ -16,7 +16,7 @@
package org.fortiss.af3.exploration.ui.handler;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.exploration.model.ConstraintExpression;
import org.fortiss.af3.exploration.model.ExplorationConstraint;
import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
/**
......@@ -24,11 +24,11 @@ import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
*
* @author eder
*/
public class ConstraintExpressionHandler extends ModelElementHandlerBase<ConstraintExpression<?>> {
public class ConstraintExpressionHandler extends ModelElementHandlerBase<ExplorationConstraint<?>> {
/** {@inheritDoc} */
@Override
public String getName(ConstraintExpression<?> element) {
public String getName(ExplorationConstraint<?> element) {
final String name = element.getName();
return name != null ? name : "Unnamed Constraint";
}
......
......@@ -16,7 +16,7 @@
package org.fortiss.af3.exploration.ui.handler;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.exploration.model.ObjectiveExpression;
import org.fortiss.af3.exploration.model.ExplorationObjective;
import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
/**
......@@ -24,11 +24,11 @@ import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
*
* @author eder
*/
public class ObjectiveExpressionHandler extends ModelElementHandlerBase<ObjectiveExpression<?>> {
public class ObjectiveExpressionHandler extends ModelElementHandlerBase<ExplorationObjective<?>> {
/** {@inheritDoc} */
@Override
public String getName(ObjectiveExpression<?> element) {
public String getName(ExplorationObjective<?> element) {
final String name = element.getName();
return name != null ? name : "Unnamed Objective";
}
......
DSEDeploymentEntryHandler.java bcb530cf9aa647c168b857690612c2ee5c211a9e RED
DSEHandler.java e3eafe69611af628f0bcf376ce7ade1f686c490e RED
DSEHistoryHandler.java 3618df983887901d5e6f45f00d6837f5846b2cf1 RED
......
DeploymentValidatorStartMenu.java a98eced401daba0171034cc31962d0d228850878 RED
AllocationPatternCompositeBackend.java 4a10f83ba18668872e7d9678be3dfc6a9f962bb0 RED
ConstraintPatternHeader.java c810b00c5ea6c2aa9dcfed27beefbec3a62f0e39 RED
ConstraintViewBackend.java d06cfc60a8d2d572f331dd6a46db1ffddbb4e507 RED
DeploymentPatternCompositeBackend.java fd2b5d2c1d644d645924a2d55e9fa20a42694a03 RED
FunctionCouplingCompositeBackend.java edecc4decf7abdd9297c7c8765e43027123e971e RED
MemoryPatternBackend.java 4d576ead43b8e65febb56ad1840a078e4070085c RED
SafetyPatternBackend.java ed140c2660b582d32f24c72d3c86ef3a6ce58eea RED
DSENavigator.java b7b1c315479f59e9b27fe263405035fafbea9086 RED
DSENavigator.java 2814cffdde386f99eb0fb041fb385f1e63be8d84 RED
DSENavigatorLabelProvider.java 8811adeaa0cdf1fe994db479cba7027f177b4b7e RED
DSENavigatorTreeContentProvider.java 10a0aaaa4e6a37a550f3bec0cb785b7ca60398ca RED
DSEProcessNavigator.java bf1ce1fc4b375026e077ffb77ca563961973b7b2 RED
......
......@@ -49,7 +49,6 @@ import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.dialogs.PatternFilter;
import org.fortiss.af3.exploration.model.ExplorationSpecification;
import org.fortiss.af3.exploration.model.ExplorationTarget;
import org.fortiss.af3.exploration.model.ExplorationTargetExpression;
import org.fortiss.af3.exploration.projectmodel.DSERun;
import org.fortiss.af3.exploration.projectmodel.RuleSet;
import org.fortiss.af3.exploration.smt.model.CustomDimension;
......@@ -131,9 +130,8 @@ public final class DSENavigator extends DseSaveableView implements IPropertyList
treeViewer.addDragSupport(DND.DROP_COPY | DND.DROP_LINK | DND.DROP_MOVE,
new Transfer[] {dndAdapter.getPreferredTransfer()}, dndAdapter);
DropTarget drop =
new DropTarget(treeViewer.getControl(), DND.DROP_COPY | DND.DROP_LINK |
DND.DROP_MOVE);
DropTarget drop = new DropTarget(treeViewer.getControl(),
DND.DROP_COPY | DND.DROP_LINK | DND.DROP_MOVE);
drop.setTransfer(new Transfer[] {dndAdapter.getPreferredTransfer()});
drop.addDropListener(DropAdapter);
}
......@@ -166,17 +164,15 @@ public final class DSENavigator extends DseSaveableView implements IPropertyList
subSets.stream().filter(rs -> rs.getExplorationTargets().contains(et))
.collect(Collectors.toList());
if(!collect.isEmpty()) {
String message =
"The selected constraint/objective " + et.getName() +
" is used in the following Rule Sets: \n\n";
String message = "The selected constraint/objective " + et.getName() +
" is used in the following Rule Sets: \n\n";
for(RuleSet rs : collect) {
message += "\t" + rs.getName() + "\n";
}
message += "\nDo you really want to delete this constraint/objective?";
boolean delete =
MessageDialog.openQuestion(new Shell(), "Constraint/objective in use",
message);
boolean delete = MessageDialog.openQuestion(new Shell(),
"Constraint/objective in use", message);
if(!delete) {
return;
}
......@@ -196,9 +192,8 @@ public final class DSENavigator extends DseSaveableView implements IPropertyList
/** {@inheritDoc} */
@Override
protected EObject getSourceElement() {
ExplorationTargetExpression<?> explorationTarget =
SelectionUtils.checkAndPickFirst(treeViewer.getSelection(),
ExplorationTargetExpression.class);
ExplorationTarget<?> explorationTarget = SelectionUtils
.checkAndPickFirst(treeViewer.getSelection(), ExplorationTarget.class);
if(explorationTarget != null &&
!PerspectiveUtils.isContainedConstraint(explorationTarget)) {
return explorationTarget;
......@@ -248,12 +243,11 @@ public final class DSENavigator extends DseSaveableView implements IPropertyList
EObject designatedElement = object.getDesignatedElement();
if(designatedElement instanceof CustomDimension) {
CustomDimension sourceDimension = (CustomDimension)designatedElement;
ITopLevelElement topLevelElement =
IPersistencyService.getInstance().getTopLevelElementFor(
currentlySelectedDSE);
ITopLevelElement topLevelElement = IPersistencyService.getInstance()
.getTopLevelElementFor(currentlySelectedDSE);
final CustomDimension finalDim = targetDimension;
topLevelElement.runAsCommand(() -> sourceDimension.setDimension(finalDim
.getDimension()));
topLevelElement.runAsCommand(
() -> sourceDimension.setDimension(finalDim.getDimension()));
treeViewer.refresh();
treeViewer.expandToLevel(3);
}
......
IProcessManager.java 374a0e75392e7034c5ea2c39403b9e26f6e45c3a RED
ProcessManager.java 2d472b5e36665ce914fbd7c75a2c4581b3dfa92f RED
ConstraintSetWizard.java 7a5b0fb83d47c84fb6d0c8e4df5f7baf42ad3c54 RED
ConstraintSetWizardContentProvider.java 55d5a41a0554e6a9059e2350e9125b09e05719ef RED
ConstraintSetWizardPageBackend.java 7889b4ca620b2336bceb7e9018b5103870efd974 RED
......
IVisualizationView.java 287776eae37c1331db82c2f449cc8807089c50d6 RED
VisualizationViewFactory.java e69ba2bb652f17a2c02f56014ffab2fc102ce5c8 RED
TableComposite.java 20acfbbf203aa0791d9c97b39e1d5dfdc2a5d0ca RED
TableVisualization.java 9dcbcc5b991b05a9834b1ddce0f84fb7c47cf8c8 RED
......@@ -2,8 +2,6 @@ ComponentContentProvider.java 7e99c789a787f525f66861ec97800ceccb92cd6d RED
DSEContentProviderBase.java cc46a2368220364d39ac709700de831bf4faad4f RED
DSETreeContentProvider.java 043caab50784f68289c86fbca0cd54aa59f27bdd RED
DSLPatternArchitectureContentProvider.java 3a35cbb27d2df9073bc0b64aadaf0e970fd17b69 RED
Editor3DUtil.java e9555d2344d5dc87f791c5e597c012c1367d4edd RED
ExplorationUiUtil.java 47b186e43dae59afebd2f60c14254c46e2bebcee RED
PerspectiveUtils.java b44cef21f681ca9df4b5a632690ed07a102de0e1 RED
PerspectiveUtils.java bd9fa331633d59b8a09b290c2ffa01bb07d910f9 RED
SpiderChartUtils.java 9884b7745519a707ea25f0a28718fa0314df277c RED
VisualizationUtil.java 32c3968c24dd976876abe3b685d156406a209063 RED
......@@ -19,7 +19,7 @@ import org.conqat.ide.commons.ui.ui.WorkbenchUtils;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
import org.fortiss.af3.exploration.model.ExplorationTargetExpression;
import org.fortiss.af3.exploration.model.ExplorationTarget;
/**
* Utility methods for the DSE perspective.
......@@ -48,7 +48,7 @@ public final class PerspectiveUtils {
}
/** Returns true if the given target is part of a composite target. */
public static boolean isContainedConstraint(ExplorationTargetExpression<?> et) {
return et.eContainer() instanceof ExplorationTargetExpression<?>;
public static boolean isContainedConstraint(ExplorationTarget<?> et) {
return et.eContainer() instanceof ExplorationTarget<?>;
}
}
......@@ -87,57 +87,6 @@
<details key="documentation" value="Marker interface for solutions that are the result of a DSE process."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ExplorationTargetExpression" abstract="true"
interface="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Interface for {@link ExplorationTarget}s that are defined by an {@link IExpression}"/>
</eAnnotations>
<eTypeParameters name="T"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ObjectiveExpression" abstract="true"
interface="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Defines an {@link ExplorationObjective} that is defined by an {@link IExpression}."/>
</eAnnotations>
<eTypeParameters name="T"/>
<eGenericSuperTypes eClassifier="#//ExplorationObjective">
<eTypeArguments eTypeParameter="#//ObjectiveExpression/T"/>
</eGenericSuperTypes>
<eGenericSuperTypes eClassifier="#//ExplorationTargetExpression">
<eTypeArguments eTypeParameter="#//ObjectiveExpression/T"/>
</eGenericSuperTypes>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ConstraintExpression" abstract="true"
interface="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Defines an {@link ExplorationConstraint} that is defined by an {@link IExpression}."/>
</eAnnotations>
<eTypeParameters name="T"/>
<eGenericSuperTypes eClassifier="#//ExplorationConstraint">
<eTypeArguments eTypeParameter="#//ConstraintExpression/T"/>
</eGenericSuperTypes>
<eGenericSuperTypes eClassifier="#//ExplorationTargetExpression">
<eTypeArguments eTypeParameter="#//ConstraintExpression/T"/>
</eGenericSuperTypes>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GenericObjective" abstract="true" interface="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Defines a generic {@link ExplorationObjective} whose definition language is not further specified."/>
</eAnnotations>
<eTypeParameters name="T"/>
<eGenericSuperTypes eClassifier="#//ExplorationObjective">
<eTypeArguments eTypeParameter="#//GenericObjective/T"/>
</eGenericSuperTypes>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GenericConstraint" abstract="true" interface="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Defines a generic {@link ExplorationConstraint} whose definition language is not further specified."/>
</eAnnotations>
<eTypeParameters name="T"/>
<eGenericSuperTypes eClassifier="#//ExplorationConstraint">
<eTypeArguments eTypeParameter="#//GenericConstraint/T"/>
</eGenericSuperTypes>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ExternalModelTarget" abstract="true"
interface="true">
<eStructuralFeatures xsi:type="ecore:EReference" name="externalModels" lowerBound="1"
......
......@@ -29,21 +29,6 @@
</genClasses>
<genClasses image="false" ecoreClass="exploration.ecore#//IProblemDimension"/>
<genClasses ecoreClass="exploration.ecore#//ExplorationSolution"/>
<genClasses image="false" ecoreClass="exploration.ecore#//ExplorationTargetExpression">
<genTypeParameters ecoreTypeParameter="exploration.ecore#//ExplorationTargetExpression/T"/>
</genClasses>
<genClasses image="false" ecoreClass="exploration.ecore#//ObjectiveExpression">
<genTypeParameters ecoreTypeParameter="exploration.ecore#//ObjectiveExpression/T"/>
</genClasses>
<genClasses image="false" ecoreClass="exploration.ecore#//ConstraintExpression">
<genTypeParameters ecoreTypeParameter="exploration.ecore#//ConstraintExpression/T"/>
</genClasses>
<genClasses image="false" ecoreClass="exploration.ecore#//GenericObjective">
<genTypeParameters ecoreTypeParameter="exploration.ecore#//GenericObjective/T"/>
</genClasses>
<genClasses image="false" ecoreClass="exploration.ecore#//GenericConstraint">
<genTypeParameters ecoreTypeParameter="exploration.ecore#//GenericConstraint/T"/>
</genClasses>
<genClasses image="false" ecoreClass="exploration.ecore#//ExternalModelTarget">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference exploration.ecore#//ExternalModelTarget/externalModels"/>
</genClasses>
......
ExplorationExpressionDeploymentValidator.java 7cab9d4d2a422f81e5f6a234b377aad627e28347 RED
ExplorationExpressionDeploymentValidator.java 11f82777a2f4759b37feeb8adf4e6358fb68c30b RED
ExplorationExpressionEvaluator.java deca28fb826c664019c4047d97a4e7965d169d03 RED
IExplorationExpressionVisitor.java 02fcb52b32261855c166f5d4045f1423988ee416 RED
......@@ -27,7 +27,6 @@ import org.fortiss.af3.exploration.dsl_v2.model.booleanp.allocation.Allocation;
import org.fortiss.af3.exploration.dsl_v2.model.booleanp.allocation.Dislocation;
import org.fortiss.af3.exploration.dsl_v2.model.function.Maximize;
import org.fortiss.af3.exploration.dsl_v2.model.function.Minimize;
import org.fortiss.af3.exploration.model.ConstraintExpression;
import org.fortiss.af3.exploration.model.ExplorationConstraint;
import org.fortiss.af3.exploration.model.ExplorationSpecification;
import org.fortiss.af3.exploration.model.ExplorationTarget;
......@@ -77,26 +76,22 @@ public class ExplorationExpressionDeploymentValidator extends ExplorationExpress
ExplorationTarget<?> constraint = constraintSet.poll();
if(!constraint.getContainedTargets().isEmpty()) {
constraint.getContainedTargets();
} else {
if(constraint instanceof ConstraintExpression) {
if(((ConstraintExpression<?>)constraint).getExpression() == null) {
throw new Exception("The constraint " + constraint.getName() + " neither" +
" contains an expression nor does it contain other constraints." +
"Please validate the given ExplorationSpecification.");
}
validationResult =
((ConstraintExpression<?>)constraint).getExpression().accept(this,
Boolean.class);
if(!validationResult) {
return false;
}
} else {
throw new Exception(
"At least one Constraint is not ConstraintExpression in terms"
+ " of the Exploration DSL v2. Cannot perfom the Validation"
+ " for other ExplorationConstraint types. Sorry, aborting.");
} else if(constraint instanceof ExplorationConstraint) {
if(((ExplorationConstraint<?>)constraint).getExpression() == null) {
throw new Exception("The constraint " + constraint.getName() + " neither" +
" contains an expression nor does it contain other constraints." +
"Please validate the given ExplorationSpecification.");
}
validationResult = ((ExplorationConstraint<?>)constraint).getExpression()
.accept(this, Boolean.class);
if(!validationResult) {
return false;
}
} else {
throw new Exception("At least one Constraint is not ConstraintExpression in terms" +
" of the Exploration DSL v2. Cannot perfom the Validation" +
" for other ExplorationConstraint types. Sorry, aborting.");
}
}
......
......@@ -5,5 +5,4 @@ DSMLModelElementFactory.java 518c691c2fb01b3bbd47cb59905dd0bb22bdea0a RED
DSMLUtils.java 7bf9604b175565be9ec7d99f127ad77f32cd1f1a RED
DesignSpaceExplorationModelElementFactory.java 9ac2ca7f75e0ad9bc5405a25ffba24e695fbe777 RED
ExplorationReflectionUtils.java 840eed89abdf4bed7a555738af37f0db05178d72 RED
ExplorationSolutionVisualizationTransformation.java 7860b0721f357e717a02402f932f1239e144c021 RED
ExplorationUtils.java 6d3066b3929f0287b4d963a1406496f3582740ee RED
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment