Commit bc58ca0b authored by Simon Barner's avatar Simon Barner
Browse files

RED

Issue-Ref: 3812
Issue-Url: https://af3-developer.fortiss.org/issues/3812

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent 2b69ffc4
AllocationPatternCompositeBackend.java 773bd1034e974dd59624b91e0aade1facce44432 YELLOW
ConstraintPatternHeader.java 6e6b46562953f3490ff3beeaa446d169a366cb48 GREEN
AllocationPatternCompositeBackend.java 056291311769496a5fa837f98f2dd26207432dfd RED
ConstraintPatternHeader.java f8a7e3b20d5b2dc3b34df1ac27be3f58e727e432 RED
ConstraintViewBackend.java 4099a405a81ccdf05e3f517d6b1de3f2f2b2d926 GREEN
FunctionCouplingCompositeBackend.java 36f63403034b15e7f668da551798c752edb6724e YELLOW
FunctionCouplingCompositeBackend.java 16e20af26af36026ae2f1404b755f456b92760bf RED
MemoryPatternBackend.java c452fa46dce1d8646a60ba48ee7bcdd2b39debd7 GREEN
SafetyPatternBackend.java bfb2d61e387f33cdff9270978253868d50308b43 GREEN
......@@ -53,11 +53,15 @@ public class AllocationPatternCompositeBackend extends AllocationPatternComposit
implements IEventListener {
/** The left list of element(s). allocation source. */
// TODO (SB): List<Task>
private List<IModelElement> taskList;
// TODO (SB): List<ExecutionUnit>
/** The right list of element(s). allocation destination. */
private List<IModelElement> ecuList;
// TODO (SB): private static final (or inline since it is used only once)
/** Separation marker for allocation targets. */
final String SEPARATION_STRING_LEFT = "; ";
// TODO (SB): private static final (or inline since it is used only once)
/** Separation marker for allocation targets. */
final String SEPARATION_STRING_RIGHT = " | ";
......@@ -119,8 +123,10 @@ public class AllocationPatternCompositeBackend extends AllocationPatternComposit
((IStructuredSelection)event.getSelection()).toList();
Object eventSource = event.getSource();
if(eventSource.equals(leftTreeViewer)) {
// TODO (SB: EcoreUtils.pickInstanceOf(Tasks.class, selectionList);
taskList = selectionList;
} else if(eventSource.equals(rightTreeViewer)) {
// TODO (SB: EcoreUtils.pickInstanceOf(Tasks.class, ...);
ecuList = selectionList;
}
updateConstraint();
......@@ -176,6 +182,7 @@ public class AllocationPatternCompositeBackend extends AllocationPatternComposit
DSE dse = IDSEPerspectiveManager.INSTANCE.getCurrentlySelectedDSE();
boolean isAllocation = btnAllocation.getSelection();
// Cannot use static import due to function name clash
// TODO (SB): Use static import
IExpression allocationPattern = PatternFactoryUtils.createAllocationPatternExpression(dse,
isAllocation, taskList, ecuList);
SMTConstraint constraint =
......
......@@ -63,6 +63,8 @@ public class ConstraintPatternHeader extends Composite implements IEventListener
lblName.setSize(38, 14);
lblName.setText("Name:");
// TODO (SB): Add another parameter that allows to set a better initial value for the name
// e.g., <task> -> <ecu> for the allocation pattern
txtName = new Text(this, SWT.BORDER);
txtName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
txtName.setSize(83, 19);
......
......@@ -107,6 +107,7 @@ public class FunctionCouplingCompositeBackend extends FunctionCouplingCompositeG
/** Current Error Message for Predicate Creation. */
private String errorMessage = "No Error";
// TODO (SB): Remove unused variable
/** Name of the selected Constraint. */
private String selectedConstName;
......@@ -133,6 +134,7 @@ public class FunctionCouplingCompositeBackend extends FunctionCouplingCompositeG
} else {
name = "Decoupling";
}
// TODO (SB, Remove unneeded copying)
List<IModelElement> elementList = new ArrayList<IModelElement>();
elementList.addAll(selectedTasks);
name = name + calcPatternName(elementList, ",");
......
......@@ -6,4 +6,4 @@ ExplorationModelElementFactory.java bb48b2d09b92efcb1b2d3e382555089bb7ed5db5 GRE
ExplorationReflectionUtils.java 62731e1cef32fe93f2c2017f93f5ba1f054d5197 GREEN
ExplorationUtils.java 3e317c851bd1a0b48fbec3fdbe039d8b66506c51 GREEN
ModelSnapshotExtractUtils.java dde8b42c5a7228478ffe8c67820bcac91e875562 GREEN
PatternFactoryUtils.java 2a888de216d471b437cd0dbdfdb184655d354720 YELLOW
PatternFactoryUtils.java 056fe2cda7c0cf93a45a0122274b68d228192236 RED
......@@ -356,6 +356,8 @@ public class PatternFactoryUtils {
* @return {@link IExpression} allocating/dislocating {@link Task}s to/from
* {@link ExecutionUnit}s
*/
// TODO (SB): Change to Collection<Task> taskSet, Collection<ExecutionUnit>, remove unneeded
// copying below, and update documentation / parameter names
public static IExpression createAllocationPatternExpression(DSE dse, boolean isAllocation,
Collection<IModelElement> taskSet, Collection<IModelElement> ecuSet) {
SuperSetMap dseSets = dse.getCurrentStep().getSuperSetMap();
......@@ -469,6 +471,7 @@ public class PatternFactoryUtils {
* "too long". The contained elements of sets can still be easily seen by setting
* "DSE_DEBUG_VERBOSE" to "true" in the environment variable section.
*/
// TODO (SB): Change to "List<? extends INamedElement> selectedElements" and remove cast
public static String calcPatternName(List<IModelElement> selectedElements, String separator) {
String constraintNamePart = " ";
if(selectedElements != null) {
......
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