Commit 57aa7b38 authored by Marco Volpe's avatar Marco Volpe
Browse files

More comments addressed.

* A TODO answered but not really addressed in
AllocationPatternFXController. I keep that class RED for now

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

Signed-off-by: Marco Volpe's avatarMarco Volpe <volpe@fortiss.org>
parent 8a126253
AllocationPatternFXController.java 16b8fb8250581fc07ab800c8e0daf57c86624b4c YELLOW
CouplingPatternFXController.java 7b5bb5699d270aed06e3941aafdfc389bbef489a YELLOW
MemoryPatternFXController.java d5bc8d309f23c1a321aba18145ea5eed6582357b YELLOW
SafetyPatternFXController.java bdf1338096a6cdcfe393d13ccdd07e051f145bce YELLOW
AllocationPatternFXController.java f55fb67b4f260f7128aa9b67ff58c90bafda118e RED
CouplingPatternFXController.java 6534d5a517b87d667bc61c27bd0e619b1a9a9281 YELLOW
MemoryPatternFXController.java 0798e643baa49c3b6fe32fb6418f2dbedefedb07 YELLOW
SafetyPatternFXController.java b19cf6dd4a3fb23aadae9870b0483201482cb1d8 YELLOW
......@@ -149,17 +149,16 @@ public class AllocationPatternFXController extends PatternFXControllerBase {
dse.getCurrentStep().getSuperSetMap().get(ExecutionUnit.class);
// TODO(AD): This is used in several patterns and could be moved to some base class or
// static method.
// static method. (MV): I don't see an easy way to generalize properly, since depending
// on the table the number of columns and the information required to label each column
// is not necessarily the same. For now I only simplified by removing the switch when
// there is only one column. In other classes, I removed the todo, but feel free to
// reassign to me if you see a better solution.
DynamicTreeTableUIProviderBase uiProvider = new DynamicTreeTableUIProviderBase() {
/** {@inheritDoc} */
@Override
public String getLabel(Object element, int column) {
switch(column) {
case 0:
return ((INamedElement)element).getName();
default:
return "";
}
return ((INamedElement)element).getName();
}
};
......
......@@ -140,18 +140,11 @@ public class CouplingPatternFXController extends PatternFXControllerBase {
DSE dse = IDSEPerspectiveManager.INSTANCE.getCurrentlySelectedDSE();
SuperSet<Task> tasks = dse.getCurrentStep().getSuperSetMap().get(Task.class);
// TODO(AD): This is used in several patterns and could be moved to some base class or
// static method.
DynamicTreeTableUIProviderBase uiProvider = new DynamicTreeTableUIProviderBase() {
/** {@inheritDoc} */
@Override
public String getLabel(Object element, int column) {
switch(column) {
case 0:
return ((INamedElement)element).getName();
default:
return "";
}
return ((INamedElement)element).getName();
}
};
......
......@@ -23,6 +23,7 @@ import static org.fortiss.af3.exploration.smt.util.Z3ModelElementFactory.createS
import static org.fortiss.af3.exploration.util.DSMLModelElementFactory.createAnd;
import static org.fortiss.af3.exploration.util.DSMLModelElementFactory.createBooleanLiteral;
import static org.fortiss.af3.exploration.util.PatternFactoryUtils.createUtilizationPatternExpression;
import static org.fortiss.tooling.base.utils.AnnotationUtils.getAnnotationValue;
import java.util.Collection;
import java.util.HashMap;
......@@ -40,7 +41,6 @@ import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.platform.model.annotation.FlashSize;
import org.fortiss.af3.platform.model.annotation.RamSize;
import org.fortiss.af3.task.model.annotation.RamRequirement;
import org.fortiss.tooling.base.utils.AnnotationUtils;
import org.fortiss.tooling.common.ui.javafx.control.treetableview.DynamicTreeTableUIProviderBase;
import org.fortiss.tooling.common.ui.javafx.control.treetableview.DynamicTreeTableViewer;
import org.fortiss.tooling.kernel.model.INamedElement;
......@@ -157,8 +157,8 @@ public class MemoryPatternFXController extends PatternFXControllerBase {
case 0:
return ((INamedElement)element).getName();
case 1:
return AnnotationUtils.getAnnotationValue((ExecutionUnit)element,
FlashSize.class, String.class);
return getAnnotationValue((ExecutionUnit)element, FlashSize.class,
Long.class).toString();
case 2:
return memoryUtilization.get(element).toString();
default:
......
......@@ -22,6 +22,7 @@ import static org.fortiss.af3.exploration.util.DSMLModelElementFactory.createAnd
import static org.fortiss.af3.exploration.util.DSMLModelElementFactory.createBooleanLiteral;
import static org.fortiss.af3.exploration.util.PatternFactoryUtils.calcPatternName;
import static org.fortiss.af3.exploration.util.PatternFactoryUtils.createSafetyPatternExpression;
import static org.fortiss.tooling.base.utils.AnnotationUtils.getAnnotationValue;
import java.util.Collection;
import java.util.List;
......@@ -35,9 +36,8 @@ import org.fortiss.af3.exploration.ui.perspective.generic.PatternFXControllerBas
import org.fortiss.af3.exploration.ui.perspective.generic.SuperSetContentProvider;
import org.fortiss.af3.exploration.ui.perspective.service.IDSEPerspectiveManager;
import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.safety.model.ASIL;
import org.fortiss.af3.safety.model.SIL;
import org.fortiss.af3.safety.model.annotation.SafetyIntegrityLevel;
import org.fortiss.tooling.base.utils.AnnotationUtils;
import org.fortiss.tooling.common.ui.javafx.control.treetableview.DynamicTreeTableUIProviderBase;
import org.fortiss.tooling.common.ui.javafx.control.treetableview.DynamicTreeTableViewer;
import org.fortiss.tooling.kernel.model.INamedElement;
......@@ -149,8 +149,8 @@ public class SafetyPatternFXController extends PatternFXControllerBase {
case 0:
return ((INamedElement)element).getName();
case 1:
return AnnotationUtils.getAnnotationValue((ExecutionUnit)element,
SafetyIntegrityLevel.class, ASIL.class).toString();
return getAnnotationValue((ExecutionUnit)element,
SafetyIntegrityLevel.class, SIL.class).toString();
default:
return "";
}
......
BusBandwidthOptimizationPatternFXController.java 2765573c1227f0e51b86788ff03841db785c64e9 YELLOW
BusBandwidthOptimizationPatternFXController.java 5a6dc27b4acf6bc59a6438c3ad03a17abe63ef86 YELLOW
HardwareOptimizationPatternFXController.java 6bfc50de161fb634420583a40278e01f8a5c71eb YELLOW
......@@ -175,12 +175,7 @@ public class BusBandwidthOptimizationPatternFXController extends PatternFXContro
/** {@inheritDoc} */
@Override
public String getLabel(Object element, int column) {
switch(column) {
case 0:
return ((INamedElement)element).getName();
default:
return "";
}
return ((INamedElement)element).getName();
}
};
......
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