Code cleanup
diff --git a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/CollectorExample.java b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/CollectorExample.java
index 367ef0f..3d1a0e8 100644
--- a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/CollectorExample.java
+++ b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/CollectorExample.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2020 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -18,9 +18,9 @@
import java.io.File;
import java.util.List;
+import org.eclipse.app4mc.amalthea.model.ActivityGraphItem;
import org.eclipse.app4mc.amalthea.model.Amalthea;
import org.eclipse.app4mc.amalthea.model.AmaltheaFactory;
-import org.eclipse.app4mc.amalthea.model.ActivityGraphItem;
import org.eclipse.app4mc.amalthea.model.Label;
import org.eclipse.app4mc.amalthea.model.LabelAccess;
import org.eclipse.app4mc.amalthea.model.LabelAccessEnum;
@@ -36,7 +36,7 @@
public static void main(String[] args) {
final File outputFile = new File("model-output/Collector/CollectorModel.amxmi");
-
+
System.out.println("----------------------------");
System.out.println(" Amalthea Collector Example ");
System.out.println("----------------------------");
@@ -60,7 +60,7 @@
// ***** Save model *****
- boolean success = AmaltheaWriter.writeToFile(model, outputFile);
+ boolean success = AmaltheaWriter.writeToFile(model, outputFile);
if (success) {
System.out.println("writing file: " + outputFile.getAbsolutePath());
@@ -69,7 +69,7 @@
return;
}
-
+
// ***** Some tests *****
List<ActivityGraphItem> items1 = SoftwareUtil.collectActivityGraphItems(run.getActivityGraph());
@@ -78,7 +78,7 @@
for (ActivityGraphItem item : items1) {
System.out.println(" - " + item.toString());
}
-
+
List<ActivityGraphItem> items2 = SoftwareUtil.collectActivityGraphItems(run.getActivityGraph(), null,
a -> a instanceof LabelAccess && ((LabelAccess) a).getAccess() == LabelAccessEnum.READ);
@@ -86,14 +86,14 @@
for (ActivityGraphItem item : items2) {
System.out.println(" - " + item.toString());
}
-
+
List<LabelAccess> items3 = SoftwareUtil.collectActivityGraphItems(run.getActivityGraph(), null, LabelAccess.class);
-
+
System.out.println("\nLabel accesses:");
for (LabelAccess item : items3) {
System.out.println(" - " + item.eClass().getName() + " " + item.getData().getName());
}
-
+
List<LabelAccess> items4 = SoftwareUtil.collectActivityGraphItems(
run.getActivityGraph(),
diff --git a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/EnumExample.java b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/EnumExample.java
index eaefed6..15c88fc 100644
--- a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/EnumExample.java
+++ b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/EnumExample.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2020 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -22,11 +22,11 @@
import org.eclipse.app4mc.amalthea.model.AmaltheaFactory;
import org.eclipse.app4mc.amalthea.model.AmaltheaIndex;
import org.eclipse.app4mc.amalthea.model.EnumMode;
-import org.eclipse.app4mc.amalthea.model.ModeLabel;
import org.eclipse.app4mc.amalthea.model.Label;
import org.eclipse.app4mc.amalthea.model.LabelAccess;
import org.eclipse.app4mc.amalthea.model.LabelAccessEnum;
import org.eclipse.app4mc.amalthea.model.Mode;
+import org.eclipse.app4mc.amalthea.model.ModeLabel;
import org.eclipse.app4mc.amalthea.model.ModeLiteral;
import org.eclipse.app4mc.amalthea.model.Runnable;
import org.eclipse.app4mc.amalthea.model.RunnableCall;
diff --git a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/IndexExample.java b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/IndexExample.java
index 15c6ab2..59038db 100644
--- a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/IndexExample.java
+++ b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/IndexExample.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2020 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -55,7 +55,7 @@
System.err.println("Error: No model loaded!");
return;
}
-
+
// ***** Modify *****
final AmaltheaFactory fac = AmaltheaFactory.eINSTANCE;
@@ -64,53 +64,53 @@
Tag tag = fac.createTag();
tag.setName("Tx");
ModelUtil.getOrCreateCommonElements(model).getTags().add(tag);
-
+
Label lab = fac.createLabel();
lab.setName("LabZ");
ModelUtil.getOrCreateSwModel(model).getLabels().add(lab);
}
-
+
// ***** Dump index info *****
-
+
System.out.println("\n\n*** Index 1: Basic info ***\n");
-
+
AmaltheaIndex.dumpAdapterInfo(model, 1, System.out); // basic info
-
-
+
+
System.out.println("\n\n*** Index 2: Cross reference map ***\n");
-
+
AmaltheaIndex.dumpAdapterInfo(model, 2, System.out); // cross reference map
-
+
System.out.println("\n\n*** Index 3: Name index ***\n");
-
+
AmaltheaIndex.dumpAdapterInfo(model, 3, System.out); // name index
-
+
// ***** Use index 1: Get referring objects *****
String nameOfLabel = "APedSensor1Voltage";
-
+
System.out.println("\n\n*** Show objects referring to " + nameOfLabel + " (expected results: 1) ***\n");
Set<Label> list = AmaltheaIndex.getElements(model, nameOfLabel, Label.class);
for (Label label : list) {
Collection<EObject> result = AmaltheaIndex.getReferringObjects(label);
-
+
System.out.println(result);
}
-
+
// ***** Use index 2: Get name conflicts (ID) *****
-
+
System.out.println("\n\n*** Show ID Conflicts (expected results: 1) ***\n");
-
+
List<Set<IReferable>> conflicts = AmaltheaIndex.getObjectsWithConflictingNames(model);
System.out.println(conflicts);
-
-
+
+
System.out.println();
System.out.println("done.");
}
diff --git a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/LoadModifySaveExample.java b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/LoadModifySaveExample.java
index 31f258e..932470f 100644
--- a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/LoadModifySaveExample.java
+++ b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/LoadModifySaveExample.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -51,7 +51,7 @@
System.err.println("Error: No model loaded!");
return;
}
-
+
// ***** Modify *****
final AmaltheaFactory fac = AmaltheaFactory.eINSTANCE;
diff --git a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/SplitModelExample.java b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/SplitModelExample.java
index 1d53942..5444115 100644
--- a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/SplitModelExample.java
+++ b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/SplitModelExample.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2020 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -45,7 +45,7 @@
if (resource == null) return;
final ResourceSet resourceSet = resource.getResourceSet();
-
+
try {
resource.load(null);
} catch (IOException e) {
diff --git a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/StandardElementsExample.java b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/StandardElementsExample.java
index 6feb218..91acea2 100644
--- a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/StandardElementsExample.java
+++ b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/StandardElementsExample.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -49,7 +49,7 @@
System.out.println("-----------------------------------");
System.out.println(" Standard Elements Example");
System.out.println("-----------------------------------");
-
+
final AmaltheaFactory fac = AmaltheaFactory.eINSTANCE;
// ***** Model 1 *****
diff --git a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/StructureCheckExample.java b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/StructureCheckExample.java
index 34dc6b6..344cc27 100644
--- a/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/StructureCheckExample.java
+++ b/examples/app4mc.example.tool.java/src/app4mc/example/tool/java/StructureCheckExample.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/examples/app4mc.example.tool.validation/src/app4mc/example/tool/validation/NewValidationExample.java b/examples/app4mc.example.tool.validation/src/app4mc/example/tool/validation/NewValidationExample.java
index 7f8ff3a..3f5759e 100644
--- a/examples/app4mc.example.tool.validation/src/app4mc/example/tool/validation/NewValidationExample.java
+++ b/examples/app4mc.example.tool.validation/src/app4mc/example/tool/validation/NewValidationExample.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -39,7 +39,7 @@
//@SuppressWarnings("java:S106") // Example code - Use of standard outputs is intended
public class NewValidationExample {
-
+
public static void main(String[] args) {
// example: absolute path
@@ -66,12 +66,12 @@
// ***** Create validation objects *****
- List<Class<? extends IProfile>> profileList =
+ List<Class<? extends IProfile>> profileList =
Arrays.asList(AmaltheaProfile.class, EMFProfile.class);
ValidationAggregator aggregator = new ValidationAggregator();
aggregator.addProfiles(profileList);
-
+
// ***** Create output directories *****
try {
@@ -89,31 +89,31 @@
try (PrintStream infoStream = new PrintStream(new FileOutputStream(infoFile.getAbsoluteFile(), false)))
{
System.out.println("writing file: " + infoFile.getAbsoluteFile());
-
+
infoStream.println(dateFormat.format(new Date()));
-
+
// ***** Show single profile resolution *****
-
+
infoStream.println("\n\n*** Validation Profiles ***");
-
+
ProfileManager man = new ProfileManager();
-
+
infoStream.println();
man.dumpProfile(AmaltheaProfile.class, infoStream);
-
+
infoStream.println();
man.dumpProfile(EMFProfile.class, infoStream);
-
+
// ***** Print (complex) profile info *****
-
+
infoStream.println("\n\n*** Validation info ***");
-
+
infoStream.println();
infoStream.println("Compact validation map (map1)");
infoStream.println("-----------------------------");
infoStream.println();
aggregator.dumpValidationMap1(infoStream);
-
+
infoStream.println("\n");
infoStream.println("Expanded validation map (map2)");
infoStream.println("------------------------------");
@@ -138,7 +138,7 @@
resultStream.println("\nValidation results (" + dateFormat.format(new Date()) + ")");
resultStream.println("\nNumber of results: " + results.size() + "\n");
-
+
executor.dumpResultMap(resultStream);
} catch (IOException e) {
diff --git a/examples/app4mc.example.tool.workflow/src/org/eclipse/app4mc/example/tool/workflow/components/CreateLabelsComponent.java b/examples/app4mc.example.tool.workflow/src/org/eclipse/app4mc/example/tool/workflow/components/CreateLabelsComponent.java
index 1edaab6..77a10d5 100644
--- a/examples/app4mc.example.tool.workflow/src/org/eclipse/app4mc/example/tool/workflow/components/CreateLabelsComponent.java
+++ b/examples/app4mc.example.tool.workflow/src/org/eclipse/app4mc/example/tool/workflow/components/CreateLabelsComponent.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2013 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -52,7 +52,7 @@
amaltheaModel.setSwModel(swModel);
}
- for (final String labelName : this.labelNames) {
+ for (final String labelName : labelNames) {
final Label label = AmaltheaFactory.eINSTANCE.createLabel();
@@ -64,12 +64,12 @@
}
- this.log.info("completed execution of CreateLabelsComponent");
+ log.info("completed execution of CreateLabelsComponent");
}
public List<String> getLabelNames() {
- return this.labelNames;
+ return labelNames;
}
public void setLabelNames(final List<String> labelNames) {
@@ -77,7 +77,7 @@
}
public void addLabelName(final String labelName) {
- this.labelNames.add(labelName);
+ labelNames.add(labelName);
}
diff --git a/examples/app4mc.example.tool.workflow/src/org/eclipse/app4mc/example/tool/workflow/components/LabelsExtractorComponent.java b/examples/app4mc.example.tool.workflow/src/org/eclipse/app4mc/example/tool/workflow/components/LabelsExtractorComponent.java
index 6a4575a..fed835f 100644
--- a/examples/app4mc.example.tool.workflow/src/org/eclipse/app4mc/example/tool/workflow/components/LabelsExtractorComponent.java
+++ b/examples/app4mc.example.tool.workflow/src/org/eclipse/app4mc/example/tool/workflow/components/LabelsExtractorComponent.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2013 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -37,7 +37,7 @@
assert null != amaltheaModel;
- this.log.info("Starting to extract Labels from the AMALTHEA models...");
+ log.info("Starting to extract Labels from the AMALTHEA models...");
final SWModel swModel = amaltheaModel.getSwModel();
@@ -50,14 +50,14 @@
final String labelName = label.getName();
- this.log.info(labelName);
+ log.info(labelName);
}
}
else {
- this.log.warn("Unable to extract Labels as there is Software Model defined in supplied AMALTHEA models ");
+ log.warn("Unable to extract Labels as there is Software Model defined in supplied AMALTHEA models ");
}
- this.log.info("completed execution of LabelsExtractorComponent");
+ log.info("completed execution of LabelsExtractorComponent");
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/AConverter.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/AConverter.java
index 7694f00..c9f44be 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/AConverter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/AConverter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -22,7 +22,7 @@
import org.eclipse.jface.operation.IRunnableWithProgress;
public abstract class AConverter implements IRunnableWithProgress {
-
+
protected final Amalthea model;
protected final ATDBConnection con;
private final String converionSubject;
@@ -30,12 +30,12 @@
protected AConverter(final Amalthea model, final ATDBConnection con, final String conversionSubject) {
this.model = model;
this.con = con;
- this.converionSubject = conversionSubject;
+ converionSubject = conversionSubject;
}
-
+
@Override
public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
- progressMonitor.beginTask("Converting " + this.converionSubject + "...", 1);
+ progressMonitor.beginTask("Converting " + converionSubject + "...", 1);
try {
execute();
progressMonitor.worked(1);
@@ -45,7 +45,7 @@
progressMonitor.done();
}
}
-
+
protected abstract void execute() throws InvocationTargetException, InterruptedException, SQLException;
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/AmaltheaModelUtil.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/AmaltheaModelUtil.java
index 127666b..b2e798d 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/AmaltheaModelUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/AmaltheaModelUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -16,8 +16,8 @@
import java.util.AbstractMap.SimpleEntry;
import java.util.Arrays;
import java.util.List;
-import java.util.Objects;
import java.util.Map.Entry;
+import java.util.Objects;
import java.util.Optional;
import java.util.stream.Stream;
@@ -34,12 +34,12 @@
import org.eclipse.emf.ecore.util.EcoreUtil;
enum AmaltheaModelUtil {;
-
+
static <T extends INamed> T getOrAddNew(final EObject amEObject, final EReference referenceFeature,
final String name, final Class<T> clazz) {
return getOrAddNew(amEObject, referenceFeature, name, clazz, referenceFeature.getEReferenceType());
}
-
+
static <T extends INamed> T getOrAddNew(final EObject amEObject, final EReference referenceFeature,
final String name, final Class<T> clazz, final EClass eClazz) {
@SuppressWarnings("unchecked")
@@ -69,7 +69,7 @@
});
return value;
}
-
+
static <C extends EObject, T extends INamed> Entry<C, T> getOrAddNewWithContainer(final EObject eObject,
final EReference containerFeature, final Class<C> cClazz, final EClass cEClazz,
final EReference referenceFeature, final Class<T> rClazz, final EClass rEClazz, final String name) {
@@ -83,7 +83,7 @@
? ((List<T>) containerEObject.eGet(referenceFeature)).stream().map(ref -> new SimpleEntry<>(containerEObject, ref))
: Stream.of(new SimpleEntry<>(containerEObject, rClazz.cast(containerEObject.eGet(referenceFeature))))
));
-
+
final Entry<C, T> value = allValues.filter(p -> rClazz.isInstance(p.getValue()) && p.getValue().getName().equals(name))
.findFirst().orElseGet(() -> {
T ret;
@@ -121,12 +121,9 @@
});
return value;
}
-
+
static Optional<Enumerator> getEnumLiteralByNameForFeature(final String enumLiteralName, final EStructuralFeature esf) {
- if (enumLiteralName == null || enumLiteralName.length() == 0) {
- return Optional.empty();
- }
- if (esf == null) {
+ if (enumLiteralName == null || enumLiteralName.length() == 0 || (esf == null)) {
return Optional.empty();
}
return Optional.of(esf).filter(EAttribute.class::isInstance).map(EAttribute.class::cast)
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/EventChainConverter.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/EventChainConverter.java
index 0650a88..711cb0f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/EventChainConverter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/EventChainConverter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -38,30 +38,30 @@
@Override
protected void execute() throws SQLException {
- final ConstraintsModel constrModel = ModelUtil.getOrCreateConstraintsModel(this.model);
-
+ final ConstraintsModel constrModel = ModelUtil.getOrCreateConstraintsModel(model);
+
final List<EventChain> eventChains = new ArrayList<>();
- this.con.getAllEventChains().forEach(ecName -> {
+ con.getAllEventChains().forEach(ecName -> {
final EventChain eventChain = AmaltheaModelUtil.getOrAddNew(constrModel,
AmaltheaPackage.eINSTANCE.getConstraintsModel_EventChains(), ecName, EventChain.class,
AmaltheaPackage.eINSTANCE.getEventChain());
eventChains.add(eventChain);
});
-
+
for(final EventChain eventChain:eventChains) {
- final String stimulusEventName = this.con.getEventChainStimulus(eventChain.getName());
+ final String stimulusEventName = con.getEventChainStimulus(eventChain.getName());
if (stimulusEventName.length() > 0) {
AmaltheaModelUtil.getOrAddNew(eventChain, AmaltheaPackage.eINSTANCE.getAbstractEventChain_Stimulus(),
stimulusEventName, Event.class);
}
-
- final String responseEventName = this.con.getEventChainResponse(eventChain.getName());
+
+ final String responseEventName = con.getEventChainResponse(eventChain.getName());
if (responseEventName.length() > 0) {
AmaltheaModelUtil.getOrAddNew(eventChain, AmaltheaPackage.eINSTANCE.getAbstractEventChain_Response(),
responseEventName, Event.class);
}
-
- final List<String> items = this.con.getEventChainItems(eventChain.getName());
+
+ final List<String> items = con.getEventChainItems(eventChain.getName());
for(final String subECName:items) {
if (subECName.length() == 0) continue;
final boolean isReference = !AmaltheaIndex.getElements(constrModel, subECName, EventChain.class).isEmpty();
@@ -79,8 +79,8 @@
AmaltheaPackage.eINSTANCE.getSubEventChain(), subECName);
}
}
-
- final int minItemsComplete = this.con.getEventChainMinItemsCompleted(eventChain.getName());
+
+ final int minItemsComplete = con.getEventChainMinItemsCompleted(eventChain.getName());
if (minItemsComplete > 0) {
eventChain.setMinItemsCompleted(minItemsComplete);
eventChain.setItemType(EventChainItemType.PARALLEL);
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/EventConverter.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/EventConverter.java
index 53b94d2..04bf951 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/EventConverter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/EventConverter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -34,17 +34,17 @@
import org.eclipse.emf.ecore.EStructuralFeature;
public class EventConverter extends AConverter {
-
+
/**
* Same as {@link java.util.function.Supplier}, but may throw exception of type E.
* @param <T>
* @param <E>
*/
@FunctionalInterface
- public static interface ThrowingSupplier<T, E extends Exception> {
+ public interface ThrowingSupplier<T, E extends Exception> {
T get() throws E;
}
-
+
private final Map<ThrowingSupplier<List<String>, SQLException>, EClass> eventSupplier2EClass;
private static final Map<EClass, EReference> eClass2SourceReference = new LinkedHashMap<>();
static {
@@ -55,48 +55,48 @@
public EventConverter(final Amalthea model, final ATDBConnection con) {
super(model, con, "events");
- this.eventSupplier2EClass = new LinkedHashMap<>();
- this.eventSupplier2EClass.put(this.con::getAllRunnableEvents, AmaltheaPackage.eINSTANCE.getRunnableEvent());
- this.eventSupplier2EClass.put(this.con::getAllProcessEvents, AmaltheaPackage.eINSTANCE.getProcessEvent());
- this.eventSupplier2EClass.put(this.con::getAllLabelEvents, AmaltheaPackage.eINSTANCE.getLabelEvent());
- this.eventSupplier2EClass.put(this.con::getAllStimulusEvents, AmaltheaPackage.eINSTANCE.getStimulusEvent());
+ eventSupplier2EClass = new LinkedHashMap<>();
+ eventSupplier2EClass.put(this.con::getAllRunnableEvents, AmaltheaPackage.eINSTANCE.getRunnableEvent());
+ eventSupplier2EClass.put(this.con::getAllProcessEvents, AmaltheaPackage.eINSTANCE.getProcessEvent());
+ eventSupplier2EClass.put(this.con::getAllLabelEvents, AmaltheaPackage.eINSTANCE.getLabelEvent());
+ eventSupplier2EClass.put(this.con::getAllStimulusEvents, AmaltheaPackage.eINSTANCE.getStimulusEvent());
}
-
+
@Override
protected void execute() throws SQLException {
- final EventModel evModel = ModelUtil.getOrCreateEventModel(this.model);
-
+ final EventModel evModel = ModelUtil.getOrCreateEventModel(model);
+
final List<Event> events = new ArrayList<>();
- for(final Entry<ThrowingSupplier<List<String>, SQLException>, EClass> evSup2ECl: this.eventSupplier2EClass.entrySet()) {
+ for(final Entry<ThrowingSupplier<List<String>, SQLException>, EClass> evSup2ECl: eventSupplier2EClass.entrySet()) {
evSup2ECl.getKey().get().forEach(eventName ->
events.add(AmaltheaModelUtil.getOrAddNew(evModel,
AmaltheaPackage.eINSTANCE.getEventModel_Events(), eventName, Event.class, evSup2ECl.getValue())));
}
-
+
for(final Event event: events) {
updateEventType(event);
updateEntity(event);
updateSourceEntity(event);
}
}
-
+
private void updateEventType(final Event event) throws SQLException {
final EStructuralFeature eventTypeESF = event.eClass().getEStructuralFeature("eventType");
- final String eventType = this.con.getEventTypeForEvent(event.getName());
+ final String eventType = con.getEventTypeForEvent(event.getName());
final Optional<Enumerator> eventTypeEnumLiteral = AmaltheaModelUtil.getEnumLiteralByNameForFeature(eventType, eventTypeESF);
eventTypeEnumLiteral.ifPresent(eLiteral -> event.eSet(eventTypeESF, eLiteral));
}
-
+
private void updateEntity(final Event event) throws SQLException {
final EReference eventEntityESF = (EReference)event.eClass().getEStructuralFeature("entity");
- final String entityName = this.con.getEntityForEvent(event.getName());
+ final String entityName = con.getEntityForEvent(event.getName());
AmaltheaModelUtil.getOrAddNew(event, eventEntityESF, entityName, IReferable.class);
}
-
+
private void updateSourceEntity(final Event event) throws SQLException {
- final String sourceEntityName = this.con.getSourceEntityForEvent(event.getName());
+ final String sourceEntityName = con.getSourceEntityForEvent(event.getName());
if (sourceEntityName.length() == 0) return;
-
+
if (eClass2SourceReference.containsKey(event.eClass())) {
AmaltheaModelUtil.getOrAddNew(event, eClass2SourceReference.get(event.eClass()), sourceEntityName, IReferable.class);
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/HWConverter.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/HWConverter.java
index 31e7433..2291366 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/HWConverter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/HWConverter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -37,39 +37,39 @@
@Override
protected void execute() throws SQLException {
- final HWModel hwModel = ModelUtil.getOrCreateHwModel(this.model);
+ final HWModel hwModel = ModelUtil.getOrCreateHwModel(model);
final HwStructure system = AmaltheaModelUtil.getOrAddNew(hwModel,
AmaltheaPackage.eINSTANCE.getHWModel_Structures(), "System", HwStructure.class);
system.setStructureType(StructureType.SYSTEM);
-
+
final List<HwStructure> ecus = new ArrayList<>();
- this.con.getAllECUs().forEach(ecuName -> {
+ con.getAllECUs().forEach(ecuName -> {
final HwStructure ecu = AmaltheaModelUtil.getOrAddNew(system,
AmaltheaPackage.eINSTANCE.getHwStructure_Structures(), ecuName, HwStructure.class);
ecu.setStructureType(StructureType.ECU);
ecus.add(ecu);
});
-
+
for(final HwStructure ecu:ecus) {
final List<HwStructure> processors = new ArrayList<>();
- this.con.getProcessorsOfECU(ecu.getName()).forEach(processorName -> {
+ con.getProcessorsOfECU(ecu.getName()).forEach(processorName -> {
final HwStructure processor = AmaltheaModelUtil.getOrAddNew(ecu,
AmaltheaPackage.eINSTANCE.getHwStructure_Structures(), processorName, HwStructure.class);
processor.setStructureType(StructureType.MICROCONTROLLER);
processors.add(processor);
});
-
+
for(final HwStructure processor:processors) {
final List<ProcessingUnit> cores = new ArrayList<>();
- this.con.getCoresOfProcessor(processor.getName()).forEach(coreName -> {
+ con.getCoresOfProcessor(processor.getName()).forEach(coreName -> {
final ProcessingUnit core = AmaltheaModelUtil.getOrAddNew(processor,
AmaltheaPackage.eINSTANCE.getHwStructure_Modules(), coreName, ProcessingUnit.class,
AmaltheaPackage.eINSTANCE.getProcessingUnit());
cores.add(core);
});
-
+
for(final ProcessingUnit core:cores) {
- final long frequencyInHz = this.con.getCoreFrequencyInHz(core.getName());
+ final long frequencyInHz = con.getCoreFrequencyInHz(core.getName());
if (frequencyInHz > 0) {
try {
final FrequencyDomain fd = AmaltheaModelUtil.getOrAddNew(hwModel,
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/ImportTransformation.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/ImportTransformation.java
index 76aa802..77634e8 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/ImportTransformation.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/ImportTransformation.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Timing-Architects Embedded Systems GmbH - initial API and implementation
********************************************************************************
@@ -43,8 +43,8 @@
public ImportTransformation(final String source, final String target, final boolean extractLabelsAndAccesses,
final boolean extractRunnableRuntimes, final boolean overwriteExisting) {
- this.atdbSource = source;
- this.amxmiFile = target;
+ atdbSource = source;
+ amxmiFile = target;
this.extractLabelsAndAccesses = extractLabelsAndAccesses;
this.extractRunnableRuntimes = extractRunnableRuntimes;
this.overwriteExisting = overwriteExisting;
@@ -52,14 +52,14 @@
@Override
public void run(final IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
- if (this.atdbSource.isEmpty() || this.amxmiFile.isEmpty()) {
+ if (atdbSource.isEmpty() || amxmiFile.isEmpty()) {
return;
}
final SubMonitor subMon = SubMonitor.convert(progressMonitor, "Creating AMALTHEA model from ATDB...", 8);
final SubMonitor openATDBMonitor = subMon.split(1);
- final Path amxmiFilePath = Paths.get(this.amxmiFile);
- if (this.overwriteExisting) {
+ final Path amxmiFilePath = Paths.get(amxmiFile);
+ if (overwriteExisting) {
try {
Files.deleteIfExists(amxmiFilePath);
} catch (IOException e) {
@@ -67,56 +67,56 @@
}
}
openATDBMonitor.beginTask("Opening ATDB file...", 1);
- try (final ATDBConnection con = new ATDBConnection(this.atdbSource)) {
+ try (final ATDBConnection con = new ATDBConnection(atdbSource)) {
openATDBMonitor.worked(1);
final Amalthea model = Files.exists(amxmiFilePath)
- ? AmaltheaLoader.loadFromFileNamed(this.amxmiFile)
+ ? AmaltheaLoader.loadFromFileNamed(amxmiFile)
: AmaltheaFactory.eINSTANCE.createAmalthea();
if (model == null) {
- throw new InvocationTargetException(new Exception("Could not load amalthea model from file: " + this.amxmiFile + "!"));
+ throw new InvocationTargetException(new Exception("Could not load amalthea model from file: " + amxmiFile + "!"));
}
-
+
// hardware
final SubMonitor hwConvMonitor = subMon.split(1);
final IRunnableWithProgress hwConverter = new HWConverter(model, con);
hwConverter.run(hwConvMonitor);
-
+
// labels
- if (this.extractLabelsAndAccesses) {
+ if (extractLabelsAndAccesses) {
final SubMonitor labelConvMonitor = subMon.split(1);
final IRunnableWithProgress labelConverter = new LabelConverter(model, con);
labelConverter.run(labelConvMonitor);
}
-
+
// runnables
final SubMonitor runConvMonitor = subMon.split(1);
final double freqInHz = HardwareUtil.getModulesFromHwModel(ProcessingUnit.class, model).stream()
.mapToLong(HardwareUtil::getFrequencyOfModuleInHz).average().orElse(0);
final IRunnableWithProgress runnableConverter = new RunnableConverter(model, con,
- this.extractRunnableRuntimes, this.extractLabelsAndAccesses, freqInHz);
+ extractRunnableRuntimes, extractLabelsAndAccesses, freqInHz);
runnableConverter.run(runConvMonitor);
-
+
// stimuli
final SubMonitor stimConvMonitor = subMon.split(1);
final IRunnableWithProgress stimulusConverter = new StimulusConverter(model, con);
stimulusConverter.run(stimConvMonitor);
-
+
// processes
final SubMonitor procConvMonitor = subMon.split(1);
final IRunnableWithProgress processConverter = new ProcessConverter(model, con);
processConverter.run(procConvMonitor);
-
+
// events
final SubMonitor evConvMonitor = subMon.split(1);
final IRunnableWithProgress eventConverter = new EventConverter(model, con);
eventConverter.run(evConvMonitor);
-
+
// event chains
final SubMonitor ecConvMonitor = subMon.split(1);
final IRunnableWithProgress eventChainConverter = new EventChainConverter(model, con);
eventChainConverter.run(ecConvMonitor);
-
- AmaltheaWriter.writeToFileNamed(model, this.amxmiFile);
+
+ AmaltheaWriter.writeToFileNamed(model, amxmiFile);
} catch (SQLException e) {
throw new InvocationTargetException(e);
} finally {
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/LabelConverter.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/LabelConverter.java
index 60ecd3f..d7e9119 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/LabelConverter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/LabelConverter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -34,16 +34,16 @@
@Override
protected void execute() throws SQLException {
- final SWModel swModel = ModelUtil.getOrCreateSwModel(this.model);
-
+ final SWModel swModel = ModelUtil.getOrCreateSwModel(model);
+
final List<Label> labels = new ArrayList<>();
- this.con.getAllLabels().forEach(labelName -> {
+ con.getAllLabels().forEach(labelName -> {
final Label label = AmaltheaModelUtil.getOrAddNew(swModel,
AmaltheaPackage.eINSTANCE.getSWModel_Labels(), labelName, Label.class);
labels.add(label);
});
for(final Label label:labels) {
- final String initialValue = this.con.getLabelInitialValue(label.getName());
+ final String initialValue = con.getLabelInitialValue(label.getName());
if (initialValue.length() > 0) {
CustomPropertyUtil.customPut(label, EntityProperty.INITIAL_VALUE.camelName, initialValue);
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/ProcessConverter.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/ProcessConverter.java
index c7ce348..4504609 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/ProcessConverter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/ProcessConverter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -38,26 +38,26 @@
@Override
protected void execute() throws SQLException {
- final SWModel swModel = ModelUtil.getOrCreateSwModel(this.model);
-
+ final SWModel swModel = ModelUtil.getOrCreateSwModel(model);
+
final List<Process> processes = new ArrayList<>();
- this.con.getAllTasks().forEach(taskName -> processes.add(AmaltheaModelUtil.getOrAddNew(swModel, AmaltheaPackage.eINSTANCE.getSWModel_Tasks(),
+ con.getAllTasks().forEach(taskName -> processes.add(AmaltheaModelUtil.getOrAddNew(swModel, AmaltheaPackage.eINSTANCE.getSWModel_Tasks(),
taskName, Task.class)));
- this.con.getAllISRs().forEach(isrName -> processes.add(AmaltheaModelUtil.getOrAddNew(swModel, AmaltheaPackage.eINSTANCE.getSWModel_Isrs(),
+ con.getAllISRs().forEach(isrName -> processes.add(AmaltheaModelUtil.getOrAddNew(swModel, AmaltheaPackage.eINSTANCE.getSWModel_Isrs(),
isrName, ISR.class)));
-
+
for(final Process proc:processes) {
// fill activity graph
final ActivityGraph ag = ModelUtil.getOrCreateActivityGraph(proc);
- this.con.getRunnablesOfProcess(proc.getName()).forEach(runnableName ->
+ con.getRunnablesOfProcess(proc.getName()).forEach(runnableName ->
AmaltheaModelUtil.getOrAddNewWithContainer(ag,
AmaltheaPackage.eINSTANCE.getIActivityGraphItemContainer_Items(), RunnableCall.class,
AmaltheaPackage.eINSTANCE.getRunnableCall(),
AmaltheaPackage.eINSTANCE.getRunnableCall_Runnable(), Runnable.class,
AmaltheaPackage.eINSTANCE.getRunnable(), runnableName).getKey());
-
+
// connect stimuli
- this.con.getStimuliOfProcess(proc.getName()).forEach(stimulusName ->
+ con.getStimuliOfProcess(proc.getName()).forEach(stimulusName ->
AmaltheaModelUtil.getOrAddNew(proc, AmaltheaPackage.eINSTANCE.getProcess_Stimuli(), stimulusName, Stimulus.class));
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/RunnableConverter.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/RunnableConverter.java
index 0065a84..78066bf 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/RunnableConverter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/RunnableConverter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -40,9 +40,9 @@
import org.eclipse.emf.ecore.util.EcoreUtil;
public class RunnableConverter extends AConverter {
-
+
private static final String rt = "runningTime_";
-
+
private final boolean extractRuntimes;
private final boolean extractLabelAccesses;
private final Frequency frequency;
@@ -52,27 +52,27 @@
super(model, con, "runnables");
this.extractRuntimes = extractRuntimes;
this.extractLabelAccesses = extractLabelAccesses;
- this.frequency = FactoryUtil.createFrequency(frequencyInHz, FrequencyUnit.HZ);
+ frequency = FactoryUtil.createFrequency(frequencyInHz, FrequencyUnit.HZ);
}
@Override
protected void execute() throws SQLException {
- final SWModel swModel = ModelUtil.getOrCreateSwModel(this.model);
- final TimeUnit timeBase = TimeUnit.getByName(this.con.getTimeBase().toLowerCase());
-
+ final SWModel swModel = ModelUtil.getOrCreateSwModel(model);
+ final TimeUnit timeBase = TimeUnit.getByName(con.getTimeBase().toLowerCase());
+
final List<Runnable> runnables = new ArrayList<>();
- this.con.getAllRunnables().forEach(runnableName -> {
+ con.getAllRunnables().forEach(runnableName -> {
final Runnable runnable = AmaltheaModelUtil.getOrAddNew(swModel,
AmaltheaPackage.eINSTANCE.getSWModel_Runnables(), runnableName, Runnable.class);
runnables.add(runnable);
});
-
+
for(final Runnable runnable:runnables) {
final ActivityGraph ag = ModelUtil.getOrCreateActivityGraph(runnable);
// label reads
- if (this.extractLabelAccesses) {
- this.con.getLabelsReadByRunnable(runnable.getName()).forEach(labelName -> {
+ if (extractLabelAccesses) {
+ con.getLabelsReadByRunnable(runnable.getName()).forEach(labelName -> {
final LabelAccess la = AmaltheaModelUtil.getOrAddNewWithContainer(ag,
AmaltheaPackage.eINSTANCE.getIActivityGraphItemContainer_Items(), LabelAccess.class,
AmaltheaPackage.eINSTANCE.getLabelAccess(),
@@ -82,34 +82,34 @@
});
}
// runtimes
- if (this.extractRuntimes && timeBase != null && this.frequency.getValue() >= 1) {
+ if (extractRuntimes && timeBase != null && frequency.getValue() >= 1) {
double runningTimeAvg = -1;
double runningTimeStDev = -1;
try {
- runningTimeAvg = Double.parseDouble(this.con.getValueForMetricAndEntity(runnable.getName(), rt + MetricAggregation.Avg));
- runningTimeStDev = Double.parseDouble(this.con.getValueForMetricAndEntity(runnable.getName(), rt + MetricAggregation.StDev));
+ runningTimeAvg = Double.parseDouble(con.getValueForMetricAndEntity(runnable.getName(), rt + MetricAggregation.Avg));
+ runningTimeStDev = Double.parseDouble(con.getValueForMetricAndEntity(runnable.getName(), rt + MetricAggregation.StDev));
} catch (NumberFormatException e) {
// fail silently
}
try {
- final long runningTimeMin = Long.parseLong(this.con.getValueForMetricAndEntity(runnable.getName(), rt + MetricAggregation.Min));
- final long runningTimeMax = Long.parseLong(this.con.getValueForMetricAndEntity(runnable.getName(), rt + MetricAggregation.Max));
+ final long runningTimeMin = Long.parseLong(con.getValueForMetricAndEntity(runnable.getName(), rt + MetricAggregation.Min));
+ final long runningTimeMax = Long.parseLong(con.getValueForMetricAndEntity(runnable.getName(), rt + MetricAggregation.Max));
final Ticks ticks = AmaltheaFactory.eINSTANCE.createTicks();
IDiscreteValueDeviation dvd;
if (runningTimeMin == runningTimeMax) {
final long constTicks = (long)RuntimeUtil.getTicksForExecutionTimeInSeconds(
- AmaltheaServices.convertToSeconds(runningTimeMin, timeBase), this.frequency);
+ AmaltheaServices.convertToSeconds(runningTimeMin, timeBase), frequency);
dvd = FactoryUtil.createDiscreteValueConstant(constTicks);
} else {
final long ticksMin = (long)RuntimeUtil.getTicksForExecutionTimeInSeconds(
- AmaltheaServices.convertToSeconds(runningTimeMin, timeBase), this.frequency);
+ AmaltheaServices.convertToSeconds(runningTimeMin, timeBase), frequency);
final long ticksMax = (long)RuntimeUtil.getTicksForExecutionTimeInSeconds(
- AmaltheaServices.convertToSeconds(runningTimeMax, timeBase), this.frequency);
+ AmaltheaServices.convertToSeconds(runningTimeMax, timeBase), frequency);
if (runningTimeAvg >= 0 && runningTimeStDev >= 0) {
final double ticksAvg = RuntimeUtil.getTicksForExecutionTimeInSeconds(
- AmaltheaServices.convertToSeconds(runningTimeAvg, timeBase), this.frequency);
+ AmaltheaServices.convertToSeconds(runningTimeAvg, timeBase), frequency);
final double ticksStDev = RuntimeUtil.getTicksForExecutionTimeInSeconds(
- AmaltheaServices.convertToSeconds(runningTimeStDev, timeBase), this.frequency);
+ AmaltheaServices.convertToSeconds(runningTimeStDev, timeBase), frequency);
dvd = FactoryUtil.createDiscreteValueGaussDistribution(ticksAvg, ticksStDev, ticksMin, ticksMax);
} else {
dvd = FactoryUtil.createDiscreteValueBoundaries(ticksMin, ticksMax);
@@ -123,8 +123,8 @@
}
}
// label writes
- if (this.extractLabelAccesses) {
- this.con.getLabelsWrittenByRunnable(runnable.getName()).forEach(labelName -> {
+ if (extractLabelAccesses) {
+ con.getLabelsWrittenByRunnable(runnable.getName()).forEach(labelName -> {
final LabelAccess la = AmaltheaModelUtil.getOrAddNewWithContainer(ag,
AmaltheaPackage.eINSTANCE.getIActivityGraphItemContainer_Items(), LabelAccess.class,
AmaltheaPackage.eINSTANCE.getLabelAccess(),
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/StimulusConverter.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/StimulusConverter.java
index 94b474f..690fbdf 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/StimulusConverter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/StimulusConverter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -31,7 +31,7 @@
import org.eclipse.app4mc.atdb.MetricAggregation;
public class StimulusConverter extends AConverter {
-
+
private static final String a2a = "activateToActivate_";
public StimulusConverter(final Amalthea model, final ATDBConnection con) {
@@ -40,15 +40,15 @@
@Override
protected void execute() throws SQLException {
- final StimuliModel stimuliModel = ModelUtil.getOrCreateStimuliModel(this.model);
- final TimeUnit timeBase = TimeUnit.getByName(this.con.getTimeBase().toLowerCase());
-
+ final StimuliModel stimuliModel = ModelUtil.getOrCreateStimuliModel(model);
+ final TimeUnit timeBase = TimeUnit.getByName(con.getTimeBase().toLowerCase());
+
final List<PeriodicStimulus> stimuli = new ArrayList<>();
- for(final String stimulusName:this.con.getAllStimuli()) {
- if (this.con.getAllInstancesForEntity(stimulusName).size() == 1) {
+ for(final String stimulusName:con.getAllStimuli()) {
+ if (con.getAllInstancesForEntity(stimulusName).size() == 1) {
// only one instance => single stimulus
try {
- final long occurrence = Long.parseLong(this.con.getValueForMetricAndEntity(stimulusName, a2a + MetricAggregation.Min));
+ final long occurrence = Long.parseLong(con.getValueForMetricAndEntity(stimulusName, a2a + MetricAggregation.Min));
final SingleStimulus singStimme = AmaltheaModelUtil.getOrAddNew(stimuliModel,
AmaltheaPackage.eINSTANCE.getStimuliModel_Stimuli(), stimulusName, SingleStimulus.class,
AmaltheaPackage.eINSTANCE.getSingleStimulus());
@@ -65,25 +65,25 @@
stimuli.add(stimulus);
}
}
-
+
for(final PeriodicStimulus stimulus:stimuli) {
double periodAvg = -1;
double periodStDev = -1;
try {
- periodAvg = Double.parseDouble(this.con.getValueForMetricAndEntity(stimulus.getName(), a2a + MetricAggregation.Avg));
- periodStDev = Double.parseDouble(this.con.getValueForMetricAndEntity(stimulus.getName(), a2a + MetricAggregation.StDev));
+ periodAvg = Double.parseDouble(con.getValueForMetricAndEntity(stimulus.getName(), a2a + MetricAggregation.Avg));
+ periodStDev = Double.parseDouble(con.getValueForMetricAndEntity(stimulus.getName(), a2a + MetricAggregation.StDev));
} catch (NumberFormatException e) {
// fail silently
}
try {
- final long periodMin = Long.parseLong(this.con.getValueForMetricAndEntity(stimulus.getName(), a2a + MetricAggregation.Min));
- final long periodMax = Long.parseLong(this.con.getValueForMetricAndEntity(stimulus.getName(), a2a + MetricAggregation.Max));
+ final long periodMin = Long.parseLong(con.getValueForMetricAndEntity(stimulus.getName(), a2a + MetricAggregation.Min));
+ final long periodMax = Long.parseLong(con.getValueForMetricAndEntity(stimulus.getName(), a2a + MetricAggregation.Max));
if (periodMin == periodMax) {
final Time recurrence = FactoryUtil.createTime(periodMin, timeBase).adjustUnit();
stimulus.setRecurrence(recurrence);
} else {
if (periodAvg <= -1) {
- periodAvg = (double)(periodMin + periodMax) / 2d;
+ periodAvg = (periodMin + periodMax) / 2d;
}
final Time avgRecurrence = FactoryUtil.createTime(periodAvg, timeBase).adjustUnit();
stimulus.setRecurrence(avgRecurrence);
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/handler/ATDB2AMXMIImport.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/handler/ATDB2AMXMIImport.java
index 579a711..8adad8f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/handler/ATDB2AMXMIImport.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/handler/ATDB2AMXMIImport.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -43,14 +43,11 @@
.map(c -> c.getProject().getFile(name + ".amxmi"))
.findFirst().orElseThrow(() -> new IllegalArgumentException("Selected *.atdb file is not part of a Eclipse workspace!"));
});
- if (atdbSource.length() == 0) {
+ if ((atdbSource.length() == 0) || (runnableContext == null)) {
return;
}
- if (runnableContext == null) {
- return;
- }
-
+
ImportWizard.importAndOpenInIDE(atdbSource, amxmiTarget, true, true, true, runnableContext);
}
-
+
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/handler/ATDBAndOptionalAMXMIExpression.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/handler/ATDBAndOptionalAMXMIExpression.java
index 31890bf..ec34361 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/handler/ATDBAndOptionalAMXMIExpression.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/handler/ATDBAndOptionalAMXMIExpression.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -26,7 +26,7 @@
import org.eclipse.jface.viewers.IStructuredSelection;
public class ATDBAndOptionalAMXMIExpression {
-
+
@Evaluate
public boolean evaluate(@Optional @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection) {
if (selection != null && selection.size() >= 1 && selection.size() <= 2) {
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/wizard/ImportPage.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/wizard/ImportPage.java
index d6bf39e..f9efb94 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/wizard/ImportPage.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/wizard/ImportPage.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Timing-Architects Embedded Systems GmbH - initial API and implementation
********************************************************************************
@@ -70,11 +70,11 @@
groupLabel.setFont(parent.getFont());
// source name entry field
- this.sourceNameField = new Text(sourceContainerGroup, SWT.READ_ONLY | SWT.BORDER);
+ sourceNameField = new Text(sourceContainerGroup, SWT.READ_ONLY | SWT.BORDER);
final GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- this.sourceNameField.setLayoutData(data);
- this.sourceNameField.setFont(parent.getFont());
+ sourceNameField.setLayoutData(data);
+ sourceNameField.setFont(parent.getFont());
// source browse button
final Button sourceBrowseButton = new Button(sourceContainerGroup, SWT.PUSH);
@@ -89,27 +89,27 @@
sourceBrowseButton.setFont(parent.getFont());
setButtonLayoutData(sourceBrowseButton);
}
-
+
@Override
protected void createDestinationGroup(Composite parent) {
super.createDestinationGroup(parent);
}
-
+
@Override
protected void createOptionsGroupButtons(Group optionsGroup) {
- this.extractLabelsAndAccesses = new Button(optionsGroup, SWT.CHECK);
- this.extractLabelsAndAccesses.setFont(optionsGroup.getFont());
- this.extractLabelsAndAccesses.setText(Messages.ImportPage_optionExtractLabelsAndAccesses);
- this.extractLabelsAndAccesses.setSelection(true);
-
- this.extractRunnableRuntimes = new Button(optionsGroup, SWT.CHECK);
- this.extractRunnableRuntimes.setFont(optionsGroup.getFont());
- this.extractRunnableRuntimes.setText(Messages.ImportPage_optionExtractRunableRuntimes);
- this.extractRunnableRuntimes.setSelection(true);
-
- this.handleExistingGroup = new Composite(optionsGroup, SWT.NONE);
- this.handleExistingGroup.setLayout(new RowLayout(SWT.HORIZONTAL));
- final Button updateExisting = new Button(this.handleExistingGroup, SWT.RADIO);
+ extractLabelsAndAccesses = new Button(optionsGroup, SWT.CHECK);
+ extractLabelsAndAccesses.setFont(optionsGroup.getFont());
+ extractLabelsAndAccesses.setText(Messages.ImportPage_optionExtractLabelsAndAccesses);
+ extractLabelsAndAccesses.setSelection(true);
+
+ extractRunnableRuntimes = new Button(optionsGroup, SWT.CHECK);
+ extractRunnableRuntimes.setFont(optionsGroup.getFont());
+ extractRunnableRuntimes.setText(Messages.ImportPage_optionExtractRunableRuntimes);
+ extractRunnableRuntimes.setSelection(true);
+
+ handleExistingGroup = new Composite(optionsGroup, SWT.NONE);
+ handleExistingGroup.setLayout(new RowLayout(SWT.HORIZONTAL));
+ final Button updateExisting = new Button(handleExistingGroup, SWT.RADIO);
updateExisting.setFont(optionsGroup.getFont());
updateExisting.setText("Update existing");
updateExisting.setSelection(true);
@@ -118,11 +118,11 @@
public void widgetSelected(SelectionEvent e) {
final Button source = (Button) e.getSource();
if (source.getSelection()) {
- ImportPage.this.overwriteExisting = false;
+ overwriteExisting = false;
}
}
});
- final Button overwriteExisting = new Button(this.handleExistingGroup, SWT.RADIO);
+ final Button overwriteExisting = new Button(handleExistingGroup, SWT.RADIO);
overwriteExisting.setFont(optionsGroup.getFont());
overwriteExisting.setText("Overwrite existing");
overwriteExisting.addSelectionListener(new SelectionAdapter() {
@@ -134,7 +134,7 @@
}
}
});
- this.handleExistingGroup.setVisible(false);
+ handleExistingGroup.setVisible(false);
}
@Override
@@ -151,7 +151,7 @@
protected boolean determinePageCompletion() {
boolean result = super.determinePageCompletion();
- final String path = this.sourceNameField.getText();
+ final String path = sourceNameField.getText();
final File file = new File(path);
result &= file.exists();
@@ -164,28 +164,28 @@
fileDialog.setFilterExtensions(new String[] { "*.atdb" }); //$NON-NLS-1$
final String open = fileDialog.open();
if (open != null) {
- this.sourceNameField.setText(open);
+ sourceNameField.setText(open);
updateWidgetEnablements();
}
}
-
+
@Override
protected void updateWidgetEnablements() {
- if (this.handleExistingGroup != null) {
+ if (handleExistingGroup != null) {
final IFile target = getAMXMITarget();
if (target != null && target.exists()) {
- this.handleExistingGroup.setVisible(true);
+ handleExistingGroup.setVisible(true);
} else {
- this.handleExistingGroup.setVisible(false);
+ handleExistingGroup.setVisible(false);
}
}
super.updateWidgetEnablements();
}
String getATDBSource() {
- return this.sourceNameField.getText();
+ return sourceNameField.getText();
}
-
+
IFile getAMXMITarget() {
final String source = getATDBSource();
final IContainer target = getTargetContainer();
@@ -202,17 +202,17 @@
IContainer getTargetContainer() {
return getSpecifiedContainer();
}
-
+
boolean isExtractLabelsAndAccesses() {
- return this.extractLabelsAndAccesses == null || this.extractLabelsAndAccesses.getSelection();
+ return extractLabelsAndAccesses == null || extractLabelsAndAccesses.getSelection();
}
-
+
boolean isExtractRunnableRuntimes() {
- return this.extractRunnableRuntimes == null || this.extractRunnableRuntimes.getSelection();
+ return extractRunnableRuntimes == null || extractRunnableRuntimes.getSelection();
}
-
+
boolean isOverwriteExisting() {
- return this.overwriteExisting;
+ return overwriteExisting;
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/wizard/ImportWizard.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/wizard/ImportWizard.java
index 5351c92..6f32568 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/wizard/ImportWizard.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/wizard/ImportWizard.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Timing-Architects Embedded Systems GmbH - initial API and implementation
********************************************************************************
@@ -23,6 +23,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.operation.IRunnableContext;
@@ -47,8 +48,8 @@
@Override
public void addPages() {
super.addPages();
- this.mainPage = new ImportPage(this.selection);
- addPage(this.mainPage);
+ mainPage = new ImportPage(selection);
+ addPage(mainPage);
}
@Override
@@ -66,14 +67,14 @@
@Override
public boolean performFinish() {
- final String atdbSource = this.mainPage.getATDBSource();
- final IFile amxmiTarget = this.mainPage.getAMXMITarget();
- final boolean extractLabelsAndAccesses = this.mainPage.isExtractLabelsAndAccesses();
- final boolean extractRunnableRuntimes = this.mainPage.isExtractRunnableRuntimes();
- final boolean overwriteExisting = this.mainPage.isOverwriteExisting();
+ final String atdbSource = mainPage.getATDBSource();
+ final IFile amxmiTarget = mainPage.getAMXMITarget();
+ final boolean extractLabelsAndAccesses = mainPage.isExtractLabelsAndAccesses();
+ final boolean extractRunnableRuntimes = mainPage.isExtractRunnableRuntimes();
+ final boolean overwriteExisting = mainPage.isOverwriteExisting();
return importAndOpenInIDE(atdbSource, amxmiTarget, extractLabelsAndAccesses, extractRunnableRuntimes, overwriteExisting, getContainer());
}
-
+
public static boolean importAndOpenInIDE(final String atdbSource, final IFile amxmiTarget,
final boolean extractLabelsAndAccesses, final boolean extractRunnableRuntimes, final boolean overwriteExisting,
final IRunnableContext runnableContext) {
@@ -90,11 +91,11 @@
progressMonitor.done();
}
};
-
+
try {
runnableContext.run(true, true, operation);
} catch (InvocationTargetException e1) {
- Platform.getLog(ATDB2AMXMIImport.class).log(new Status(Status.ERROR,
+ Platform.getLog(ATDB2AMXMIImport.class).log(new Status(IStatus.ERROR,
FrameworkUtil.getBundle(ATDB2AMXMIImport.class).getSymbolicName(), e1.getLocalizedMessage(), e1));
return false;
} catch (InterruptedException e2) {
@@ -108,7 +109,7 @@
IDE.openEditor(page, amxmiTarget);
}
catch (final PartInitException e) {
- Platform.getLog(ATDB2AMXMIImport.class).log(new Status(Status.ERROR,
+ Platform.getLog(ATDB2AMXMIImport.class).log(new Status(IStatus.ERROR,
FrameworkUtil.getBundle(ATDB2AMXMIImport.class).getSymbolicName(), e.getLocalizedMessage(), e));
return false;
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/wizard/Messages.java b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/wizard/Messages.java
index f699037..61dceb3 100644
--- a/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/wizard/Messages.java
+++ b/plugins/org.eclipse.app4mc.amalthea.import.atdb/src/org/eclipse/app4mc/amalthea/_import/atdb/wizard/Messages.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedCommonElementsIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedCommonElementsIP.java
index e48b8a4..71fe57e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedCommonElementsIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedCommonElementsIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
********************************************************************************
*/
@@ -92,7 +92,7 @@
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
-
+
for (EStructuralFeature feature : super.getChildrenFeatures(object)) {
if (isValidValue(object, child, feature)) {
return feature;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedComponentsModelIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedComponentsModelIP.java
index da7389b..5f53bb1 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedComponentsModelIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedComponentsModelIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
********************************************************************************
*/
@@ -82,7 +82,7 @@
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
-
+
for (EStructuralFeature feature : super.getChildrenFeatures(object)) {
if (isValidValue(object, child, feature)) {
return feature;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedHWModelIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedHWModelIP.java
index 2d7259e..7d630f7 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedHWModelIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedHWModelIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
********************************************************************************
*/
@@ -82,7 +82,7 @@
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
-
+
for (EStructuralFeature feature : super.getChildrenFeatures(object)) {
if (isValidValue(object, child, feature)) {
return feature;
@@ -106,7 +106,7 @@
public Collection<?> getChildren(final Object object) {
final List<Object> children = new ArrayList<>(super.getChildren(object));
final HWModel hwModel = (HWModel) object;
-
+
// only display virtual folders if not empty (on top of the list)
if (!hwModel.getFeatureCategories().isEmpty())
children.add(0, getHwFeaturesContainerIP(hwModel));
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedOSModelIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedOSModelIP.java
index 29064b7..24a9c5e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedOSModelIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedOSModelIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
********************************************************************************
*/
@@ -75,7 +75,7 @@
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
-
+
for (EStructuralFeature feature : super.getChildrenFeatures(object)) {
if (isValidValue(object, child, feature)) {
return feature;
@@ -99,7 +99,7 @@
public Collection<?> getChildren(final Object object) {
final List<Object> children = new ArrayList<>(super.getChildren(object));
final OSModel osModel = (OSModel) object;
-
+
// only display virtual folders if not empty (on top of the list)
if (!osModel.getSemaphores().isEmpty())
children.add(0, getOsSemaphoresContainerIP(osModel));
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedSWModelIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedSWModelIP.java
index fb2f25e..7585f30 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedSWModelIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/ExtendedSWModelIP.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* itemis AG, Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -171,7 +171,7 @@
}
return this.activationsCIP;
}
-
+
public TypeDefinitionsContainerIP getTypeDefinitionsContainerIP(final SWModel swModel) {
if (this.typesCIP == null) {
this.typesCIP = new TypeDefinitionsContainerIP(this.adapterFactory, swModel);
@@ -195,7 +195,7 @@
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
-
+
for (EStructuralFeature feature : super.getChildrenFeatures(object)) {
if (isValidValue(object, child, feature)) {
return feature;
@@ -219,7 +219,7 @@
public Collection<?> getChildren(final Object object) {
final List<Object> children = new ArrayList<>(super.getChildren(object));
final SWModel swModel = (SWModel) object;
-
+
// only display virtual folders if not empty
if (!swModel.getRunnables().isEmpty())
children.add(getRunnablesContainerIP(swModel));
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/CoreClassifiersContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/CoreClassifiersContainerIP.java
index 58b5d64..8e2302f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/CoreClassifiersContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/CoreClassifiersContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Core Classifiers ("); //$NON-NLS-1$
buffer.append(((CommonElements) getTarget()).getCoreClassifiers().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/MemoryClassifiersContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/MemoryClassifiersContainerIP.java
index aa47fa9..6e46318 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/MemoryClassifiersContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/MemoryClassifiersContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Memory Classifiers ("); //$NON-NLS-1$
buffer.append(((CommonElements) getTarget()).getMemoryClassifiers().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/NamespacesContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/NamespacesContainerIP.java
index 7693c06..0b36ca2 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/NamespacesContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/NamespacesContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/TagsContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/TagsContainerIP.java
index a055082..63d4de6 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/TagsContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/container/TagsContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Tags ("); //$NON-NLS-1$
buffer.append(((CommonElements) getTarget()).getTags().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedCoreClassifierIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedCoreClassifierIP.java
index 5187d8b..8e90599 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedCoreClassifierIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedCoreClassifierIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedMemoryClassifierIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedMemoryClassifierIP.java
index 0171d0a..1ecf741 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedMemoryClassifierIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedMemoryClassifierIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedNamespaceIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedNamespaceIP.java
index 9d72260..1f004b1 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedNamespaceIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedNamespaceIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -30,13 +30,13 @@
@Override
public Object getParent(final Object object) {
final Object parent = super.getParent(object);
-
+
if (parent instanceof CommonElements) {
final ExtendedCommonElementsIP parentItemProvider = (ExtendedCommonElementsIP) this.adapterFactory
.adapt(parent, ITreeItemContentProvider.class);
return parentItemProvider != null ? parentItemProvider.getNamespacesContainerIP((CommonElements) parent) : null;
}
-
+
return parent;
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedTagIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedTagIP.java
index 20c753c..f525d9f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedTagIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/common/extended/ExtendedTagIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompConnectorContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompConnectorContainerIP.java
index 9c15653..b9bff3a 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompConnectorContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompConnectorContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompDefinitionContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompDefinitionContainerIP.java
index 72e8c09..230812c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompDefinitionContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompDefinitionContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompInstanceContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompInstanceContainerIP.java
index 98412b5..30c7a5c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompInstanceContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompInstanceContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
********************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompInterfaceContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompInterfaceContainerIP.java
index a6b2354..1c3d616 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompInterfaceContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompInterfaceContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompStructureContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompStructureContainerIP.java
index 9038517..352d981 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompStructureContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/container/CompStructureContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedComponentIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedComponentIP.java
index 0400334..6478b1e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedComponentIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedComponentIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedComponentInstanceIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedComponentInstanceIP.java
index 1b209eb..db049b6 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedComponentInstanceIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedComponentInstanceIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedComponentStructureIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedComponentStructureIP.java
index f1cf045..6509ffd 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedComponentStructureIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedComponentStructureIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedCompositeIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedCompositeIP.java
index ef3e40d..f4ee0ba 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedCompositeIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedCompositeIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -65,7 +65,7 @@
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
-
+
for (EStructuralFeature feature : super.getChildrenFeatures(object)) {
if (isValidValue(object, child, feature)) {
return feature;
@@ -90,7 +90,7 @@
public Collection<?> getChildren(final Object object) {
final List<Object> children = new ArrayList<>(super.getChildren(object));
Composite composite = (Composite) object;
-
+
// only display virtual folders if not empty (on top of the list)
if (!composite.getComponentInstances().isEmpty())
children.add(0, getCompInstanceContainerIP(composite));
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedConnectorIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedConnectorIP.java
index a16c5af..1fcd75b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedConnectorIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedConnectorIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedMainInterfaceIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedMainInterfaceIP.java
index 8bc5aeb..9d5910b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedMainInterfaceIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedMainInterfaceIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedSystemIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedSystemIP.java
index 4fdcdef..1a9a47a 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedSystemIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/comp/extended/ExtendedSystemIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -61,7 +61,7 @@
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
-
+
for (EStructuralFeature feature : super.getChildrenFeatures(object)) {
if (isValidValue(object, child, feature)) {
return feature;
@@ -86,7 +86,7 @@
public Collection<?> getChildren(final Object object) {
final List<Object> children = new ArrayList<>(super.getChildren(object));
ISystem composite = (ISystem) object;
-
+
// only display virtual folders if not empty (on top of the list)
if (!composite.getComponentInstances().isEmpty())
children.add(0, getCompInstanceContainerIP(composite));
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwConnectionContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwConnectionContainerIP.java
index 6d46f7c..d6792bd 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwConnectionContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwConnectionContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwDefinitionContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwDefinitionContainerIP.java
index 860e973..f2ee6e6 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwDefinitionContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwDefinitionContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwDomainContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwDomainContainerIP.java
index d9f4cb3..3c5f7d9 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwDomainContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwDomainContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Domains ("); //$NON-NLS-1$
buffer.append(((HWModel) getTarget()).getDomains().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwFeatureContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwFeatureContainerIP.java
index 234b40f..b592a94 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwFeatureContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwFeatureContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwModuleContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwModuleContainerIP.java
index 00b51e8..cf9dc04 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwModuleContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/container/HwModuleContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Modules ("); //$NON-NLS-1$
buffer.append(((HwStructure) getTarget()).getModules().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedCacheDefinitionIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedCacheDefinitionIP.java
index 43aab5d..92754b5 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedCacheDefinitionIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedCacheDefinitionIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedCacheIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedCacheIP.java
index d495cc6..766fc9c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedCacheIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedCacheIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedConnectionHandlerDefinitionIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedConnectionHandlerDefinitionIP.java
index a32680c..f6dcc52 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedConnectionHandlerDefinitionIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedConnectionHandlerDefinitionIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedConnectionHandlerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedConnectionHandlerIP.java
index 24ed71a..f65aec1 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedConnectionHandlerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedConnectionHandlerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedFrequencyDomainIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedFrequencyDomainIP.java
index c7ae484..c0fa000 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedFrequencyDomainIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedFrequencyDomainIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedHwConnectionIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedHwConnectionIP.java
index f4c6284..aa5a752 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedHwConnectionIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedHwConnectionIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedHwFeatureCategoryIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedHwFeatureCategoryIP.java
index 9574a0a..3e6288c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedHwFeatureCategoryIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedHwFeatureCategoryIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedHwStructureIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedHwStructureIP.java
index 414c17b..5020c0c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedHwStructureIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedHwStructureIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -62,7 +62,7 @@
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
-
+
for (EStructuralFeature feature : super.getChildrenFeatures(object)) {
if (isValidValue(object, child, feature)) {
return feature;
@@ -87,7 +87,7 @@
public Collection<?> getChildren(final Object object) {
final List<Object> children = new ArrayList<>(super.getChildren(object));
HwStructure hwStruct = (HwStructure) object;
-
+
// only display virtual folders if not empty (on top of the list)
if (!hwStruct.getModules().isEmpty())
children.add(0, getModulesContainerIP(hwStruct));
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedMemoryDefinitionIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedMemoryDefinitionIP.java
index eb33000..f8ca0b1 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedMemoryDefinitionIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedMemoryDefinitionIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedMemoryIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedMemoryIP.java
index fc95ad1..97353fd 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedMemoryIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedMemoryIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedPowerDomainIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedPowerDomainIP.java
index 9fb39b6..44fe841 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedPowerDomainIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedPowerDomainIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedProcessingUnitDefinitionIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedProcessingUnitDefinitionIP.java
index 7d19063..20a5519 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedProcessingUnitDefinitionIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedProcessingUnitDefinitionIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedProcessingUnitIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedProcessingUnitIP.java
index 98fbf7a..03d8a9a 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedProcessingUnitIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/hw/extended/ExtendedProcessingUnitIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/OsDefinitionContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/OsDefinitionContainerIP.java
index 28b6faf..3380904 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/OsDefinitionContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/OsDefinitionContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -125,7 +125,7 @@
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
-
+
for (EStructuralFeature feature : super.getChildrenFeatures(object)) {
if (isValidValue(object, child, feature)) {
return feature;
@@ -149,7 +149,7 @@
public Collection<?> getChildren(final Object object) {
final List<Object> children = new ArrayList<>(super.getChildren(object));
final OSModel osModel = (OSModel) getTarget(); // class is transient item providers
-
+
// only display virtual folders if not empty (on top of the list)
if (!osModel.getOsOverheads().isEmpty())
children.add(0, getOsOverheadsContainerIP(osModel));
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/OsOverheadContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/OsOverheadContainerIP.java
index 0d61011..8e28d5b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/OsOverheadContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/OsOverheadContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/OsSemaphoreContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/OsSemaphoreContainerIP.java
index 12f8647..106c891 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/OsSemaphoreContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/OsSemaphoreContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/SchedulerDefinitionContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/SchedulerDefinitionContainerIP.java
index 08c268e..6683a7c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/SchedulerDefinitionContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/SchedulerDefinitionContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/SchedulingParameterDefinitionContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/SchedulingParameterDefinitionContainerIP.java
index f330817..4bf9fb3 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/SchedulingParameterDefinitionContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/container/SchedulingParameterDefinitionContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedOsOverheadIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedOsOverheadIP.java
index 4146a92..8203c6f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedOsOverheadIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedOsOverheadIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedSchedulerDefinitionIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedSchedulerDefinitionIP.java
index 136c25c..f6a4579 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedSchedulerDefinitionIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedSchedulerDefinitionIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedSchedulingParameterDefinitionIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedSchedulingParameterDefinitionIP.java
index 3ec21a4..b202162 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedSchedulingParameterDefinitionIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedSchedulingParameterDefinitionIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedSemaphoreIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedSemaphoreIP.java
index a334266..3e961d9 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedSemaphoreIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/os/extended/ExtendedSemaphoreIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ActivationsContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ActivationsContainerIP.java
index 3ba639c..852ffe6 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ActivationsContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ActivationsContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Activations ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getActivations().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/CallArgumentsContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/CallArgumentsContainerIP.java
index cc1768d..65ab508 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/CallArgumentsContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/CallArgumentsContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2018-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ChannelsContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ChannelsContainerIP.java
index 3b995b3..65824ff 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ChannelsContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ChannelsContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Channels ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getChannels().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/CustomEntitiesContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/CustomEntitiesContainerIP.java
index 3bf5fbb..582437e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/CustomEntitiesContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/CustomEntitiesContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Custom Entities ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getCustomEntities().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/EventsContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/EventsContainerIP.java
index 9e04be7..792c7f7 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/EventsContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/EventsContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("OS Events ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getEvents().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ISRsContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ISRsContainerIP.java
index 91ad4fe..320067b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ISRsContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ISRsContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("ISRs ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getIsrs().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/LabelsContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/LabelsContainerIP.java
index 9180fbb..6e54bcb 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/LabelsContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/LabelsContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Labels ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getLabels().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ModeLabelsContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ModeLabelsContainerIP.java
index ea145ec..22823da 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ModeLabelsContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ModeLabelsContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("ModeLabels ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getModeLabels().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ModesContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ModesContainerIP.java
index 963f018..ca1cfd7 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ModesContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ModesContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Modes ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getModes().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ProcessChainsContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ProcessChainsContainerIP.java
index 7d70db3..b08f71d 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ProcessChainsContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ProcessChainsContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Process Chains ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getProcessChains().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ProcessPrototypesContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ProcessPrototypesContainerIP.java
index 43a0ca5..79cd082 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ProcessPrototypesContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/ProcessPrototypesContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Process Prototypes ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getProcessPrototypes().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/RunnableParametersContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/RunnableParametersContainerIP.java
index 6042207..d30196c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/RunnableParametersContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/RunnableParametersContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2018-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/RunnablesContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/RunnablesContainerIP.java
index 7267b8e..a1cf4e1 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/RunnablesContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/RunnablesContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Runnables ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getRunnables().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/SectionsContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/SectionsContainerIP.java
index 14c62d1..fcaaefa 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/SectionsContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/SectionsContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Sections ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getSections().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/TasksContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/TasksContainerIP.java
index 41be043..92e99ac 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/TasksContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/TasksContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Tasks ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getTasks().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/TypeDefinitionsContainerIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/TypeDefinitionsContainerIP.java
index 552a1bf..56e5f8e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/TypeDefinitionsContainerIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/container/TypeDefinitionsContainerIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -40,7 +40,7 @@
buffer.append("Type Definitions ("); //$NON-NLS-1$
buffer.append(((SWModel) getTarget()).getTypeDefinitions().size());
buffer.append(")"); //$NON-NLS-1$
-
+
return buffer.toString();
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedBaseTypeDefinitionIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedBaseTypeDefinitionIP.java
index 7f37e0f..88a97a3 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedBaseTypeDefinitionIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedBaseTypeDefinitionIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedChannelIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedChannelIP.java
index c4c85a9..74de67f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedChannelIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedChannelIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedCustomActivationIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedCustomActivationIP.java
index 2138bf1..62a33a5 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedCustomActivationIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedCustomActivationIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedCustomEntityIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedCustomEntityIP.java
index f72af9a..7b7bab7 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedCustomEntityIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedCustomEntityIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedDataTypeDefinitionIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedDataTypeDefinitionIP.java
index d374918..c53c154 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedDataTypeDefinitionIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedDataTypeDefinitionIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedEnumModeIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedEnumModeIP.java
index 2546ebe..af041b8 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedEnumModeIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedEnumModeIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedEventActivationIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedEventActivationIP.java
index 28f8cd8..7f3c0ea 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedEventActivationIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedEventActivationIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedISRIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedISRIP.java
index 3ec30b3..bbb4be5 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedISRIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedISRIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedLabelIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedLabelIP.java
index 3025dcb..2b28a4b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedLabelIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedLabelIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedModeLabelIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedModeLabelIP.java
index 7a72683..8401d8a 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedModeLabelIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedModeLabelIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedNumericModeIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedNumericModeIP.java
index 3c64918..0001147 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedNumericModeIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedNumericModeIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedOsEventIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedOsEventIP.java
index 230c08e..c81d348 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedOsEventIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedOsEventIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedPeriodicActivationIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedPeriodicActivationIP.java
index d2b05a0..3ca3d78 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedPeriodicActivationIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedPeriodicActivationIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedProcessChainIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedProcessChainIP.java
index 2771706..8a51964 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedProcessChainIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedProcessChainIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedProcessPrototypeIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedProcessPrototypeIP.java
index af66c43..7dfa9e7 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedProcessPrototypeIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedProcessPrototypeIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedRunnableIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedRunnableIP.java
index 926c91f..d0132ed 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedRunnableIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedRunnableIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
@@ -60,7 +60,7 @@
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
-
+
for (EStructuralFeature feature : super.getChildrenFeatures(object)) {
if (isValidValue(object, child, feature)) {
return feature;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedRunnableParameterIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedRunnableParameterIP.java
index c7c3f72..1a45077 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedRunnableParameterIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedRunnableParameterIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedSectionIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedSectionIP.java
index d5ef7db..9b09bf0 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedSectionIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedSectionIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedSingleActivationIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedSingleActivationIP.java
index a4be6c5..9767658 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedSingleActivationIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedSingleActivationIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedSporadicActivationIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedSporadicActivationIP.java
index 8fc56bc..95b8128 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedSporadicActivationIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedSporadicActivationIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedTaskIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedTaskIP.java
index cc49683..1020fda 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedTaskIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedTaskIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedVariableRateActivationIP.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedVariableRateActivationIP.java
index c673a72..4387df7 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedVariableRateActivationIP.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/edit/sw/extended/ExtendedVariableRateActivationIP.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/provider/ExtendedAmaltheaEditPlugin.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/provider/ExtendedAmaltheaEditPlugin.java
index 7d48c05..48b24e1 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/provider/ExtendedAmaltheaEditPlugin.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/provider/ExtendedAmaltheaEditPlugin.java
@@ -1,11 +1,11 @@
/**
* *******************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
*
* Generated using Eclipse EMF
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/provider/ExtendedAmaltheaItemProviderAdapterFactory.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/provider/ExtendedAmaltheaItemProviderAdapterFactory.java
index 0a0e9ca..e8491ed 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/provider/ExtendedAmaltheaItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/provider/ExtendedAmaltheaItemProviderAdapterFactory.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 itemis AG and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* itemis AG, Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -250,7 +250,7 @@
public Adapter createPeriodicActivationAdapter() {
return new ExtendedPeriodicActivationIP(this);
}
-
+
@Override
public Adapter createSingleActivationAdapter() {
return new ExtendedSingleActivationIP(this);
@@ -344,7 +344,7 @@
public Adapter createComponentsModelAdapter() {
return new ExtendedComponentsModelIP(this);
}
-
+
// ComponentsModel Definitions
@Override
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/provider/TransientItemProvider.java b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/provider/TransientItemProvider.java
index cfea73a..7fa88da 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/provider/TransientItemProvider.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit.extended/src/org/eclipse/app4mc/amalthea/model/provider/TransientItemProvider.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* See4sys - initial API and implementation (Sphinx)
* itemis AG - adaptation to Amalthea
@@ -100,7 +100,7 @@
* Overridden to ensure statefulness of transient item provider adapters wrt
* their target object, i.e., to avoid that the same transient item provider
* instance is used for multiple target objects.
- *
+ *
* @see
* org.eclipse.emf.edit.provider.ItemProviderAdapter#setTarget(org.eclipse.emf.
* common.notify.Notifier)
@@ -121,14 +121,14 @@
* adapter factories that support the creation and retrieval transient item
* provider instances by calling AdapterFactory#adapt(object,
* TransientItemProviderSubClass.class)
- *
+ *
* @see
* org.eclipse.emf.edit.provider.ItemProviderAdapter#isAdapterForType(java.lang.
* Object)
- *
+ *
* @see org.eclipse.emf.ecore.util.EcoreUtil#getExistingAdapter(Notifier,
* Object)
- *
+ *
* @see
* org.eclipse.sphinx.emf.edit.TransientItemProvider.AdapterFactoryHelper.adapt(
* Object, Object, AdapterFactory)
@@ -179,7 +179,7 @@
* in order to (1) retrieve the store for the children of the given object (and
* thereby retrieve it in the same way as in #updateChildren(Notification)) and
* (2) obtain the values of the children features.
- *
+ *
* @see org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren(java.lang.
* Object)
*/
@@ -227,7 +227,7 @@
* rather than given object (which would be the transient item provider itself)
* as key for the store for the children of the given object (and thereby match
* the way it is retrieved in #updateChildren(Notification)).
- *
+ *
* @see
* org.eclipse.emf.edit.provider.ItemProviderAdapter#createChildrenStore(java.
* lang.Object)
@@ -238,7 +238,7 @@
if (isWrappingNeeded(object)) {
if (childrenStoreMap == null) {
- childrenStoreMap = new HashMap<Object, ChildrenStore>();
+ childrenStoreMap = new HashMap<>();
}
store = new ChildrenStore(getChildrenFeatures(object));
childrenStoreMap.put(target, store);
@@ -318,7 +318,7 @@
* This is required to make sure that the latter get represented by instances of
* org.eclipse.emf.edit.provider.DelegatingWrapperItemProvider and may have a
* parent element that is different from object containing them.
- *
+ *
* @see
* org.eclipse.emf.edit.provider.ItemProviderAdapter#isWrappingNeeded(java.lang.
* Object)
@@ -416,7 +416,7 @@
* Overridden to support the case where specified owner via CommandParameter
* (commandParameter.getEOwner()) is no EObject. In this case, try to refer to
* parent or owner of specified owner.
- *
+ *
* @see org.eclipse.emf.edit.provider.ItemProviderAdapter#factorAddCommand(org.
* eclipse.emf.edit.domain.EditingDomain,
* org.eclipse.emf.edit.command.CommandParameter)
@@ -559,7 +559,7 @@
* different features and (2) specified owner via CommandParameter
* (commandParameter.getEOwner()) is no EObject. In this case, try to refer to
* parent or owner of specified owner.
- *
+ *
* @see
* org.eclipse.emf.edit.provider.ItemProviderAdapter#factorRemoveCommand(org.
* eclipse.emf.edit.domain.EditingDomain,
@@ -678,7 +678,7 @@
// container, or the same
// container but different features we must to iterate over all container
// features
- for (Object object : new ArrayList<Object>(list)) {
+ for (Object object : new ArrayList<>(list)) {
if (object instanceof EObject) {
final EObject fallBackOwner = ((EObject) object).eContainer();
EStructuralFeature containingFeature = ((EObject) object).eContainingFeature();
@@ -792,11 +792,11 @@
for (EStructuralFeature feature : myFeatures()) {
if (dropTarget != null && new AddCommand(domain, dropTarget, feature, collection).canExecute()) {
- return super.createDragAndDropCommand(domain, dropTarget, location, operations, operation, collection);
+ return super.createDragAndDropCommand(domain, dropTarget, location, operations, operation, collection);
}
}
- return UnexecutableCommand.INSTANCE;
+ return UnexecutableCommand.INSTANCE;
}
protected AmaltheaPackage myPackage() {
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit/src/org/eclipse/app4mc/amalthea/model/provider/AmaltheaItemProviderAdapter.java b/plugins/org.eclipse.app4mc.amalthea.model.edit/src/org/eclipse/app4mc/amalthea/model/provider/AmaltheaItemProviderAdapter.java
index d2a09ad..85218e5 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit/src/org/eclipse/app4mc/amalthea/model/provider/AmaltheaItemProviderAdapter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit/src/org/eclipse/app4mc/amalthea/model/provider/AmaltheaItemProviderAdapter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.edit/src/org/eclipse/app4mc/amalthea/model/provider/EcoreGenericsHelper.java b/plugins/org.eclipse.app4mc.amalthea.model.edit/src/org/eclipse/app4mc/amalthea/model/provider/EcoreGenericsHelper.java
index cbbf1dd..f0ba77a 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.edit/src/org/eclipse/app4mc/amalthea/model/provider/EcoreGenericsHelper.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.edit/src/org/eclipse/app4mc/amalthea/model/provider/EcoreGenericsHelper.java
@@ -1,11 +1,11 @@
/**
********************************************************************************
* Copyright (c) 2013 Timing-Architects Embedded Systems GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/AbstractSchedulerDefinitionCreationService.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/AbstractSchedulerDefinitionCreationService.java
index a980806..e62619b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/AbstractSchedulerDefinitionCreationService.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/AbstractSchedulerDefinitionCreationService.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
@@ -33,7 +33,7 @@
public EStructuralFeature modelFeature() {
return AmaltheaPackage.eINSTANCE.getOSModel_SchedulerDefinitions();
}
-
+
public void doCreate(OSModel osModel, Algorithm algorithm, String label) {
if (osModel == null)
return;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerConstantBandwidthServer.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerConstantBandwidthServer.java
index 4278fdf..e29d4cc 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerConstantBandwidthServer.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerConstantBandwidthServer.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerConstantBandwidthServerWithCapacitySharing.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerConstantBandwidthServerWithCapacitySharing.java
index 1bc96e5..7ce3201 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerConstantBandwidthServerWithCapacitySharing.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerConstantBandwidthServerWithCapacitySharing.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionDeferrableServer.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionDeferrableServer.java
index aef5868..220e1b2 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionDeferrableServer.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionDeferrableServer.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionEarliestDeadlineFirst.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionEarliestDeadlineFirst.java
index 9a04988..6a6daaa 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionEarliestDeadlineFirst.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionEarliestDeadlineFirst.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionEarlyReleaseFairPD2.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionEarlyReleaseFairPD2.java
index 2311381..a10207f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionEarlyReleaseFairPD2.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionEarlyReleaseFairPD2.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionFixedPriorityPreemptive.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionFixedPriorityPreemptive.java
index f3fdd08..77a1dee 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionFixedPriorityPreemptive.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionFixedPriorityPreemptive.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionOSEK.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionOSEK.java
index f862734..6f97302 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionOSEK.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionOSEK.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPFairPD2.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPFairPD2.java
index 24cd9c0..e2cc585 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPFairPD2.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPFairPD2.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPartlyEarlyReleaseFairPD2.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPartlyEarlyReleaseFairPD2.java
index a950f5a..e84f0d8 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPartlyEarlyReleaseFairPD2.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPartlyEarlyReleaseFairPD2.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPartlyPFairPD2.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPartlyPFairPD2.java
index 45892e0..8aa90d2 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPartlyPFairPD2.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPartlyPFairPD2.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPollingServer.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPollingServer.java
index 2ddacb9..978c863 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPollingServer.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPollingServer.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPriorityBased.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPriorityBased.java
index 5d1bc62..0159ed5 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPriorityBased.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPriorityBased.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPriorityBasedRoundRobin.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPriorityBasedRoundRobin.java
index 5327197..4283905 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPriorityBasedRoundRobin.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionPriorityBasedRoundRobin.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionSporadicServer.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionSporadicServer.java
index 8246389..01b569e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionSporadicServer.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/creation/SchedulerDefinitionSporadicServer.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.creation;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/processing/AddModificationTimestamp.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/processing/AddModificationTimestamp.java
index a4a7ce0..37ee0ef 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/processing/AddModificationTimestamp.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/processing/AddModificationTimestamp.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.processing;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/processing/CleanupDataSize.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/processing/CleanupDataSize.java
index 352873e..8a65883 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/processing/CleanupDataSize.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/processing/CleanupDataSize.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.processing;
@@ -38,11 +38,11 @@
@PostConstruct
public String cleanup(Amalthea model) {
Set<DataSize> toDelete = new HashSet<>();
-
+
TreeIterator<EObject> iterator = EcoreUtil.getAllContents(model, false);
while (iterator.hasNext()) {
EObject next = iterator.next();
-
+
if (next instanceof DataSize) {
DataSize size = (DataSize) next;
if (size.getValue().signum() < 1 || size.getUnit() == DataSizeUnit._UNDEFINED_) {
@@ -50,9 +50,9 @@
}
}
}
-
+
EcoreUtil.removeAll(toDelete);
-
+
return "Deleted " + toDelete.size() + " invalid DataSize objects.";
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/processing/CleanupTicks.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/processing/CleanupTicks.java
index da8a0b7..54e9bd9 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/processing/CleanupTicks.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution.standard/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/processing/CleanupTicks.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service.processing;
@@ -37,11 +37,11 @@
@PostConstruct
public String cleanup(Amalthea model) {
Set<Ticks> toDelete = new HashSet<>();
-
+
TreeIterator<EObject> iterator = EcoreUtil.getAllContents(model, false);
while (iterator.hasNext()) {
EObject next = iterator.next();
-
+
if (next instanceof Ticks) {
Ticks ticks = (Ticks) next;
if (ticks.getDefault() == null && ticks.getExtended().isEmpty()) {
@@ -49,9 +49,9 @@
}
}
}
-
+
EcoreUtil.removeAll(toDelete);
-
+
return "Deleted " + toDelete.size() + " empty Ticks objects.";
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/handler/CreateModelStructureHandler.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/handler/CreateModelStructureHandler.java
index 8bd7bae..2a2f949 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/handler/CreateModelStructureHandler.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/handler/CreateModelStructureHandler.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.handler;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/handler/ProcessModelStructureHandler.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/handler/ProcessModelStructureHandler.java
index 2925e49..39fae7e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/handler/ProcessModelStructureHandler.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/handler/ProcessModelStructureHandler.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.handler;
@@ -47,15 +47,15 @@
@Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection,
@Service ProcessingServiceRegistry registry,
IEclipseContext context) {
-
+
RegistryServiceWrapper<ProcessingService> processor = registry.getService(modelType, creatorId);
if (selection.getFirstElement() instanceof EObject && processor != null) {
EObject object = (EObject) selection.getFirstElement();
-
+
EObject rootContainer = EcoreUtil.getRootContainer(object);
-
+
// Use ChangeCommand and CommandStack to execute changes
-
+
EditingDomain editingDomain = AdapterFactoryEditingDomain.getEditingDomainFor(rootContainer);
ChangeCommandWithStatusResult command = new ChangeCommandWithStatusResult(
new ChangeRecorder(), rootContainer, context,
@@ -63,29 +63,29 @@
String[] split = processor.getName().split("\\|");
command.setLabel(split[split.length-1].trim());
-
+
editingDomain.getCommandStack().execute(command);
-
+
// Display result
if (command.status != null) {
MessageDialog.openInformation(shell, "AMALTHEA Model Processing", command.status.toString());
}
}
}
-
+
private class ChangeCommandWithStatusResult extends ChangeCommand {
-
+
IEclipseContext context;
String modelType;
RegistryServiceWrapper<ProcessingService> processor;
EObject object;
-
+
Object status;
-
+
public ChangeCommandWithStatusResult(
ChangeRecorder changeRecorder, Notifier notifier, IEclipseContext context,
String modelType, RegistryServiceWrapper<ProcessingService> processor, EObject object) {
-
+
super(changeRecorder, notifier);
this.context = context;
this.modelType = modelType;
@@ -98,7 +98,7 @@
// *** execute specific processing actions here ***
IEclipseContext activeContext = context.createChild(modelType + " ProcessingModelStructure");
activeContext.set(processor.getType(), object);
-
+
try {
this.status = ContextInjectionFactory.invoke(processor.getServiceInstance(), PostConstruct.class, activeContext);
} finally {
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/AmaltheaModelElementExpression.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/AmaltheaModelElementExpression.java
index 5140025..e1e1deb 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/AmaltheaModelElementExpression.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/AmaltheaModelElementExpression.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.menu;
@@ -31,7 +31,7 @@
* </ul>
*/
public class AmaltheaModelElementExpression {
-
+
public boolean evaluate(@Optional @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection) {
return (selection != null && selection.size() == 1
&& (selection.getFirstElement() instanceof EObject && ((EObject)selection.getFirstElement()).eClass().getEPackage().equals(AmaltheaPackage.eINSTANCE)
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/CreateModelMenuContribution.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/CreateModelMenuContribution.java
index 8153a9c..fd2e6f8 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/CreateModelMenuContribution.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/CreateModelMenuContribution.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.menu;
@@ -36,10 +36,10 @@
@SuppressWarnings("restriction")
public class CreateModelMenuContribution {
-
+
@AboutToShow
public void aboutToShow(
- List<MMenuElement> items,
+ List<MMenuElement> items,
EModelService modelService,
MApplication app,
@Service CreationServiceRegistry registry,
@@ -57,8 +57,8 @@
menuItem.setContributorURI("platform:/plugin/org.eclipse.app4mc.amalthea.model.editor.contribution");
List<MCommand> command = modelService.findElements(
- app,
- "org.eclipse.app4mc.amalthea.model.editor.contribution.command.createmodelstructure",
+ app,
+ "org.eclipse.app4mc.amalthea.model.editor.contribution.command.createmodelstructure",
MCommand.class);
menuItem.setCommand(command.get(0));
@@ -74,7 +74,7 @@
menuBuilder.addMenuItem(path, menuItem);
});
-
+
menuBuilder.populateMenuElementsList(items);
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/CreationServiceExpression.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/CreationServiceExpression.java
index 16b5060..cdf0b95 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/CreationServiceExpression.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/CreationServiceExpression.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.menu;
@@ -28,12 +28,12 @@
*/
@SuppressWarnings("restriction")
public class CreationServiceExpression extends AmaltheaModelElementExpression {
-
+
@Evaluate
public boolean evaluate(
- @Optional @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection,
+ @Optional @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection,
@Optional @Service CreationServiceRegistry registry) {
-
+
if (super.evaluate(selection)) {
// single element selected
return !registry.getServices(selection.getFirstElement()).isEmpty();
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/MenuBuilder.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/MenuBuilder.java
index 917cb34..aa27f1a 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/MenuBuilder.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/MenuBuilder.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.menu;
@@ -28,7 +28,7 @@
/**
* Builds a hierarchical menu structure based on path description of added menu items.
- *
+ *
* Path segments are separated by "|".
*
*/
@@ -39,7 +39,7 @@
/**
* Adds a menu item to the menu.
- *
+ *
* @param path describes the position in the hierarchical menu (e.g. "Actions | Undo")
* @param menuItem the configured menu item (the last segment of the path is set as label)
*/
@@ -70,7 +70,7 @@
* <li>sub menus in alphabetic order</li>
* <li>menu entries in alphabetic order</li>
* </ul>
- *
+ *
* @param items
*/
public void populateMenuElementsList(List<MMenuElement> items) {
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/ProcessModelMenuContribution.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/ProcessModelMenuContribution.java
index 3b4f4ca..d2ef1ae 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/ProcessModelMenuContribution.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/ProcessModelMenuContribution.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.menu;
@@ -36,10 +36,10 @@
@SuppressWarnings("restriction")
public class ProcessModelMenuContribution {
-
+
@AboutToShow
public void aboutToShow(
- List<MMenuElement> items,
+ List<MMenuElement> items,
EModelService modelService,
MApplication app,
@Service ProcessingServiceRegistry registry,
@@ -57,8 +57,8 @@
menuItem.setContributorURI("platform:/plugin/org.eclipse.app4mc.amalthea.model.editor.contribution");
List<MCommand> command = modelService.findElements(
- app,
- "org.eclipse.app4mc.amalthea.model.editor.contribution.command.modelprocessing",
+ app,
+ "org.eclipse.app4mc.amalthea.model.editor.contribution.command.modelprocessing",
MCommand.class);
menuItem.setCommand(command.get(0));
@@ -74,7 +74,7 @@
menuBuilder.addMenuItem(path, menuItem);
});
-
+
menuBuilder.populateMenuElementsList(items);
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/ProcessingServiceExpression.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/ProcessingServiceExpression.java
index dcac34a..caffb15 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/ProcessingServiceExpression.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/menu/ProcessingServiceExpression.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.menu;
@@ -28,12 +28,12 @@
*/
@SuppressWarnings("restriction")
public class ProcessingServiceExpression extends AmaltheaModelElementExpression {
-
+
@Evaluate
public boolean evaluate(
- @Optional @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection,
+ @Optional @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection,
@Optional @Service ProcessingServiceRegistry registry) {
-
+
if (super.evaluate(selection)) {
// single element selected
return !registry.getServices(selection.getFirstElement()).isEmpty();
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/CreationServiceRegistry.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/CreationServiceRegistry.java
index 1223e5b..ae43ed1 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/CreationServiceRegistry.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/CreationServiceRegistry.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.registry;
@@ -32,7 +32,7 @@
@Component(service = CreationServiceRegistry.class)
public class CreationServiceRegistry extends ModelServiceRegistry<CreationService> {
-
+
@Reference(
cardinality = ReferenceCardinality.MULTIPLE,
policy = ReferencePolicy.DYNAMIC,
@@ -65,12 +65,12 @@
// - replace selected object class with its interfaces
if (selected instanceof EObject) {
Class<? extends Object> class1 = selected.getClass();
- interfaces = Arrays.asList(class1.getInterfaces());
+ interfaces = Arrays.asList(class1.getInterfaces());
}
return getServices(interfaces, supportedFeatures);
}
-
+
public List<RegistryServiceWrapper<CreationService>> getServices(List<Class<?>> classes, List<EStructuralFeature> supportedFeatures) {
List<RegistryServiceWrapper<CreationService>> services = super.getServices(classes);
@@ -78,7 +78,7 @@
if (supportedFeatures == null || supportedFeatures.isEmpty()) {
return services;
}
-
+
return services.stream()
.filter(s -> s.getServiceInstance().modelFeature() == null
|| supportedFeatures.contains(s.getServiceInstance().modelFeature()))
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/ModelServiceRegistry.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/ModelServiceRegistry.java
index abe559d..a7bd4a1 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/ModelServiceRegistry.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/ModelServiceRegistry.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.registry;
@@ -36,23 +36,23 @@
public class ModelServiceRegistry<T> {
private static final Logger LOGGER = LoggerFactory.getLogger(ModelServiceRegistry.class);
-
+
private ConcurrentHashMap<String, Map<String, RegistryServiceWrapper<T>>> registry = new ConcurrentHashMap<>();
-
+
protected void bindService(T service, Map<String, Object> properties) {
-
+
String modelClassName = getModelClassName(service, properties);
if (modelClassName != null) {
- Map<String, RegistryServiceWrapper<T>> services =
- this.registry.computeIfAbsent(modelClassName, key -> new ConcurrentHashMap<String, RegistryServiceWrapper<T>>());
-
+ Map<String, RegistryServiceWrapper<T>> services =
+ this.registry.computeIfAbsent(modelClassName, key -> new ConcurrentHashMap<>());
+
String id = (String) properties.getOrDefault("id", service.getClass().getName());
if (!services.containsKey(id)) {
services.put(id,
new RegistryServiceWrapper<>(
- id,
- service,
- (String) properties.getOrDefault("name", service.getClass().getSimpleName()),
+ id,
+ service,
+ (String) properties.getOrDefault("name", service.getClass().getSimpleName()),
(String) properties.getOrDefault("description", null),
modelClassName));
} else {
@@ -71,10 +71,10 @@
services.remove(id);
}
}
-
+
/**
* Get all service wrapper objects that are registered for the given classes.
- *
+ *
* @param classes The classes for which the wrappers are requested.
* @return All service wrapper objects that are registered for the
* given classes.
@@ -89,7 +89,7 @@
classNames.addAll(allInterfaces.stream().map(Class::getName).collect(Collectors.toList()));
}
}
-
+
return classNames.stream()
.filter(Objects::nonNull)
.flatMap(name -> this.registry.getOrDefault(name, new HashMap<>()).values().stream())
@@ -97,7 +97,7 @@
}
/**
- *
+ *
* @param modelClassName The class name for which the service is registered.
* @param id The id of the service.
* @return The service wrapper.
@@ -105,13 +105,13 @@
public RegistryServiceWrapper<T> getService(String modelClassName, String id) {
return this.registry.getOrDefault(modelClassName, new HashMap<>()).get(id);
}
-
+
/**
* Extracts the model class name for which the service should be
* registered. First checks the <i>modelClass</i> component property. If it is
* not set the type of the first parameter of the method annotated with
* {@link PostConstruct} will be returned.
- *
+ *
* @param service The service for which the model class name
* should be returned.
* @param properties The component properties map of the
@@ -122,7 +122,7 @@
private String getModelClassName(T service, Map<String, Object> properties) {
// check if property for modelClass is set
String modelClassName = (String) properties.getOrDefault("modelClass", null);
-
+
if (modelClassName == null) {
// else find method annotated with @PostConstruct
Class<?> creationClass = service.getClass();
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/ProcessingServiceRegistry.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/ProcessingServiceRegistry.java
index 6f605bb..df75549 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/ProcessingServiceRegistry.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/ProcessingServiceRegistry.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.registry;
@@ -29,7 +29,7 @@
@Component(service = ProcessingServiceRegistry.class)
public class ProcessingServiceRegistry extends ModelServiceRegistry<ProcessingService> {
-
+
@Reference(
cardinality = ReferenceCardinality.MULTIPLE,
policy = ReferencePolicy.DYNAMIC,
@@ -52,7 +52,7 @@
// - replace selected object class with its interfaces
if (selected instanceof EObject) {
Class<? extends Object> class1 = selected.getClass();
- interfaces = Arrays.asList(class1.getInterfaces());
+ interfaces = Arrays.asList(class1.getInterfaces());
}
return getServices(interfaces);
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/RegistryServiceWrapper.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/RegistryServiceWrapper.java
index d8718b6..382ea55 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/RegistryServiceWrapper.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/registry/RegistryServiceWrapper.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.registry;
@@ -21,7 +21,7 @@
* The unique id of the service.
*/
private final String id;
-
+
/**
* The service instance.
*/
@@ -31,12 +31,12 @@
* The name of the service.
*/
private final String name;
-
+
/**
* The description of the service.
*/
private final String description;
-
+
/**
* The model type for which the service is registered and that should be
* injected to the {@link PostConstruct} method.
@@ -44,7 +44,7 @@
private final String type;
/**
- *
+ *
* @param id The unique id of the service.
* @param instance The service instance.
* @param name The name of the service.
@@ -60,41 +60,41 @@
this.description = description;
this.type = type;
}
-
+
/**
- *
+ *
* @return The unique id of the service.
*/
public String getId() {
return this.id;
}
-
+
/**
- *
+ *
* @return The service instance.
*/
public T getServiceInstance() {
return this.instance;
}
-
+
/**
- *
+ *
* @return The name of the service.
*/
public String getName() {
return name;
}
-
+
/**
- *
+ *
* @return The description of the service.
*/
public String getDescription() {
return description;
}
-
+
/**
- *
+ *
* @return The model type for which the service is registered and that
* should be injected to the {@link PostConstruct} method.
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/CreationService.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/CreationService.java
index 4bbdae6..d4f71f4 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/CreationService.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/CreationService.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service;
@@ -18,7 +18,7 @@
public interface CreationService {
- public default EStructuralFeature modelFeature() {
+ default EStructuralFeature modelFeature() {
return null;
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/ProcessingService.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/ProcessingService.java
index 1fddef5..793be1b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/ProcessingService.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.contribution/src/org/eclipse/app4mc/amalthea/model/editor/contribution/service/ProcessingService.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.contribution.service;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/AmaltheaEditorAssociationOverride.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/AmaltheaEditorAssociationOverride.java
index 85eb9b2..f3fc625 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/AmaltheaEditorAssociationOverride.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/AmaltheaEditorAssociationOverride.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -86,7 +86,7 @@
return editorDescriptor;
}
- return overrideEditorDescriptor(editorInput, editorDescriptor);
+ return overrideEditorDescriptor(editorInput, editorDescriptor);
}
/**
@@ -144,10 +144,10 @@
if (isCurrentVersion) {
// return the standard Amalthea editor
- return PlatformUI.getWorkbench().getEditorRegistry().findEditor(AMALTHEA_EDITOR_EXTENDED);
+ return PlatformUI.getWorkbench().getEditorRegistry().findEditor(AMALTHEA_EDITOR_EXTENDED);
} else {
// return dummy editor (that triggers migration dialog)
- return PlatformUI.getWorkbench().getEditorRegistry().findEditor(AMALTHEA_EDITOR_DUMMY);
+ return PlatformUI.getWorkbench().getEditorRegistry().findEditor(AMALTHEA_EDITOR_DUMMY);
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/AmaltheaEditorMatchingStrategy.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/AmaltheaEditorMatchingStrategy.java
index 41d8e98..85f38e4 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/AmaltheaEditorMatchingStrategy.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/AmaltheaEditorMatchingStrategy.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
* An editor matching strategy allows editor extensions to provide their own
* algorithm for matching the input of an open editor of that type to a given
* editor input.
- *
+ *
* This class matches only ExtendedAmaltheaEditors.
*/
public class AmaltheaEditorMatchingStrategy implements IEditorMatchingStrategy {
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/DummyAmaltheaEditor.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/DummyAmaltheaEditor.java
index d6aea3a..1736642 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/DummyAmaltheaEditor.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/DummyAmaltheaEditor.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -61,16 +61,16 @@
}
private void showInvalidVersionDialog(IFile iFile) {
-
+
String versionFromModel = AmaltheaEditorUtil.getModelVersion(iFile);
String versionFromMetaModel = ModelUtil.MODEL_VERSION;
-
+
String versionMismatchMessage = NLS.bind(
"Unsupported File ! \r\rEditor could not be opened because of a version mismatch. \r\rFound AMALTHEA model version : {0}\rCurrent editor supports only AMALTHEA model version : {1}",
new Object[] { versionFromModel, versionFromMetaModel });
-
+
// *** Check if migration to current version is available ***
-
+
MApplication application = PlatformUI.getWorkbench().getService(MApplication.class);
if (application != null) {
IEclipseContext context = application.getContext();
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/actions/SearchAction.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/actions/SearchAction.java
index 5e1e098..990b477 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/actions/SearchAction.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/actions/SearchAction.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2013-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/actions/ShowTypesAction.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/actions/ShowTypesAction.java
index 07a3d63..6d7b642 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/actions/ShowTypesAction.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/actions/ShowTypesAction.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2013-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/actions/ValidateAction.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/actions/ValidateAction.java
index fae248f..ead89e6 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/actions/ValidateAction.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/actions/ValidateAction.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -111,7 +111,7 @@
for (Class<? extends IProfile> sc : selectedProfiles) {
builder.append("\n\t- ");
builder.append(sc.getName());
- }
+ }
LOGGER.info(builder.toString());
LOGGER.info("Available processors: {}", Runtime.getRuntime().availableProcessors());
}
@@ -133,7 +133,7 @@
}
};
if (LOGGER.isDebugEnabled()) {
- job.addJobChangeListener(logValidationResults(executor));
+ job.addJobChangeListener(logValidationResults(executor));
}
job.addJobChangeListener(updateMarkersWhenDone(executor, rootObjects));
job.addJobChangeListener(showMessageDialogWhenDone(executor));
@@ -169,7 +169,7 @@
@Override
public void done(IJobChangeEvent event) {
// *** Log validation results (for debugging) ***
-
+
if (event.getResult().isOK() && LOGGER.isDebugEnabled()) {
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
PrintStream printStream = new PrintStream(byteStream, true);
@@ -226,7 +226,7 @@
// convert results
BasicDiagnostic diagnostics = new BasicDiagnostic();
for (ValidationDiagnostic diag : executor.getResults()) {
- diagnostics.add(diag);
+ diagnostics.add(diag);
}
// collect files (IFile)
@@ -241,7 +241,7 @@
// update problem markers
MarkerHelper markerHelper = new ValidationMarkerHelper();
for (IFile file : files) {
- markerHelper.deleteMarkers(file);
+ markerHelper.deleteMarkers(file);
}
try {
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/addon/ModelEditAddon.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/addon/ModelEditAddon.java
index 145ed8a..e5cbb1e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/addon/ModelEditAddon.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/addon/ModelEditAddon.java
@@ -26,7 +26,7 @@
public void init(IEclipseContext context) {
// Extracting namespace from AmaltheaPackage
String nsURI = AmaltheaPackage.eNS_URI;
-
+
// Extracting AMALTHEA metamodel version
String modelVersion = nsURI.lastIndexOf('/') != -1
? nsURI.substring(nsURI.lastIndexOf('/') + 1)
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/container/AmaltheaModelContainer.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/container/AmaltheaModelContainer.java
index 9008b88..6fb6db8 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/container/AmaltheaModelContainer.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/container/AmaltheaModelContainer.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -51,7 +51,7 @@
import org.eclipse.ui.part.EditorPart;
public class AmaltheaModelContainer {
-
+
private final IContainer iContainer;
private final Set<EditorPart> openEditors = new HashSet<>();
@@ -71,7 +71,7 @@
/**
* Adds an editor to the set of active editors
- *
+ *
* @param editor
* @return true if the editor set did not already contain the editor
*/
@@ -82,16 +82,16 @@
if (wasEmpty && added) {
// get all valid model files (of current container)
initialModelFiles.addAll(AmaltheaEditorUtil.getValidModelFiles(iContainer));
-
+
// initialize editing domain and resource set
initializeEditingDomain();
-
+
// load files
for (IFile iFile : initialModelFiles) {
// Be sure to encode the path when creating a URI for it,
// i.e., URI.createPlatformResourceURI(iFile.getFullPath().toString(), true).
- // Use workspaceRoot.getFile(new Path(uri.toPlatformResourceString(true))) to convert it back to an IFile.
- //
+ // Use workspaceRoot.getFile(new Path(uri.toPlatformResourceString(true))) to convert it back to an IFile.
+ //
// see https://wiki.eclipse.org/EMF/FAQ#How_do_I_map_between_an_EMF_Resource_and_an_Eclipse_IFile.3F
//
final URI uri = URI.createPlatformResourceURI(iFile.getFullPath().toString(), true);
@@ -130,13 +130,13 @@
/**
* Removes an editor from the set of active editors
- *
+ *
* @param editor
* @return true if the editor set contained the editor
*/
public boolean removeEditor(EditorPart editor) {
boolean removed = openEditors.remove(editor);
-
+
if (removed && openEditors.isEmpty()) {
// reset collection of model files. unload required ?
initialModelFiles.clear();
@@ -147,7 +147,7 @@
updateDecorators();
}
-
+
return removed;
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/container/ContainerAdapterFactory.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/container/ContainerAdapterFactory.java
index eb817e6..e69ad15 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/container/ContainerAdapterFactory.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/container/ContainerAdapterFactory.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -39,7 +39,7 @@
public class ContainerAdapterFactory implements IAdapterFactory {
private Map<IContainer, AmaltheaModelContainer> containerCache = new HashMap<>();
-
+
@Override
public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
if (adaptableObject instanceof IContainer) {
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/decorator/ContainerDecorator.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/decorator/ContainerDecorator.java
index 983a4bc..26969e1 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/decorator/ContainerDecorator.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/decorator/ContainerDecorator.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/decorator/FileCompressedDecorator.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/decorator/FileCompressedDecorator.java
index 119cfd9..a4aaed3 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/decorator/FileCompressedDecorator.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/decorator/FileCompressedDecorator.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/decorator/FileLoadedDecorator.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/decorator/FileLoadedDecorator.java
index 78b2e6d..b2fea40 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/decorator/FileLoadedDecorator.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/decorator/FileLoadedDecorator.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/handler/CompressHandler.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/handler/CompressHandler.java
index 471ff74..42e7863 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/handler/CompressHandler.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/handler/CompressHandler.java
@@ -86,7 +86,7 @@
/**
* Creates a Zip file (generic implementation based on java.util.zip package)
- *
+ *
* @param iFile
* @param shell
* @param decoratorManager
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/handler/CompressedExpression.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/handler/CompressedExpression.java
index 85ce65f..842f41e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/handler/CompressedExpression.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/handler/CompressedExpression.java
@@ -11,7 +11,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.handler;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/handler/UncompressedExpression.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/handler/UncompressedExpression.java
index 126bce6..96a3929 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/handler/UncompressedExpression.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/handler/UncompressedExpression.java
@@ -11,7 +11,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.amalthea.model.editor.handler;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/messages/Messages.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/messages/Messages.java
index f6736ac..b47f7ab 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/messages/Messages.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/messages/Messages.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2013 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/providers/ExtendedAmaltheaLabelProvider.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/providers/ExtendedAmaltheaLabelProvider.java
index fe4c146..4af9a49 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/providers/ExtendedAmaltheaLabelProvider.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/providers/ExtendedAmaltheaLabelProvider.java
@@ -1,13 +1,13 @@
/**
* *******************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* *******************************************************************************
*/
@@ -48,7 +48,7 @@
final String newText = stripTypePrefix(text, type);
if (editor != null && editor.isShowTypesEnabled()) {
- return newText + " [" + type + "]";
+ return newText + " [" + type + "]";
} else {
return newText;
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/ModelHitCollector.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/ModelHitCollector.java
index 4dfbe2e..4f7e04f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/ModelHitCollector.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/ModelHitCollector.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2013-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -44,12 +44,12 @@
public ModelHitCollector(final Pattern pattern, final Class<INamed> filter, final boolean isFileScope,
final EObject model, final IEditorInput input) {
- this.searchResult = new ModelSearchResult(this);
- this.namePattern = pattern;
- this.filterClass = filter;
- this.fileScope = isFileScope;
+ searchResult = new ModelSearchResult(this);
+ namePattern = pattern;
+ filterClass = filter;
+ fileScope = isFileScope;
this.model = model;
- this.editorInput = input;
+ editorInput = input;
}
/**
@@ -60,7 +60,7 @@
*/
@Override
public IStatus run(final IProgressMonitor monitor) {
- this.searchResult.removeAll();
+ searchResult.removeAll();
// search the index
Set<? extends INamed> resultSet = AmaltheaIndex.getElements(model, namePattern, filterClass);
@@ -70,7 +70,7 @@
for (INamed element : resultSet) {
if (model.eResource() == element.eResource()) {
// element is opened in current editor
- this.searchResult.addMatch(new SearchMatch(element, 0, 0, editorInput));
+ searchResult.addMatch(new SearchMatch(element, 0, 0, editorInput));
} else {
// element is in a different file
if (! fileScope) {
@@ -80,7 +80,7 @@
input = AmaltheaEditorUtil.getIEditorInput(element);
editorInputMap.put(element.eResource(), input);
}
- this.searchResult.addMatch(new SearchMatch(element, 0, 0, input));
+ searchResult.addMatch(new SearchMatch(element, 0, 0, input));
}
}
}
@@ -117,7 +117,7 @@
*/
@Override
public ISearchResult getSearchResult() {
- return this.searchResult;
+ return searchResult;
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/ModelSearchResult.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/ModelSearchResult.java
index 0db9cba..b752dcc 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/ModelSearchResult.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/ModelSearchResult.java
@@ -1,16 +1,16 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
- *
+ *
********************************************************************************
*/
@@ -68,7 +68,7 @@
*/
@Override
public ISearchQuery getQuery() {
- return this.query;
+ return query;
}
/**
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/ModelSearchResultView.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/ModelSearchResultView.java
index 7e55450..028af84 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/ModelSearchResultView.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/ModelSearchResultView.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2013-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -49,13 +49,13 @@
public ModelSearchResultView() {
super(FLAG_LAYOUT_FLAT + FLAG_LAYOUT_TREE);
- this.toggleGroupViewAction = new ToggleGroupViewAction("Group by Type"); //$NON-NLS-1$
+ toggleGroupViewAction = new ToggleGroupViewAction("Group by Type"); //$NON-NLS-1$
// image taken from
// https://github.com/eclipse/mylyn.commons/blob/d95886e9e377efa663da5901661d20e5e0da9a49/org.eclipse.mylyn.commons.ui/icons/etool16/presentation.gif
Optional<ImageDescriptor> imgDesc = ResourceLocator.imageDescriptorFromBundle(AmaltheaUIPlugin.getPluginId(),
"/icons/full/obj16/presentation.gif"); //$NON-NLS-1$
if (imgDesc.isPresent()) {
- this.toggleGroupViewAction.setImageDescriptor(imgDesc.get());
+ toggleGroupViewAction.setImageDescriptor(imgDesc.get());
}
}
@@ -65,12 +65,12 @@
@Override
protected void elementsChanged(final Object[] objects) {
if (getLayout() == FLAG_LAYOUT_FLAT) {
- if (null != this.contentProvider) {
- this.contentProvider.addElements(objects);
+ if (null != contentProvider) {
+ contentProvider.addElements(objects);
}
} else {
- if (null != this.contentTreeProvider) {
- this.contentTreeProvider.addElements(objects);
+ if (null != contentTreeProvider) {
+ contentTreeProvider.addElements(objects);
}
}
getViewer().refresh();
@@ -104,12 +104,12 @@
@Override
protected void clear() {
if (getLayout() == FLAG_LAYOUT_FLAT) {
- if (null != this.contentProvider) {
- this.contentProvider.clear();
+ if (null != contentProvider) {
+ contentProvider.clear();
}
} else {
- if (null != this.contentTreeProvider) {
- this.contentTreeProvider.clear();
+ if (null != contentTreeProvider) {
+ contentTreeProvider.clear();
}
}
getViewer().refresh();
@@ -120,8 +120,8 @@
*/
@Override
protected void configureTreeViewer(final TreeViewer viewer) {
- this.contentTreeProvider = new SearchResultTreeContentProvider();
- viewer.setContentProvider(this.contentTreeProvider);
+ contentTreeProvider = new SearchResultTreeContentProvider();
+ viewer.setContentProvider(contentTreeProvider);
viewer.setLabelProvider(new DecoratingStyledCellLabelProvider(new SearchResultTreeLabelProvider(),
PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator(), null));
}
@@ -131,8 +131,8 @@
*/
@Override
protected void configureTableViewer(final TableViewer viewer) {
- this.contentProvider = new SearchResultContentProvider();
- viewer.setContentProvider(this.contentProvider);
+ contentProvider = new SearchResultContentProvider();
+ viewer.setContentProvider(contentProvider);
viewer.setLabelProvider(new SearchResultLabelProvider());
}
@@ -174,9 +174,7 @@
*/
@Override
public void setLayout(int layout) {
- if (!isLayoutSupported(layout))
- return;
- if (getLayout() == layout)
+ if (!isLayoutSupported(layout) || (getLayout() == layout))
return;
getViewer().setSelection(StructuredSelection.EMPTY, false);
@@ -191,7 +189,7 @@
protected void fillToolbar(final IToolBarManager tbm) {
super.fillToolbar(tbm);
- tbm.appendToGroup(IContextMenuConstants.GROUP_VIEWER_SETUP, this.toggleGroupViewAction);
+ tbm.appendToGroup(IContextMenuConstants.GROUP_VIEWER_SETUP, toggleGroupViewAction);
}
private class ToggleGroupViewAction extends Action {
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchMatch.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchMatch.java
index 698a7df..856b63a 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchMatch.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchMatch.java
@@ -1,16 +1,16 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
- *
+ *
********************************************************************************
*/
@@ -20,8 +20,8 @@
import org.eclipse.ui.IEditorInput;
/**
- *
- *
+ *
+ *
*/
public class SearchMatch extends Match {
@@ -43,7 +43,7 @@
* @return the editorInput
*/
public IEditorInput getEditorInput() {
- return this.editorInput;
+ return editorInput;
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultContentProvider.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultContentProvider.java
index fd09cfe..50b0155 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultContentProvider.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultContentProvider.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2013-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -25,7 +25,7 @@
public class SearchResultContentProvider implements IStructuredContentProvider {
private static final Object[] NO_OBJECTS = {};
-
+
private ModelSearchResult searchResult;
private Object[] elements = NO_OBJECTS;
@@ -41,7 +41,7 @@
* Clears the current search result
*/
public void clear() {
- this.elements = NO_OBJECTS;
+ elements = NO_OBJECTS;
}
/**
@@ -52,13 +52,13 @@
public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) {
clear();
if (newInput instanceof ModelSearchResult) {
- this.searchResult = (ModelSearchResult) newInput;
-
- this.elements = this.searchResult.getElements();
- Arrays.parallelSort(this.elements, new ObjectComparator());
+ searchResult = (ModelSearchResult) newInput;
+
+ elements = searchResult.getElements();
+ Arrays.parallelSort(elements, new ObjectComparator());
}
else {
- this.searchResult = null;
+ searchResult = null;
}
}
@@ -66,11 +66,11 @@
if (newElements.length == 0) {
return; // nothing to add
}
-
- this.elements = concatenate(this.elements, newElements);
- Arrays.parallelSort(this.elements, new ObjectComparator());
+
+ elements = concatenate(elements, newElements);
+ Arrays.parallelSort(elements, new ObjectComparator());
}
-
+
private Object[] concatenate(Object[] a, Object[] b) {
int aLen = a.length;
int bLen = b.length;
@@ -87,14 +87,14 @@
*/
@Override
public Object[] getElements(final Object inputElement) {
- if (inputElement != this.searchResult) {
- return NO_OBJECTS;
+ if (inputElement != searchResult) {
+ return NO_OBJECTS;
}
- return this.elements;
+ return elements;
}
- private class ObjectComparator implements Comparator<Object> {
+ private static class ObjectComparator implements Comparator<Object> {
/**
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
@@ -103,7 +103,7 @@
public int compare(final Object o1, final Object o2) {
final INamed n1 = (INamed) o1;
final INamed n2 = (INamed) o2;
-
+
if (n1.getName() != null && n2.getName() != null) {
return n1.getName().compareTo(n2.getName());
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultLabelProvider.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultLabelProvider.java
index 190476f..a5205d4 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultLabelProvider.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultLabelProvider.java
@@ -1,16 +1,16 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
- *
+ *
********************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultTreeContentProvider.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultTreeContentProvider.java
index 653540f..2b6b8d7 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultTreeContentProvider.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultTreeContentProvider.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2013-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -49,8 +49,8 @@
* Clears the current search result
*/
public void clear() {
- this.elements = NO_OBJECTS;
- this.types = NO_NODES;
+ elements = NO_OBJECTS;
+ types = NO_NODES;
}
/**
@@ -61,12 +61,12 @@
public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) {
clear();
if (newInput instanceof ModelSearchResult) {
- this.searchResult = (ModelSearchResult) newInput;
+ searchResult = (ModelSearchResult) newInput;
- this.elements = this.searchResult.getElements();
- Arrays.parallelSort(this.elements, new ObjectComparator());
+ elements = searchResult.getElements();
+ Arrays.parallelSort(elements, new ObjectComparator());
} else {
- this.searchResult = null;
+ searchResult = null;
}
}
@@ -76,10 +76,10 @@
}
// update and sort elements array
- this.elements = concatenate(this.elements, newElements);
- Arrays.parallelSort(this.elements, new ObjectComparator());
+ elements = concatenate(elements, newElements);
+ Arrays.parallelSort(elements, new ObjectComparator());
// reset nodes array
- this.types = NO_NODES;
+ types = NO_NODES;
}
private Object[] concatenate(Object[] a, Object[] b) {
@@ -98,14 +98,14 @@
*/
@Override
public Object[] getElements(final Object inputElement) {
- if (inputElement != this.searchResult || elements.length == 0) {
+ if (inputElement != searchResult || elements.length == 0) {
return NO_OBJECTS;
}
- if (this.types.length == 0) {
+ if (types.length == 0) {
// create nodes and group by element type
HashMap<String, List<TreeNode>> tmpMap = new HashMap<>();
- for (Object element : this.elements) {
+ for (Object element : elements) {
String className = element.getClass().getName();
TreeNode node = new TreeNode(element);
List<TreeNode> tmpList;
@@ -128,9 +128,9 @@
typeNode.setChildren(nodeList.toArray(new TreeNode[nodeList.size()]));
typeList.add(typeNode);
}
- this.types = typeList.toArray(new TreeNode[typeList.size()]);
+ types = typeList.toArray(new TreeNode[typeList.size()]);
}
- return this.types;
+ return types;
}
/**
@@ -142,7 +142,7 @@
return (tmp != null) ? tmp : NO_OBJECTS;
}
- private class ObjectComparator implements Comparator<Object> {
+ private static class ObjectComparator implements Comparator<Object> {
/**
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultTreeLabelProvider.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultTreeLabelProvider.java
index 0f68e50..a5f53e3 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultTreeLabelProvider.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/SearchResultTreeLabelProvider.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2013-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/handlers/SearchDialog.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/handlers/SearchDialog.java
index ac1a948..9116340 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/handlers/SearchDialog.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/handlers/SearchDialog.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -33,13 +33,13 @@
import org.eclipse.swt.widgets.Text;
public class SearchDialog extends TitleAreaDialog {
-
+
private SearchDialogSettings settings;
private Text txtNamePattern;
private Label lblSyntaxDescription;
private Button btnCaseSensitive;
- private Button btnRegularExpression;
+ private Button btnRegularExpression;
private Combo cmbClassFilter;
private Button btnScopeCurrentFile;
private Button btnScopeFolder;
@@ -53,7 +53,7 @@
super(parentShell);
setShellStyle(SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM | SWT.RESIZE);
setHelpAvailable(false);
-
+
if (set != null)
settings = set;
else
@@ -82,7 +82,7 @@
@Override
public void create() {
super.create();
-
+
// handle settings - initialize UI
copySettings2UI();
}
@@ -94,7 +94,7 @@
settings.m_success = true;
copyUI2Settings();
}
-
+
super.setReturnCode(code);
}
@@ -107,7 +107,7 @@
setTitle("Search for model elements");
setMessage("Query the name attribute of model elements.");
Composite dialog = (Composite) super.createDialogArea(parent);
-
+
Composite container = new Composite(dialog, SWT.NONE);
container.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
GridLayout layout = new GridLayout();
@@ -117,56 +117,56 @@
layout.makeColumnsEqualWidth = false;
layout.numColumns = 2;
container.setLayout(layout);
-
+
Label lblName = new Label(container, SWT.NONE);
lblName.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblName.setText("Name:");
-
+
txtNamePattern = new Text(container, SWT.BORDER);
txtNamePattern.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
-
+
new Label(container, SWT.NONE);
lblSyntaxDescription = new Label(container, SWT.NONE);
lblSyntaxDescription.setText("(* = any string, ? = any character, \\ = escape for literals: * ? \\)");
-
+
Label separator0 = new Label(container, SWT.NONE);
GridData gd_separator0 = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);
gd_separator0.heightHint = 8;
separator0.setLayoutData(gd_separator0);
-
+
new Label(container, SWT.NONE);
btnCaseSensitive = new Button(container, SWT.CHECK);
btnCaseSensitive.setText("Case sensitive");
-
+
new Label(container, SWT.NONE);
btnRegularExpression = new Button(container, SWT.CHECK);
btnRegularExpression.setText("Regular expression");
-
+
Label separator1 = new Label(container, SWT.SEPARATOR | SWT.HORIZONTAL);
GridData gd_separator1 = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);
gd_separator1.heightHint = 8;
separator1.setLayoutData(gd_separator1);
-
+
Label lblFilter = new Label(container, SWT.NONE);
lblFilter.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblFilter.setText("Filter:");
-
+
cmbClassFilter = new Combo(container, SWT.READ_ONLY);
cmbClassFilter.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
-
+
Label lblScope = new Label(container, SWT.NONE);
lblScope.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblScope.setText("Scope:");
-
+
Composite composite = new Composite(container, SWT.NONE);
FillLayout fl_composite = new FillLayout(SWT.HORIZONTAL);
fl_composite.spacing = 10;
composite.setLayout(fl_composite);
composite.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
-
+
btnScopeCurrentFile = new Button(composite, SWT.RADIO);
btnScopeCurrentFile.setText("Current file");
-
+
btnScopeFolder = new Button(composite, SWT.RADIO);
btnScopeFolder.setText("Folder");
btnScopeFolder.setSelection(true);
@@ -182,7 +182,7 @@
lblSyntaxDescription.setVisible(!btnRegularExpression.getSelection());
}
});
-
+
return container;
}
@@ -193,7 +193,7 @@
@Override
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
-
+
Button searchButton = getButton(IDialogConstants.OK_ID);
searchButton.setText("Search");
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/handlers/SearchDialogSettings.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/handlers/SearchDialogSettings.java
index a7e5ce5..e2c23af 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/handlers/SearchDialogSettings.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/search/handlers/SearchDialogSettings.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -34,7 +34,7 @@
private static final String KEY_CASE_SENSITIVE = "Search_CaseSensitive";
private static final String KEY_REGEX = "Search_RegularExpression";
private static final String KEY_FILE_SCOPE = "Search_FileScope";
-
+
private final EClass FILTER_CLASS_DEFAULT = AmaltheaPackage.eINSTANCE.getINamed();
private final Map<String, EClass> FILTER_CLASS_MAP = computeSubclassMap();
@@ -52,17 +52,17 @@
public boolean isSearchRestrictedToFile() {
return m_restrictToFile;
}
-
+
@SuppressWarnings("unchecked")
public Class<INamed> computeFilterClass() {
EClass eClass = FILTER_CLASS_MAP.get(m_filterClassName);
if (eClass == null) return null;
-
+
return (Class<INamed>) eClass.getInstanceClass();
}
public Pattern computeSearchPattern() {
- if (m_success == false)
+ if (!m_success)
return null;
StringBuilder pattern = new StringBuilder();
@@ -77,7 +77,7 @@
return null;
}
}
-
+
// simple pattern
boolean quoted = false;
StringBuilder buffer = new StringBuilder();
@@ -105,7 +105,7 @@
public void saveTo(IDialogSettings store) {
if (store == null) return;
-
+
store.put(KEY_NAME_PATTERN, m_namePattern);
store.put(KEY_CLASS_NAME, m_filterClassName);
store.put(KEY_CASE_SENSITIVE, m_caseSensitive);
@@ -115,7 +115,7 @@
public void loadFrom(IDialogSettings store) {
if (store == null) return;
-
+
if (store.get(KEY_NAME_PATTERN) != null) m_namePattern = store.get(KEY_NAME_PATTERN);
if (store.get(KEY_CLASS_NAME) != null) m_filterClassName = store.get(KEY_CLASS_NAME);
if (store.get(KEY_CASE_SENSITIVE) != null) m_caseSensitive = store.getBoolean(KEY_CASE_SENSITIVE);
@@ -139,5 +139,5 @@
}
return Collections.unmodifiableMap(classMap);
}
-
+
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/util/AmaltheaEditorUtil.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/util/AmaltheaEditorUtil.java
index 7501be6..297e51c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/util/AmaltheaEditorUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/editor/util/AmaltheaEditorUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -80,7 +80,7 @@
public static IFile getIFile(IEditorInput editorInput) {
if (editorInput == null)
return null;
-
+
// get file
return editorInput.getAdapter(IFile.class);
}
@@ -88,12 +88,12 @@
public static IContainer getIContainer(IEditorInput editorInput) {
if (editorInput == null)
return null;
-
+
// get file resource
IResource iResource = editorInput.getAdapter(IResource.class);
if (iResource == null)
return null;
-
+
// get container
return iResource.getParent();
}
@@ -119,7 +119,7 @@
public static Resource getResource(IEditorInput editorInput) {
if (editorInput == null)
return null;
-
+
AmaltheaModelContainer container = getModelContainer(editorInput);
URI uri = EditUIUtil.getURI(editorInput);
if (container == null || container.getResourceSet() == null || uri == null)
@@ -135,11 +135,11 @@
public static Amalthea getModel(Resource resource) {
if (resource == null || resource.getContents().isEmpty())
return null;
-
+
EObject eObject = resource.getContents().get(0);
if (!(eObject instanceof Amalthea))
return null;
-
+
return (Amalthea) eObject;
}
@@ -231,7 +231,7 @@
return new FileEditorInput((IFile) workspaceResource);
}
}
-
+
// fallback: create URIEditorInput
return new URIEditorInput(uri);
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/AmaltheaUIPlugin.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/AmaltheaUIPlugin.java
index c30a6cd..e9b3d5a 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/AmaltheaUIPlugin.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/AmaltheaUIPlugin.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2013 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/ExtendedAmaltheaActionBarContributor.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/ExtendedAmaltheaActionBarContributor.java
index c07c036..e4b4d9f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/ExtendedAmaltheaActionBarContributor.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/ExtendedAmaltheaActionBarContributor.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/ExtendedAmaltheaEditor.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/ExtendedAmaltheaEditor.java
index 837fc01..909c2f6 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/ExtendedAmaltheaEditor.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/ExtendedAmaltheaEditor.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -55,7 +55,6 @@
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.EditorPart;
import org.eclipse.ui.views.properties.PropertySheetPage;
import org.osgi.service.event.EventHandler;
@@ -88,7 +87,7 @@
}
public void enableShowTypes(boolean enabled) {
- this.showTypes = enabled;
+ showTypes = enabled;
}
@Override
@@ -100,7 +99,7 @@
/**
* Initializes the editor.
- *
+ *
* Additions:
* <ul>
* <li>register editor at common model container</li>
@@ -157,7 +156,7 @@
/**
* This is the method used by the framework to install your own controls.
- *
+ *
* Modifications (compared to superclass):
* <ul>
* <li>find corresponding resource of editorInput</li>
@@ -296,7 +295,7 @@
// update compressed decorator
IDecoratorManager decoratorMgr = PlatformUI.getWorkbench().getDecoratorManager();
if (decoratorMgr != null) {
- decoratorMgr.update("org.eclipse.app4mc.amalthea.file.compressed.decorator");
+ decoratorMgr.update("org.eclipse.app4mc.amalthea.file.compressed.decorator");
}
}
@@ -340,7 +339,7 @@
if (broker == null)
return;
- broker.subscribe("org/eclipse/app4mc/amalthea/editor/SELECT", this.selectionListener);
+ broker.subscribe("org/eclipse/app4mc/amalthea/editor/SELECT", selectionListener);
}
/**
@@ -357,7 +356,7 @@
// not really necessary as there is one EventBroker instance per EclipseContext
// but it is a good practice to clean up what we have registered
- broker.unsubscribe(this.selectionListener);
+ broker.unsubscribe(selectionListener);
}
/*
@@ -374,9 +373,9 @@
@Override
public void setSelection(ISelection selection) {
super.setSelection(selection);
-
+
if (!Util.isWindows()) return; // No Windows OS -> no workaround required
-
+
// *** Workaround: additional redraw ***
Viewer viewer = getViewer();
if (viewer != null) {
diff --git a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/ExtendedAmaltheaModelWizard.java b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/ExtendedAmaltheaModelWizard.java
index 8075689..2388b6b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/ExtendedAmaltheaModelWizard.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model.editor.extended/src/org/eclipse/app4mc/amalthea/model/presentation/ExtendedAmaltheaModelWizard.java
@@ -1,13 +1,13 @@
/**
* *******************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* *******************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaCrossReferenceAdapter.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaCrossReferenceAdapter.java
index fbe13bd..ab9d461 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaCrossReferenceAdapter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaCrossReferenceAdapter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -44,12 +44,12 @@
private static final String ARG_PATTERN_MESSAGE = "Pattern argument is null, expected: Pattern";
private static final String ARG_CLASS_MESSAGE = "Class argument is null, expected: Class<T extends INamed>";
private static final String ARG_STREAM_MESSAGE = "Stream argument is null, expected: PrintStream";
-
+
private final Map<String, Set<INamed>> nameIndex = new HashMap<>();
public @NonNull Set<@NonNull INamed> getElements(final @NonNull String name) {
checkArgument(name != null, ARG_NAME_MESSAGE);
-
+
return getElements(name, INamed.class);
}
@@ -57,9 +57,9 @@
public <T extends INamed> @NonNull Set<@NonNull T> getElements(final @NonNull String name, final @NonNull Class<T> targetClass) {
checkArgument(name != null, ARG_NAME_MESSAGE);
checkArgument(targetClass != null, ARG_CLASS_MESSAGE);
-
+
final Set<T> result = new HashSet<>();
- final Set<INamed> values = this.nameIndex.get(name);
+ final Set<INamed> values = nameIndex.get(name);
if (values != null) {
for (final INamed namedObject : values) {
if (targetClass.isInstance(namedObject)) {
@@ -72,7 +72,7 @@
public @NonNull Set<@NonNull INamed> getElements(final @NonNull Pattern namePattern) {
checkArgument(namePattern != null, ARG_PATTERN_MESSAGE);
-
+
return getElements(namePattern, INamed.class);
}
@@ -80,9 +80,9 @@
public <T extends INamed> @NonNull Set<@NonNull T> getElements(final @NonNull Pattern namePattern, final @NonNull Class<T> targetClass) {
checkArgument(namePattern != null, ARG_PATTERN_MESSAGE);
checkArgument(targetClass != null, ARG_CLASS_MESSAGE);
-
+
final Set<T> result = new HashSet<>();
- for (final Map.Entry<String, Set<INamed>> entry : this.nameIndex.entrySet()) {
+ for (final Map.Entry<String, Set<INamed>> entry : nameIndex.entrySet()) {
if (namePattern.matcher(entry.getKey()).matches()) {
for (final INamed namedObject : entry.getValue()) {
if (targetClass.isInstance(namedObject)) {
@@ -97,9 +97,9 @@
@SuppressWarnings("null")
public <T extends INamed> @NonNull Set<@NonNull T> getElements(final @NonNull Class<T> targetClass) {
checkArgument(targetClass != null, ARG_CLASS_MESSAGE);
-
+
final Set<T> result = new HashSet<>();
- for (final Map.Entry<String, Set<INamed>> entry : this.nameIndex.entrySet()) {
+ for (final Map.Entry<String, Set<INamed>> entry : nameIndex.entrySet()) {
for (final INamed namedObject : entry.getValue()) {
if (targetClass.isInstance(namedObject)) {
result.add(targetClass.cast(namedObject));
@@ -111,35 +111,35 @@
/**
* Returns sets of objects with the same type and same unique name
- *
+ *
* @return Sets of objects
*/
@SuppressWarnings("null")
public @NonNull List<@NonNull Set<@NonNull IReferable>> getObjectsWithConflictingNames() {
final @NonNull List<@NonNull Set<@NonNull IReferable>> result = new ArrayList<>();
-
+
for (Set<INamed> objects : nameIndex.values()) {
if (objects.size() < 2) continue;
-
+
Map<?, List<IReferable>> map1 = objects.stream()
.filter(obj -> obj instanceof IReferable)
.map(IReferable.class::cast)
.collect(Collectors.groupingBy(IReferable::getClass));
-
+
for (List<IReferable> objectsWithSameType : map1.values()) {
if (objectsWithSameType.size() < 2) continue;
-
+
Map<String, List<IReferable>> map2 = objectsWithSameType.stream()
.collect(Collectors.groupingBy(IReferable::getUniqueName));
-
+
for (List<IReferable> objectsWithSameUniqueName : map2.values()) {
if (objectsWithSameUniqueName.size() < 2) continue;
-
+
result.add(new HashSet<>(objectsWithSameUniqueName));
}
}
}
-
+
return result;
}
@@ -189,18 +189,18 @@
private void addToNameIndex(final INamed eObject, final String name) {
if (name != null) {
- Set<INamed> objSet = this.nameIndex.computeIfAbsent(name, k -> new HashSet<>());
+ Set<INamed> objSet = nameIndex.computeIfAbsent(name, k -> new HashSet<>());
objSet.add(eObject);
}
}
private void removeFromNameIndex(final INamed eObject, final String name) {
if (name != null) {
- final Set<INamed> objSet = this.nameIndex.get(name);
+ final Set<INamed> objSet = nameIndex.get(name);
if (objSet != null) {
objSet.remove(eObject);
if (objSet.isEmpty()) {
- this.nameIndex.remove(name);
+ nameIndex.remove(name);
}
}
}
@@ -300,16 +300,16 @@
/**
* Dumps adapter info to a print stream
- *
+ *
* @param stream output stream (use System.out to print to console)
*/
public void dumpInfo(final @NonNull PrintStream stream) {
checkArgument(stream != null, ARG_STREAM_MESSAGE);
-
+
stream.println("Amalthea Cross Reference Adapter {");
-
- stream.println(" Id: " + this.getClass().getName() + '@' + Integer.toHexString(this.hashCode()));
-
+
+ stream.println(" Id: " + this.getClass().getName() + '@' + Integer.toHexString(hashCode()));
+
stream.print(" Resources: ");
Set<Resource> resources = inverseCrossReferencer.keySet().stream()
.map(EObject::eResource).filter(Objects::nonNull).collect(Collectors.toSet());
@@ -322,15 +322,15 @@
}
stream.println(" ]");
}
-
+
stream.println(" Cross Reference Map size: " + inverseCrossReferencer.size());
stream.println(" Name Index size: " + nameIndex.size());
stream.println('}');
}
-
+
/**
* Dumps cross reference map to a print stream
- *
+ *
* @param stream output stream (use System.out to print to console)
*/
public void dumpCrossReferenceMap(final @NonNull PrintStream stream) {
@@ -343,7 +343,7 @@
stream.print(" ");
stream.print(description(eObject));
stream.print(": ");
-
+
Collection<EStructuralFeature.Setting> collection = entry.getValue();
if (collection.isEmpty()) {
stream.println("[]");
@@ -351,7 +351,7 @@
stream.println("[");
for (Iterator<EStructuralFeature.Setting> j = collection.iterator(); j.hasNext();) {
EStructuralFeature.Setting setting = j.next();
-
+
EObject object = setting.getEObject();
EStructuralFeature feature = setting.getEStructuralFeature();
stream.print(" ");
@@ -371,7 +371,7 @@
/**
* Dumps name index to a print stream
- *
+ *
* @param stream output stream (use System.out to print to console)
*/
public void dumpNameIndex(final @NonNull PrintStream stream) {
@@ -399,7 +399,7 @@
StringBuilder result = new StringBuilder();
result.append(eObject.eClass().getName());
if (eObject instanceof INamed) {
- result.append(" \"" + ((INamed) eObject).getName() + "\"");
+ result.append(" \"" + ((INamed) eObject).getName() + "\"");
}
if (eObject.eContainer() instanceof INamed) {
INamed cont = (INamed) eObject.eContainer();
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaExtensions.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaExtensions.java
index 2884db6..135fcea 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaExtensions.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaExtensions.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaIndex.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaIndex.java
index 6d82490..8ac694f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaIndex.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaIndex.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -76,7 +76,7 @@
* <p>
* This method is called from several generated model objects to compute
* an inverse transient reference based on the incoming references.
- *
+ *
* @param eObject object that implements a derived transient opposite reference
* @param resultEReference opposite reference definition (resulting objects are computed)
* @param targetEReferences list of incoming references
@@ -88,7 +88,7 @@
checkArgument(eObject != null, ARG_OBJECT_MESSAGE);
checkArgument(resultEReference != null, ARG_RESULT_REFERENCE_MESSAGE);
checkArgument(targetEReferences != null, ARG_TARGET_REFERENCES_MESSAGE);
-
+
final AmaltheaCrossReferenceAdapter amaltheaAdapter = getOrCreateAmaltheaAdapter(eObject);
// Get references from adapter
@@ -112,13 +112,13 @@
/**
* Returns a set of objects that refer to the given <code>eObject</code>.
- *
+ *
* @param eObject
* @return Set of objects (EObject)
*/
public static Set<EObject> getReferringObjects(final @NonNull EObject eObject) {
checkArgument(eObject != null, ARG_OBJECT_MESSAGE);
-
+
return getOrCreateAmaltheaAdapter(eObject).getNonNavigableInverseReferences(eObject)
.stream()
.map(Setting::getEObject)
@@ -127,7 +127,7 @@
/**
* Returns a type filtered set of objects that refer to the given <code>eObject</code>.
- *
+ *
* @param eObject
* @param targetClass
* @return Set of objects of given type <T extends EObject>
@@ -135,7 +135,7 @@
public static <T extends EObject> Set<T> getReferringObjects(final @NonNull EObject eObject, final @NonNull Class<T> targetClass) {
checkArgument(eObject != null, ARG_OBJECT_MESSAGE);
checkArgument(targetClass != null, ARG_CLASS_MESSAGE);
-
+
return getOrCreateAmaltheaAdapter(eObject).getNonNavigableInverseReferences(eObject)
.stream()
.map(Setting::getEObject)
@@ -143,7 +143,7 @@
.map(targetClass::cast)
.collect(Collectors.toSet());
}
-
+
/**
* Returns a filtered set of objects that refer to the given <code>eObject</code>
* <p>
@@ -152,7 +152,7 @@
* <li>type (<code>targetClass</code>)</li>
* <li>reference (<code>targetEReference</code>)</li>
* </ul>
- *
+ *
* @param eObject
* @param targetClass
* @param targetEReference
@@ -162,7 +162,7 @@
checkArgument(eObject != null, ARG_OBJECT_MESSAGE);
checkArgument(targetEReference != null, ARG_TARGET_REFERENCE_MESSAGE);
checkArgument(targetClass != null, ARG_CLASS_MESSAGE);
-
+
return getOrCreateAmaltheaAdapter(eObject).getNonNavigableInverseReferences(eObject)
.stream()
.filter(setting -> setting.getEStructuralFeature() == targetEReference)
@@ -174,7 +174,7 @@
public static IReferable getEObjectByID(final @NonNull Notifier context, final @Nullable String id) {
checkArgument(context != null, ARG_NOTIFIER_MESSAGE);
-
+
if (id == null || id.isEmpty()) return null;
int beginIndex = id.contains("/") ? id.lastIndexOf('/') + 1 : 0;
@@ -186,7 +186,7 @@
for (IReferable elem : getElements(context, name, IReferable.class)) {
// first check the type because computation of unique name is more expensive
if (id.endsWith(elem.eClass().getName()) && id.equals(elem.getUniqueName())) {
- return elem;
+ return elem;
}
}
}
@@ -196,10 +196,10 @@
public static List<Set<IReferable>> getObjectsWithConflictingNames(final @NonNull Notifier context) {
checkArgument(context != null, ARG_NOTIFIER_MESSAGE);
-
+
// call index
@NonNull List<@NonNull Set<@NonNull IReferable>> list = getOrCreateAmaltheaAdapter(context).getObjectsWithConflictingNames();
-
+
// filter scope
List<Set<IReferable>> result = new ArrayList<>();
for (Set<IReferable> initialSet : list) {
@@ -208,7 +208,7 @@
result.add(filteredSet);
}
}
-
+
return result;
}
@@ -216,27 +216,27 @@
* Creates the index explicitly. If the index is already available the method will have no effect.
* <p>
* This method is optional. Normally the index will be built on demand.
- *
+ *
* @param eObject
*/
public static void buildIndex(final @NonNull Notifier context) {
checkArgument(context != null, ARG_NOTIFIER_MESSAGE);
-
+
getOrCreateAmaltheaAdapter(context);
}
-
+
/**
* Deletes the object from its {@link EObject#eResource containing} resource
* and/or its {@link EObject#eContainer containing} object as well as from any
* other feature that references it within the enclosing root context
* (resource set, resource or root object). Contained children of the object
* are similarly removed from any features that reference them.
- *
+ *
* @param eObject object to delete
*/
public static void delete(final @NonNull EObject eObject) {
checkArgument(eObject != null, ARG_OBJECT_MESSAGE);
-
+
ArrayList<EObject> list = new ArrayList<>();
list.add(eObject);
deleteAll(list, true);
@@ -249,12 +249,12 @@
* other feature that references it within the enclosing root context
* (resource set, resource or root object). Contained children of the object
* are similarly removed from any features that reference them.
- *
+ *
* @param eObjects objects to delete
*/
public static void deleteAll(final @NonNull Collection<? extends EObject> eObjects) {
checkArgument(eObjects != null, ARG_COLLECTION_MESSAGE);
-
+
deleteAll(eObjects, true);
}
@@ -266,23 +266,23 @@
* (resource set, resource or root object).
* If recursive is true, contained children of the object are similarly removed
* from any features that reference them.
- *
+ *
* @param eObjects objects to delete
* @param recursive true: contained children should also be deleted
*/
public static void deleteAll(final @NonNull Collection<? extends EObject> eObjects, boolean recursive) {
checkArgument(eObjects != null, ARG_COLLECTION_MESSAGE);
-
+
@SuppressWarnings("null")
Set<@NonNull ? extends EObject> objectsToDelete = eObjects.stream()
.filter(Objects::nonNull).collect(Collectors.toSet());
-
+
// extended argument check: ensure a common context
-
+
Notifier commonContext = ensureCommonContext(objectsToDelete);
if (commonContext == null)
return;
-
+
// collect objects to delete
Set<EObject> eAllObjects = new HashSet<>();
@@ -297,9 +297,9 @@
}
// add original objects
eAllObjects.addAll(objectsToDelete);
-
+
// delete the objects
-
+
final AmaltheaCrossReferenceAdapter amaltheaAdapter = getOrCreateAmaltheaAdapter(commonContext);
for (final EObject eObject : eAllObjects) {
final Collection<Setting> inverseReferences = amaltheaAdapter.getInverseReferences(eObject);
@@ -330,7 +330,7 @@
/**
* Finds elements by class
- *
+ *
* @param context EObject, Resource or ResourceSet
* @param targetClass for example: <code>Label.class</code>
* @return Set of named objects (INamed)
@@ -338,15 +338,15 @@
public static <T extends INamed> Set<T> getElements(final @NonNull Notifier context, final @NonNull Class<T> targetClass) {
checkArgument(context != null, ARG_NOTIFIER_MESSAGE);
checkArgument(targetClass != null, ARG_CLASS_MESSAGE);
-
+
@NonNull Set<@NonNull T> elements = getOrCreateAmaltheaAdapter(context).getElements(targetClass);
-
+
return filterElements(context, elements);
}
/**
* Finds elements by name and class
- *
+ *
* @param context EObject, Resource or ResourceSet
* @param name String
* @param targetClass for example: <code>Label.class</code>
@@ -357,15 +357,15 @@
checkArgument(context != null, ARG_NOTIFIER_MESSAGE);
checkArgument(name != null, ARG_NAME_MESSAGE);
checkArgument(targetClass != null, ARG_CLASS_MESSAGE);
-
+
@NonNull Set<@NonNull T> elements = getOrCreateAmaltheaAdapter(context).getElements(name, targetClass);
-
+
return filterElements(context, elements);
}
/**
* Finds elements by name pattern and class
- *
+ *
* @param context EObject, Resource or ResourceSet
* @param namePattern for example: <code>Pattern.compile("Prefix_.*")</code>
* @param targetClass for example: <code>Label.class</code>
@@ -376,15 +376,15 @@
checkArgument(context != null, ARG_NOTIFIER_MESSAGE);
checkArgument(namePattern != null, ARG_PATTERN_MESSAGE);
checkArgument(targetClass != null, ARG_CLASS_MESSAGE);
-
+
@NonNull Set<@NonNull T> elements = getOrCreateAmaltheaAdapter(context).getElements(namePattern, targetClass);
-
+
return filterElements(context, elements);
}
/**
* Dumps adapter info to a print stream
- *
+ *
* @param context EObject, Resource or ResourceSet
* @param info content selector <ul>
* <li> 1 - basic adapter info (resources, size of maps)
@@ -397,7 +397,7 @@
checkArgument(stream != null, ARG_STREAM_MESSAGE);
AmaltheaCrossReferenceAdapter adapter = getOrCreateAmaltheaAdapter(context);
-
+
switch (info) {
case 1: adapter.dumpInfo(stream); break;
case 2: adapter.dumpCrossReferenceMap(stream); break;
@@ -414,7 +414,7 @@
return (AmaltheaCrossReferenceAdapter) adapter;
}
}
-
+
// Create Amalthea adapter
final AmaltheaCrossReferenceAdapter amaltheaAdapter = new AmaltheaCrossReferenceAdapter();
adapters.add(amaltheaAdapter);
@@ -442,10 +442,10 @@
if (resourceSet != null) {
return resourceSet;
}
-
+
return resource;
}
-
+
/**
* Gets the root context of a Notifier (EObject, Resource or Resource Set)
*/
@@ -459,7 +459,7 @@
return notifier;
}
-
+
/**
* Gets the resource of a Notifier (EObject, Resource or Resource Set)
*/
@@ -486,7 +486,7 @@
.filter(e -> e.eResource().getURI().trimSegments(1).equals(folderUri))
.collect(Collectors.toSet());
}
-
+
return elements;
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaMerger.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaMerger.java
index b05195f..579b8ad 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaMerger.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaMerger.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -42,24 +42,24 @@
* Add the contained elements of the input models to the main model.
* Only major elements of the model (with their containments) are added.
* In case of name conflicts the affected elements will be omitted.
- *
+ *
* @param mainModel model that is extended
* @param inputs list of models that contain the additional elements
*/
public static void addElements(final @NonNull Amalthea mainModel, final @NonNull Collection<Amalthea> inputs) {
checkArgument(mainModel != null, "Model argument is null, expected: Amalthea");
checkArgument(inputs != null, "Collection argument is null, expected: Collection<Amalthea>");
-
+
if (inputs.isEmpty()) return; // done
-
+
final Copier copier = new Copier(true, true);
-
+
for (Amalthea model : inputs) {
final Amalthea tmpModel = (Amalthea) copier.copy(model);
if (tmpModel == null) continue;
-
+
addPropertiesIfAbsent(mainModel, tmpModel);
-
+
addCommonElements(mainModel, tmpModel);
addSwModel(mainModel, tmpModel);
addHwModel(mainModel, tmpModel);
@@ -79,21 +79,21 @@
final CommonElements main = mainModel.getCommonElements();
final CommonElements tmp = tmpModel.getCommonElements();
if (tmp == null) return;
-
+
if (main == null) {
mainModel.setCommonElements(tmp);
} else {
addIfAbsent(main.getCoreClassifiers(), tmp.getCoreClassifiers());
addIfAbsent(main.getMemoryClassifiers(), tmp.getMemoryClassifiers());
addIfAbsent(main.getTags(), tmp.getTags());
- }
+ }
}
private static void addSwModel(Amalthea mainModel, Amalthea tmpModel) {
final SWModel main = mainModel.getSwModel();
final SWModel tmp = tmpModel.getSwModel();
if (tmp == null) return;
-
+
if (main == null) {
mainModel.setSwModel(tmp);
} else {
@@ -111,14 +111,14 @@
addIfAbsent(main.getSections(), tmp.getSections());
addIfAbsent(main.getTasks(), tmp.getTasks());
addIfAbsent(main.getTypeDefinitions(), tmp.getTypeDefinitions());
- }
+ }
}
private static void addHwModel(Amalthea mainModel, Amalthea tmpModel) {
final HWModel main = mainModel.getHwModel();
final HWModel tmp = tmpModel.getHwModel();
if (tmp == null) return;
-
+
if (main == null) {
mainModel.setHwModel(tmp);
} else {
@@ -126,41 +126,41 @@
addIfAbsent(main.getDomains(), tmp.getDomains());
addIfAbsent(main.getFeatureCategories(), tmp.getFeatureCategories());
addIfAbsent(main.getStructures(), tmp.getStructures());
- }
+ }
}
private static void addOsModel(Amalthea mainModel, Amalthea tmpModel) {
final OSModel main = mainModel.getOsModel();
final OSModel tmp = tmpModel.getOsModel();
if (tmp == null) return;
-
+
if (main == null) {
mainModel.setOsModel(tmp);
} else {
addAll(main.getOperatingSystems(), tmp.getOperatingSystems());
addIfAbsent(main.getOsOverheads(), tmp.getOsOverheads());
addIfAbsent(main.getSemaphores(), tmp.getSemaphores());
- }
+ }
}
private static void addStimuliModel(Amalthea mainModel, Amalthea tmpModel) {
final StimuliModel main = mainModel.getStimuliModel();
final StimuliModel tmp = tmpModel.getStimuliModel();
if (tmp == null) return;
-
+
if (main == null) {
mainModel.setStimuliModel(tmp);
} else {
addIfAbsent(main.getClocks(), tmp.getClocks());
addIfAbsent(main.getStimuli(), tmp.getStimuli());
- }
+ }
}
private static void addConstraintsModel(Amalthea mainModel, Amalthea tmpModel) {
final ConstraintsModel main = mainModel.getConstraintsModel();
final ConstraintsModel tmp = tmpModel.getConstraintsModel();
if (tmp == null) return;
-
+
if (main == null) {
mainModel.setConstraintsModel(tmp);
} else {
@@ -173,39 +173,39 @@
addIfAbsent(main.getDataCoherencyGroups(), tmp.getDataCoherencyGroups());
addIfAbsent(main.getDataStabilityGroups(), tmp.getDataStabilityGroups());
addIfAbsent(main.getPhysicalSectionConstraints(), tmp.getPhysicalSectionConstraints());
- }
+ }
}
private static void addEventModel(Amalthea mainModel, Amalthea tmpModel) {
final EventModel main = mainModel.getEventModel();
final EventModel tmp = tmpModel.getEventModel();
if (tmp == null) return;
-
+
if (main == null) {
mainModel.setEventModel(tmp);
} else {
addIfAbsent(main.getEvents(), tmp.getEvents());
- }
+ }
}
private static void addPropertyConstraintsModel(Amalthea mainModel, Amalthea tmpModel) {
final PropertyConstraintsModel main = mainModel.getPropertyConstraintsModel();
final PropertyConstraintsModel tmp = tmpModel.getPropertyConstraintsModel();
if (tmp == null) return;
-
+
if (main == null) {
mainModel.setPropertyConstraintsModel(tmp);
} else {
addAll(main.getAllocationConstraints(), tmp.getAllocationConstraints());
addAll(main.getMappingConstraints(), tmp.getMappingConstraints());
- }
+ }
}
private static void addMappingModel(Amalthea mainModel, Amalthea tmpModel) {
final MappingModel main = mainModel.getMappingModel();
final MappingModel tmp = tmpModel.getMappingModel();
if (tmp == null) return;
-
+
if (main == null) {
mainModel.setMappingModel(tmp);
} else {
@@ -218,37 +218,37 @@
addAll(main.getSchedulerAllocation(), tmp.getSchedulerAllocation());
addAll(main.getMemoryMapping(), tmp.getMemoryMapping());
addIfAbsent(main.getPhysicalSectionMapping(), tmp.getPhysicalSectionMapping());
- }
+ }
}
private static void addComponentsModel(Amalthea mainModel, Amalthea tmpModel) {
final ComponentsModel main = mainModel.getComponentsModel();
final ComponentsModel tmp = tmpModel.getComponentsModel();
if (tmp == null) return;
-
+
if (main == null) {
mainModel.setComponentsModel(tmp);
} else {
addIfAbsent(main.getComponents(), tmp.getComponents());
addIfAbsent(main.getSystems(), tmp.getSystems());
- }
+ }
}
private static void addConfigModel(Amalthea mainModel, Amalthea tmpModel) {
final ConfigModel main = mainModel.getConfigModel();
final ConfigModel tmp = tmpModel.getConfigModel();
if (tmp == null) return;
-
+
if (main == null) {
mainModel.setConfigModel(tmp);
} else {
addAll(main.getEventsToTrace(), tmp.getEventsToTrace());
- }
+ }
}
private static <T extends BaseObject> void addAll(final EList<T> main, final EList<T> input) {
if (main == null || input == null) return;
-
+
main.addAll(input);
}
@@ -260,11 +260,11 @@
if (object != null)
uniqueNames.add(object.getUniqueName());
}
-
+
final Collection<T> objectsToMove = new ArrayList<>();
for (T object : input) {
if (object == null) continue;
-
+
if (uniqueNames.contains(object.getUniqueName())) {
// skip entry
} else {
@@ -272,14 +272,14 @@
objectsToMove.add(object);
}
}
-
+
// this part changes the containment of the objects
main.addAll(objectsToMove);
}
private static void addPropertiesIfAbsent(final IAnnotatable main, final IAnnotatable input) {
if (main == null || input == null) return;
-
+
for (Entry<String, Value> property : input.getCustomProperties()) {
if (main.getCustomProperties().containsKey(property.getKey())) {
// skip entry
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaServices.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaServices.java
index f99150e..ce24294 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaServices.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaServices.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -94,7 +94,7 @@
public static final List<TimeUnit> TIME_UNIT_LIST = Collections
.unmodifiableList(Arrays.asList(TimeUnit.PS, TimeUnit.NS, TimeUnit.US, TimeUnit.MS, TimeUnit.S));
-
+
public static <T extends EObject> T getContainerOfType(final @NonNull EObject object, final @NonNull Class<T> type) {
checkArgument(object != null, ARG_OBJECT_MESSAGE);
checkArgument(type != null, ARG_CLASS_MESSAGE);
@@ -213,7 +213,7 @@
/**
* This method is used to convert the value of Time/TimeObject element's value
* to BigInteger in Pico Seconds
- *
+ *
* @param time Time object
* @return value BigInteger in Pico Seconds
*/
@@ -234,23 +234,23 @@
return timeValue.multiply(INT_10_POW_9);
case S:
return timeValue.multiply(INT_10_POW_12);
-
+
default:
return BigInteger.ZERO; // should never happen
}
}
-
+
/**
* This method is used to convert a time with associated time unit
* to BigDecimal in seconds
- *
+ *
* @param time time as double
* @param timeUnit the time unit
* @return value BigDecimal in seconds
*/
public static BigDecimal convertToSeconds(final double time, final @NonNull TimeUnit timeUnit) {
checkArgument(timeUnit != TimeUnit._UNDEFINED_, ARG_QUANTITY_MESSAGE, TIME);
-
+
BigDecimal timeValue = BigDecimal.valueOf(time);
switch (timeUnit) {
case S:
@@ -263,25 +263,25 @@
return timeValue.divide(DEC_10_POW_9);
case PS:
return timeValue.divide(DEC_10_POW_12);
-
+
default:
return BigDecimal.ZERO; // should never happen
}
}
-
+
/**
* This method is used to convert the value of Time/TimeObject element's value
* to BigDecimal in seconds
- *
+ *
* @param time Time object
* @return value BigDecimal in seconds
*/
public static BigDecimal convertToSeconds(final @NonNull Time time) {
checkArgument(time != null, ARG_NULL_MESSAGE, TIME);
-
+
@SuppressWarnings("null")
@NonNull TimeUnit timeUnit = time.getUnit();
-
+
return convertToSeconds(time.getValue().doubleValue(), timeUnit);
}
@@ -300,7 +300,7 @@
return BigDecimal.valueOf(freqValue).multiply(DEC_10_POW_6);
case GHZ:
return BigDecimal.valueOf(freqValue).multiply(DEC_10_POW_9);
-
+
default:
return BigDecimal.ZERO; // should never happen
}
@@ -319,7 +319,7 @@
return BigDecimal.valueOf(voltValue).multiply(DEC_10_POW_3);
case V:
return BigDecimal.valueOf(voltValue).multiply(DEC_10_POW_6);
-
+
default:
return BigDecimal.ZERO; // should never happen
}
@@ -328,7 +328,7 @@
/**
* This method is used to compare DataRate objects on the basis of their values
* (obtained in bit per second after applying the conversion based on DataRateUnit)
- *
+ *
* @param r1 DataRate object
* @param r2 DataRate object
* @return -1 ,0 or 1
@@ -336,24 +336,24 @@
public static int compareDataRates(final @NonNull DataRate r1, final @NonNull DataRate r2) {
checkDataRateArgument(r1);
checkDataRateArgument(r2);
-
+
if (r1 == r2) {
return 0;
}
-
+
BigInteger value1 = convertToBitPerSecond(r1);
BigInteger value2 = convertToBitPerSecond(r2);
-
+
assert value1 != null;
assert value2 != null;
-
+
return value1.compareTo(value2);
}
/**
* This method is used to compare Time objects on the basis of their values
* (obtained in pico seconds after applying the conversion based on TimeUnit)
- *
+ *
* @param t1 Time object
* @param t2 Time object
* @return -1 ,0 or 1
@@ -379,7 +379,7 @@
* This method takes a time (in value and unit) and adjusts the TimeUnit so that
* the value is as small as possible, without losing precision e.g. 1000us is
* converted to 1ms
- *
+ *
* @param time
* @return new Time with adjusted value and unit
*/
@@ -496,13 +496,13 @@
/**
* Computes the average (mean) of the truncated normal distribution
- *
+ *
* <p>
* See
* <a href="https://en.wikipedia.org/wiki/Truncated_normal_distribution" target=
* "_top">Truncated normal distribution (Wikipedia)</a>
* </p>
- *
+ *
* @param a lower bound (null = not truncated from below)
* @param b upper bound (null = not truncated from above)
* @param mean mean or expectation of the (unlimited) distribution
@@ -511,10 +511,10 @@
*/
public static @NonNull Time getAverageOfTruncatedNormalDistribution(final @Nullable Time a, final @Nullable Time b, final @NonNull Time mean, final @NonNull Time sd) {
checkTimeArgument(mean);
-
+
// simple result for the unlimited distribution
if (a == null && b == null) return mean;
-
+
checkTimeArgument(sd);
if (a != null) checkTimeArgument(a);
@@ -523,7 +523,7 @@
// if a == b then return immediately (computation of factor will fail)
if (a != null && b != null && a.compareTo(b) == 0) return createTime(a.getValue(), a.getUnit());
-
+
Double alpha = null;
Double beta = null;
if (a != null) { // truncated from below
@@ -543,13 +543,13 @@
/**
* Computes the average (mean) of the truncated normal distribution
- *
+ *
* <p>
* See
* <a href="https://en.wikipedia.org/wiki/Truncated_normal_distribution" target=
* "_top">Truncated normal distribution (Wikipedia)</a>
* </p>
- *
+ *
* @param inputA lower bound (null = not truncated from below)
* @param inputB upper bound (null = not truncated from above)
* @param mean mean or expectation of the (unlimited) distribution
@@ -559,10 +559,10 @@
public static double getAverageOfTruncatedNormalDistribution(final @Nullable Number inputA, final @Nullable Number inputB, double mean, double sd) {
// simple result for the unlimited distribution
if (inputA == null && inputB == null) return mean;
-
+
// if a == b then return immediately (computation of factor will fail)
if (inputA != null && inputB != null && inputA.equals(inputB)) return inputA.doubleValue();
-
+
final Double a = (inputA != null) ? inputA.doubleValue() : null;
final Double b = (inputB != null) ? inputB.doubleValue() : null;
if (a != null && b != null) checkArgument(a <= b, ARG_BOUNDS_MESSAGE);
@@ -610,7 +610,7 @@
checkArgument(a.compareTo(b) <= 0, ARG_BOUNDS_MESSAGE);
checkArgument(alpha > 0, ARG_POSITIVE_VALUE_MESSAGE);
checkArgument(beta > 0, ARG_POSITIVE_VALUE_MESSAGE);
-
+
double ratio = 1.0 / (1.0 + (beta / alpha)); // mean in interval [0,1] is 1 / (1 + (beta/alpha))
return addTime(a, multiply(subtractTime(b, a), ratio));
}
@@ -643,7 +643,7 @@
}
}
}
-
+
@SuppressWarnings("null")
final @NonNull EReference eReference = AmaltheaPackage.eINSTANCE.getISystem_InnerPorts();
return unmodifiableEcoreEList(system, eReference, qualifiedPorts);
@@ -659,7 +659,7 @@
for (HwModule module : getAllModules(struct)) {
ports.addAll(module.getPorts());
}
-
+
@SuppressWarnings("null")
final @NonNull EReference eReference = AmaltheaPackage.eINSTANCE.getHwStructure_InnerPorts();
return unmodifiableEcoreEList(struct, eReference, ports);
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaServices2.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaServices2.java
index e1164f9..0b1ad4a 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaServices2.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaServices2.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -45,9 +45,9 @@
private static boolean isInvalid(final @NonNull Time time) {
return (time.getValue() == null || time.getUnit() == TimeUnit._UNDEFINED_);
}
-
+
// ***** delegate methods *****
-
+
private static @NonNull Time addTime(final @NonNull Time t1, final @NonNull Time t2) {
return AmaltheaServices.addTime(t1, t2);
}
@@ -71,10 +71,9 @@
// ***** Deviations *****
public static @Nullable Time getAverage(final @Nullable Time lowerBound, final @Nullable Time upperBound) {
- if (lowerBound == null || upperBound == null) return null;
- if (isInvalid(lowerBound) || isInvalid(upperBound)) return null;
+ if (lowerBound == null || upperBound == null || isInvalid(lowerBound) || isInvalid(upperBound)) return null;
if (compareTimes(lowerBound, upperBound) > 0) return null;
-
+
return addTime(lowerBound, multiply(subtractTime(upperBound, lowerBound), 0.5));
}
@@ -83,7 +82,7 @@
double lower = lowerBound.doubleValue();
double upper = upperBound.doubleValue();
if (lower > upper) return null;
-
+
return lower + (upper - lower) / 2.0;
}
@@ -92,15 +91,15 @@
Time sum = createTime(BigInteger.ZERO, TimeUnit.PS);
for (TimeHistogramEntry entry : coll) {
if (entry == null) return null;
-
+
Time avg = getAverage(entry.getLowerBound(), entry.getUpperBound());
if (avg == null) return null;
-
+
count = count + entry.getOccurrences();
sum = addTime(sum, multiply(avg, entry.getOccurrences()));
}
if (count == 0) return null;
-
+
return multiply(sum, 1.0 / count);
}
@@ -109,16 +108,16 @@
double sum = 0.0;
for (DiscreteValueHistogramEntry entry : coll) {
if (entry == null) return null;
-
+
Double avg = getAverage(entry.getLowerBound(), entry.getUpperBound());
if (avg == null) return null;
-
+
count += entry.getOccurrences();
sum += avg * entry.getOccurrences();
}
if (count == 0) return null;
-
- return sum / (double) count;
+
+ return sum / count;
}
public static @Nullable Double getAverage_CV(final @NonNull Collection<ContinuousValueHistogramEntry> coll) {
@@ -126,26 +125,26 @@
double sum = 0.0;
for (ContinuousValueHistogramEntry entry : coll) {
if (entry == null) return null;
-
+
Double avg = getAverage(entry.getLowerBound(), entry.getUpperBound());
if (avg == null) return null;
-
+
count += entry.getOccurrences();
sum += avg * entry.getOccurrences();
}
if (count == 0) return null;
-
- return sum / (double) count;
+
+ return sum / count;
}
public static @Nullable Time getLowerBound_Time(final @NonNull Collection<? extends TimeInterval> coll) {
Time min = null;
for (TimeInterval interval : coll) {
if (interval == null) return null;
-
+
Time bound = interval.getLowerBound();
if (bound == null || isInvalid(bound)) return null;
-
+
if (min == null || compareTimes(min, bound) > 0)
min = bound;
}
@@ -156,9 +155,9 @@
Long min = null;
for (DiscreteValueInterval interval : coll) {
if (interval == null) return null;
-
+
Long bound = interval.getLowerBound();
-
+
if (min == null || min > bound)
min = bound;
}
@@ -169,24 +168,24 @@
Double min = null;
for (ContinuousValueInterval interval : coll) {
if (interval == null) return null;
-
+
Double bound = interval.getLowerBound();
if (bound == null) return null;
-
+
if (min == null || min > bound)
min = bound;
}
return min;
}
-
+
public static @Nullable Time getUpperBound_Time(final @NonNull Collection<? extends TimeInterval> coll) {
Time max = null;
for (TimeInterval interval : coll) {
if (interval == null) return null;
-
+
Time bound = interval.getUpperBound();
if (bound == null || isInvalid(bound)) return null;
-
+
if (max == null || compareTimes(bound, max) > 0)
max = bound;
}
@@ -197,10 +196,10 @@
Long max = null;
for (DiscreteValueInterval interval : coll) {
if (interval == null) return null;
-
+
Long bound = interval.getUpperBound();
if (bound == null) return null;
-
+
if (max == null || max < bound)
max = bound;
}
@@ -211,10 +210,10 @@
Double max = null;
for (ContinuousValueInterval interval : coll) {
if (interval == null) return null;
-
+
Double bound = interval.getUpperBound();
if (bound == null) return null;
-
+
if (max == null || max < bound)
max = bound;
}
@@ -222,15 +221,13 @@
}
public static @Nullable Time getAverageOfTruncatedNormalDistribution(final @Nullable Time a, final @Nullable Time b, final @Nullable Time mean, final @Nullable Time sd) {
- if (mean == null || sd == null) return null;
- if (isInvalid(mean) || isInvalid(sd)) return null;
- if (a != null && isInvalid(a)) return null;
- if (b != null && isInvalid(b)) return null;
-
+ if (mean == null || sd == null || isInvalid(mean) || isInvalid(sd)) return null;
+ if ((a != null && isInvalid(a)) || (b != null && isInvalid(b))) return null;
+
if (a != null && b != null && compareTimes(a, b) > 0) return null;
-
+
if (sd.getValue().signum() < 1) return null;
-
+
Double alpha = null;
Double beta = null;
if (a != null) { // truncated from below
@@ -249,9 +246,7 @@
if (mean == null || mean.isNaN() || mean.isInfinite()) return null;
if (sd == null || sd.isNaN() || sd.isInfinite()) return null;
- if (a != null && b != null && a.doubleValue() > b.doubleValue()) return null;
-
- if (sd <= 0.0) return null;
+ if ((a != null && b != null && a.doubleValue() > b.doubleValue()) || (sd <= 0.0)) return null;
double result = AmaltheaServices.getAverageOfTruncatedNormalDistribution(a, b, mean, sd);
@@ -260,11 +255,9 @@
public static @Nullable Time getAverageOfBetaDistribution(final @Nullable Time a, final @Nullable Time b, final @Nullable Double alpha, final @Nullable Double beta) {
if (a == null || b == null || alpha == null || beta == null) return null;
- if (isInvalid(a) || isInvalid(b)) return null;
- if (compareTimes(a, b) > 0) return null;
- if (alpha <= 0) return null;
+ if (isInvalid(a) || isInvalid(b) || (compareTimes(a, b) > 0) || (alpha <= 0)) return null;
if (beta <= 0) return null;
-
+
double ratio = 1.0 / (1.0 + (beta / alpha)); // mean in interval [0,1] is 1 / (1 + (beta/alpha))
return addTime(a, multiply(subtractTime(b, a), ratio));
}
@@ -273,9 +266,7 @@
if (a == null || b == null || alpha == null || beta == null) return null;
double a_double = a.doubleValue();
double b_double = b.doubleValue();
- if (a_double > b_double) return null;
- if (alpha <= 0) return null;
- if (beta <= 0) return null;
+ if ((a_double > b_double) || (alpha <= 0) || (beta <= 0)) return null;
double ratio = 1.0 / (1.0 + (beta / alpha)); // mean in interval [0,1] is 1 / (1 + (beta/alpha))
return a_double + (b_double - a_double) * ratio;
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaValidations.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaValidations.java
index 0543617..8ffb49e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaValidations.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/AmaltheaValidations.java
@@ -1,11 +1,11 @@
/* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -53,7 +53,7 @@
return checkMinAvgMax(obj, diagnostics, obj.getLowerBound(), getAverage(obj), obj.getUpperBound());
}
- public static boolean validateInvariants(DiscreteValueInterval obj, DiagnosticChain diagnostics) {
+ public static boolean validateInvariants(DiscreteValueInterval obj, DiagnosticChain diagnostics) {
return checkMinAvgMax(obj, diagnostics, toDouble(obj.getLowerBound()), getAverage(obj), toDouble(obj.getUpperBound()));
}
@@ -62,21 +62,21 @@
}
// ******** Truncated distribution bounds (mean is not limited) ********
-
+
public static boolean validateInvariants(TruncatedTimeDistribution obj, DiagnosticChain diagnostics) {
return checkMinAvgMax(obj, diagnostics, obj.getLowerBound(), null, obj.getUpperBound());
}
-
+
public static boolean validateInvariants(TruncatedDiscreteValueDistribution obj, DiagnosticChain diagnostics) {
return checkMinAvgMax(obj, diagnostics, toDouble(obj.getLowerBound()), null, toDouble(obj.getUpperBound()));
}
-
+
public static boolean validateInvariants(TruncatedContinuousValueDistribution obj, DiagnosticChain diagnostics) {
return checkMinAvgMax(obj, diagnostics, obj.getLowerBound(), null, obj.getUpperBound());
}
// private methods to get the given average / mean value
-
+
private static Time getAverage(TimeInterval obj) {
Time avg = null;
if (obj instanceof TimeStatistics) {
@@ -112,10 +112,10 @@
private static Double toDouble(Long value) {
if (value == null) return null;
-
+
return value.doubleValue();
}
-
+
private static <T extends Comparable<T>> boolean checkMinAvgMax(EObject obj, DiagnosticChain diagnostics, T min, T avg, T max) {
boolean isValid = true;
if (min != null && max != null && min.compareTo(max) > 0) {
@@ -132,7 +132,7 @@
}
return isValid;
}
-
+
// ******** IReferable name ********
public static boolean validateInvariants(IReferable obj, DiagnosticChain diagnostics) {
@@ -144,7 +144,7 @@
}
// ******** Modes ********
-
+
public static boolean validateInvariants(ModeLabel obj, DiagnosticChain diagnostics) {
return checkModeAndValue(obj, PACKAGE.getModeLabel_InitialValue(), obj.getMode(), obj.getInitialValue(), diagnostics);
}
@@ -155,7 +155,7 @@
addError(obj, PACKAGE.getModeValue_Label(), obj.eClass().getName() + ": missing mode label", diagnostics);
return false;
}
-
+
return checkModeAndValue(obj, PACKAGE.getModeValue_Value(), modeLabel.getMode(), obj.getValue(), diagnostics);
}
@@ -167,18 +167,18 @@
}
if (obj.getAccess() == ModeLabelAccessEnum.SET) {
- return checkModeAndValue(obj, PACKAGE.getModeLabelAccess_Value(), modeLabel.getMode(), obj.getValue(), diagnostics);
+ return checkModeAndValue(obj, PACKAGE.getModeLabelAccess_Value(), modeLabel.getMode(), obj.getValue(), diagnostics);
}
-
+
return true;
}
-
+
private static boolean checkModeAndValue(EObject obj, EStructuralFeature feature, Mode mode, String value, DiagnosticChain diagnostics) {
if (mode == null) {
addWarning(obj, feature, obj.eClass().getName() + ": unknown value type (mode)", diagnostics);
return false;
}
-
+
if (value == null) {
if (feature.getLowerBound() != 0) {
addError(obj, feature, obj.eClass().getName() + ": missing value", diagnostics);
@@ -188,7 +188,7 @@
return true;
}
}
-
+
String trimmedValue = value.trim();
if (mode instanceof EnumMode) {
final EnumMode enumMode = (EnumMode) mode;
@@ -205,13 +205,13 @@
return false;
}
}
-
+
return true;
}
// private helper methods
-
+
private static void addWarning(EObject object, EStructuralFeature feature, String message, DiagnosticChain diagnostics) {
if (diagnostics != null) {
diagnostics.add(createIssue(Diagnostic.WARNING, object, feature, message));
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/AmaltheaBuilder.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/AmaltheaBuilder.java
index 4839e52..a6b2ff8 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/AmaltheaBuilder.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/AmaltheaBuilder.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -121,8 +121,8 @@
public <T extends EObject> void _reg(final @NonNull T object, final @NonNull String name) {
checkArgument(object != null, ARG_OBJECT_MESSAGE);
checkArgument(name != null, ARG_NAME_MESSAGE);
-
- this.objectRegistry.put(name, object);
+
+ objectRegistry.put(name, object);
}
//@SuppressWarnings("java:S100") // domain specific builder language
@@ -130,7 +130,7 @@
checkArgument(cl != null, ARG_CLASS_MESSAGE, "T extends EObject");
checkArgument(name != null, ARG_NAME_MESSAGE);
- final EObject obj = this.objectRegistry.get(name);
+ final EObject obj = objectRegistry.get(name);
return cl.cast(obj);
}
@@ -141,13 +141,13 @@
checkArgument(context != null, ARG_NOTIFIER_MESSAGE);
checkArgument(cl != null, ARG_CLASS_MESSAGE, "T extends INamed");
checkArgument(name != null, ARG_NAME_MESSAGE);
-
+
final Set<? extends T> resultSet = AmaltheaIndex.getElements(context, name, cl);
Iterator<? extends T> iterator = resultSet.iterator();
if (iterator.hasNext()) {
return iterator.next();
}
-
+
return cl.cast(null);
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/CommonElementsBuilder.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/CommonElementsBuilder.java
index bc6a55c..6320113 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/CommonElementsBuilder.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/CommonElementsBuilder.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/ConstraintsBuilder.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/ConstraintsBuilder.java
index cdb3919..6b7d86e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/ConstraintsBuilder.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/ConstraintsBuilder.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/DatatypeBuilder.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/DatatypeBuilder.java
index fde4192..e2ca153 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/DatatypeBuilder.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/DatatypeBuilder.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/HardwareBuilder.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/HardwareBuilder.java
index 8e9b2dd..7b99992 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/HardwareBuilder.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/HardwareBuilder.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/InstructionsBuilder.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/InstructionsBuilder.java
index fbc6a40..e48aab7 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/InstructionsBuilder.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/InstructionsBuilder.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -25,8 +25,8 @@
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
/**
- * Creates Need entries for Instructions
- *
+ * Creates Need entries for Instructions
+ *
* @deprecated (0.9.3) use {@link org.eclipse.app4mc.amalthea.model.Ticks} instead.
*/
@Deprecated
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/MappingBuilder.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/MappingBuilder.java
index 83d1265..927f211 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/MappingBuilder.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/MappingBuilder.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/OperatingSystemBuilder.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/OperatingSystemBuilder.java
index 7c691cc..a9ff047 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/OperatingSystemBuilder.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/OperatingSystemBuilder.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -68,13 +68,13 @@
container.getOsOverheads().add(obj);
initializer.apply(obj);
}
-
+
public void schedulerDefinition(final OSModel container, final Procedure1<SchedulerDefinition> initializer) {
final SchedulerDefinition obj = AmaltheaFactory.eINSTANCE.createSchedulerDefinition();
container.getSchedulerDefinitions().add(obj);
initializer.apply(obj);
}
-
+
public void parameterDefinition(final OSModel container, final Procedure1<SchedulingParameterDefinition> initializer) {
final SchedulingParameterDefinition obj = AmaltheaFactory.eINSTANCE.createSchedulingParameterDefinition();
container.getSchedulingParameterDefinitions().add(obj);
@@ -88,7 +88,7 @@
container.getTaskSchedulers().add(obj);
initializer.apply(obj);
}
-
+
public void schedulingParameter(final Scheduler container, final String parameterName, final Value parameterValue) {
final SchedulerDefinition sd = container.getDefinition();
final SchedulingParameterDefinition spd = sd.getAlgorithmParameters().stream().filter(
@@ -120,7 +120,7 @@
container.setParentAssociation(obj);
initializer.apply(obj);
}
-
+
public void schedulingParameter(final SchedulerAssociation container, final String parameterName,
final Value parameterValue) {
Scheduler sched = container.getParent();
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/SoftwareBuilder.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/SoftwareBuilder.java
index 261590f..49425fa 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/SoftwareBuilder.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/SoftwareBuilder.java
@@ -1,12 +1,12 @@
/**
* Copyright (c) 2018-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
*/
@@ -181,7 +181,7 @@
container.getModeLabels().add(obj);
initializer.apply(obj);
}
-
+
public void osEvent(final SWModel container, final Procedure1<OsEvent> initializer) {
final OsEvent obj = AmaltheaFactory.eINSTANCE.createOsEvent();
container.getEvents().add(obj);
@@ -197,7 +197,7 @@
}
// ********** Activity Graph **********
-
+
public void activityGraph(final Process container, final Procedure1<ActivityGraph> initializer) {
final ActivityGraph obj = AmaltheaFactory.eINSTANCE.createActivityGraph();
container.setActivityGraph(obj);
@@ -341,7 +341,7 @@
container.getItems().add(obj);
initializer.apply(obj);
}
-
+
public void eventMask(final ClearEvent clearEvent, final OsEvent...osEvents) {
final EventMask eventMask = AmaltheaFactory.eINSTANCE.createEventMask();
for(OsEvent osEvent:osEvents) {
@@ -351,7 +351,7 @@
}
clearEvent.setEventMask(eventMask);
}
-
+
public void eventMask(final WaitEvent waitEvent, final OsEvent...osEvents) {
final EventMask eventMask = AmaltheaFactory.eINSTANCE.createEventMask();
for(OsEvent osEvent:osEvents) {
@@ -361,7 +361,7 @@
}
waitEvent.setEventMask(eventMask);
}
-
+
public void eventMask(final SetEvent setEvent, final OsEvent...osEvents) {
final EventMask eventMask = AmaltheaFactory.eINSTANCE.createEventMask();
for(OsEvent osEvent:osEvents) {
@@ -395,22 +395,22 @@
container.getItems().add(obj);
initializer.apply(obj);
}
-
+
public void modeLabelAccess(final IActivityGraphItemContainer container, final Procedure1<ModeLabelAccess> initializer) {
final ModeLabelAccess obj = AmaltheaFactory.eINSTANCE.createModeLabelAccess();
container.getItems().add(obj);
initializer.apply(obj);
}
-
+
// ********** IActivityGraphItemContainer - Items - ChannelAccess **********
-
+
public void channelSend(final IActivityGraphItemContainer container, final Procedure1<ChannelSend> initializer) {
final ChannelSend obj = AmaltheaFactory.eINSTANCE.createChannelSend();
container.getItems().add(obj);
initializer.apply(obj);
}
-
-
+
+
public void channelReceive(final IActivityGraphItemContainer container, final Procedure1<ChannelReceive> initializer) {
final ChannelReceive obj = AmaltheaFactory.eINSTANCE.createChannelReceive();
container.getItems().add(obj);
@@ -424,9 +424,9 @@
container.getItems().add(obj);
initializer.apply(obj);
}
-
+
// ********** IActivityGraphItemContainer - Items - ServerCall **********
-
+
public void asynchronousServerCall(final IActivityGraphItemContainer container, final Procedure1<AsynchronousServerCall> initializer) {
final AsynchronousServerCall obj = AmaltheaFactory.eINSTANCE.createAsynchronousServerCall();
container.getItems().add(obj);
@@ -444,7 +444,7 @@
public void need(final ExecutionNeed container, final String key, final IDiscreteValueDeviation need) {
container.getNeeds().put(key, need);
}
-
+
// ********** IActivityGraphItemContainer - Items - Ticks **********
public void ticks(final IActivityGraphItemContainer container, final Procedure1<Ticks> initializer) {
@@ -466,7 +466,7 @@
public void extended(final Ticks container, final ProcessingUnitDefinition puDef, final IDiscreteValueDeviation ticks) {
container.getExtended().put(puDef, ticks);
}
-
+
// ********** IActivityGraphItemContainer - Items - to be extended **********
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/StimuliBuilder.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/StimuliBuilder.java
index 89e979c..9499eb2 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/StimuliBuilder.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/builder/StimuliBuilder.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -23,19 +23,19 @@
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
public class StimuliBuilder {
-
+
public void periodicStimulus(final StimuliModel container, Procedure1<PeriodicStimulus> initializer) {
final PeriodicStimulus obj = AmaltheaFactory.eINSTANCE.createPeriodicStimulus();
container.getStimuli().add(obj);
initializer.apply(obj);
}
-
+
public void variableRateStimulus(final StimuliModel container, Procedure1<VariableRateStimulus> initializer) {
final VariableRateStimulus obj = AmaltheaFactory.eINSTANCE.createVariableRateStimulus();
container.getStimuli().add(obj);
initializer.apply(obj);
}
-
+
public void clockStepList(final StimuliModel container, Procedure1<ClockStepList> initializer) {
final ClockStepList obj = AmaltheaFactory.eINSTANCE.createClockStepList();
container.getClocks().add(obj);
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/check/ModelStructureCheck.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/check/ModelStructureCheck.java
index 3ed5107..f77ac63 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/check/ModelStructureCheck.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/check/ModelStructureCheck.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -43,9 +43,9 @@
/**
* Model checker for debugging: Checks a single file model.
- *
+ *
* Illegal references to non contained elements will be printed to stream.
- *
+ *
* @param model to-be-checked model (self contained)
* @param stream output stream for messages (<code>null</code> -> disable messages)
* @param verbose <code>true</code> -> prints all performed checks
@@ -57,9 +57,9 @@
/**
* Model checker for debugging: Checks a model that consists of multiple files.
- *
+ *
* Illegal references to non contained elements will be printed to stream.
- *
+ *
* @param models to-be-checked logical model (multiple split models)
* @param stream output stream for messages (<code>null</code> -> disable messages)
* @param verbose <code>true</code> -> prints all performed checks
@@ -90,17 +90,17 @@
// check references to top level types
- for (Amalthea amalthea : models) {
+ for (Amalthea amalthea : models) {
boolean ok = checkObjectReferences(amalthea, idMap, out, verbose);
result = result && ok;
}
-
+
// cleanup
idMap.clear();
-
+
out.println("++++ Model check finished at " + dateFormat.format(new Date()));
}
-
+
return result;
}
@@ -108,7 +108,7 @@
final TreeIterator<EObject> iterator = EcoreUtil.getAllContents(model, false);
while (iterator.hasNext()) {
final EObject element = iterator.next();
-
+
if (element instanceof IReferable) {
final IReferable refObj = (IReferable) element;
final String id = refObj.getUniqueName();
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaEObjectImpl.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaEObjectImpl.java
index a3404ac..8059b5e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaEObjectImpl.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaEObjectImpl.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResource.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResource.java
index 5ecc483..26bd6ad 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResource.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResource.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -103,7 +103,7 @@
}
private URI convertToAbsoluteFileURI(final URI uri) {
- URI result = null;
+ URI result;
// Try to convert to absolute file URI
result = CommonPlugin.asLocalURI(uri);
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResourceFactory.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResourceFactory.java
index a480f93..add0e28 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResourceFactory.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResourceFactory.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResourceHandler.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResourceHandler.java
index 0b88d6f..7097578 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResourceHandler.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResourceHandler.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -40,7 +40,7 @@
public void postLoad(XMLResource resource, InputStream inputStream, Map<?, ?> options) {
// Keep cache for intrinsic IDs
// It will be used to resolve cross-resource references
-
+
resetExtrinsicIDs(resource);
}
@@ -51,7 +51,7 @@
if (resource instanceof AmaltheaResource) {
((AmaltheaResource) resource).setIntrinsicIDToEObjectMap(null);
}
-
+
setExtrinsicIDs(resource);
}
@@ -62,7 +62,7 @@
private void setExtrinsicIDs(XMLResource resource) {
if (resource == null) return;
-
+
// set xmi:id for all objects with a valid ID attribute
TreeIterator<EObject> allProperContents = EcoreUtil.getAllProperContents(resource, false);
while (allProperContents.hasNext()) {
@@ -75,7 +75,7 @@
private void resetExtrinsicIDs(XMLResource resource) {
if (resource == null) return;
-
+
if (resource instanceof AmaltheaResource) {
// reset the ID <-> EObject maps
((AmaltheaResource) resource).resetIDMaps();
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResourceSetImpl.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResourceSetImpl.java
index 9e37c75..f5641be 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResourceSetImpl.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/emf/AmaltheaResourceSetImpl.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/io/AmaltheaFileHelper.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/io/AmaltheaFileHelper.java
index 062f904..7c2c743 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/io/AmaltheaFileHelper.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/io/AmaltheaFileHelper.java
@@ -36,12 +36,12 @@
import org.slf4j.LoggerFactory;
public final class AmaltheaFileHelper {
-
+
private static final Logger LOGGER = LoggerFactory.getLogger(AmaltheaFileHelper.class);
public static final String INVALID = "invalid";
public static final String MODEL_FILE_EXTENSION = "amxmi";
-
+
// Suppress default constructor
private AmaltheaFileHelper() {
throw new IllegalStateException("Utility class");
@@ -49,7 +49,7 @@
/**
* Check if the given file is a zip archive.
- *
+ *
* @param file The {@link File} to check.
* @return <code>true</code> if the given file is a zip archive,
* <code>false</code> if not.
@@ -71,7 +71,7 @@
/**
* Extract the model namespace of the given input file.
- *
+ *
* @param inputFile The file for which the model namespace is
* requested.
* @return The model namespace of the given input file or <i>invalid</i> if
@@ -79,7 +79,7 @@
*/
public static String getNamespace(File inputFile) {
String result = INVALID;
-
+
if (inputFile != null && inputFile.exists() && inputFile.getName().endsWith(MODEL_FILE_EXTENSION)) {
Path inputPath = Paths.get(inputFile.toURI());
if (isZipFile(inputFile)) {
@@ -88,13 +88,13 @@
return getNamespaceFromFile(inputPath);
}
}
-
+
return result;
}
-
+
/**
* Extract the model namespace of the given input file.
- *
+ *
* @param inputPath The {@link Path} of the model file for which the model
* namespace is requested.
* @return The model namespace of the given input file or <i>invalid</i> if an
@@ -106,13 +106,13 @@
} catch (IOException | XMLStreamException e) {
LOGGER.error("Error on parsing input model file for namespace", e);
}
-
+
return INVALID;
}
/**
* Extract the model namespace of the given input file.
- *
+ *
* @param inputPath The {@link Path} of the model file for which the model
* namespace is requested.
* @return The model namespace of the given input file or <i>invalid</i> if an
@@ -127,7 +127,7 @@
} catch (IOException | XMLStreamException e) {
LOGGER.error("Error on parsing input model file for namespace", e);
}
-
+
return INVALID;
}
@@ -135,7 +135,7 @@
XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance();
xmlInputFactory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
xmlInputFactory.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
-
+
XMLEventReader reader = xmlInputFactory.createXMLEventReader(input);
while (reader.hasNext()) {
XMLEvent nextEvent = reader.nextEvent();
@@ -146,14 +146,14 @@
}
}
}
-
+
return INVALID;
}
/**
* Check if the model namespace of the provided file is of the current
* supported model version.
- *
+ *
* @param toCheck The model file to check.
* @return <code>true</code> if the model namespace is the current supported model
* namespace, <code>false</code> if not.
@@ -165,7 +165,7 @@
/**
* Extract the model version of the given input model file.
- *
+ *
* @param inputModelFile The model file for which the model version is
* requested.
* @return The model version of the given input model file or <i>invalid</i> if
@@ -177,7 +177,7 @@
/**
* Extract the model version of the given input model file.
- *
+ *
* @param inputPath The {@link Path} to the model file.
* @return The model version of the given input model file or <i>invalid</i> if
* an error occurs on parsing or the model version is invalid.
@@ -188,7 +188,7 @@
/**
* Extract the model version of the given zipped input model file.
- *
+ *
* @param inputPath The {@link Path} to the model file.
* @return The model version of the given input model file or <i>invalid</i> if
* an error occurs on parsing or the model version is invalid.
@@ -209,7 +209,7 @@
/**
* Check if the model version of the provided file is of the current
* supported model version.
- *
+ *
* @param toCheck The model file to check.
* @return <code>true</code> if the model version is the current supported model
* version, <code>false</code> if not.
@@ -218,11 +218,11 @@
String versionFromFile = getModelVersion(toCheck);
return ModelUtil.MODEL_VERSION.equals(versionFromFile);
}
-
+
/**
* Checks if the file with the given filename is an Amalthea model file by
* checking the file extension.
- *
+ *
* @param filename the name of the file to check.
* @return <code>true</code> if the given file is an Amalthea model file,
* <code>false</code> if not.
@@ -231,10 +231,10 @@
String fileExtension = filename.substring(filename.lastIndexOf('.') + 1).toLowerCase();
return isModelFileExtension(fileExtension);
}
-
+
/**
* Checks if the given file extension is an Amalthea model file extension.
- *
+ *
* @param fileExtension the file extension to check.
* @return <code>true</code> if the given file extension is an Amalthea model
* file extension, <code>false</code> if not.
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/io/AmaltheaLoader.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/io/AmaltheaLoader.java
index 9d57619..f86fa0e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/io/AmaltheaLoader.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/io/AmaltheaLoader.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -47,7 +47,7 @@
* <li>absolute (example: "d:/temp/model.amxmi")</li>
* <li>relative to project folder (example: "input/model.amxmi")</li>
* </ul>
- *
+ *
* @param pathname String
* @return
* AMALTHEA model - null if load failed
@@ -61,7 +61,7 @@
/**
* Static method to load an AMALTHEA model from a file.
- *
+ *
* @param file standard Java file
* @return
* AMALTHEA model - null if load failed
@@ -75,7 +75,7 @@
/**
* Static method to load an AMALTHEA model from a file URI.
- *
+ *
* @param uri org.eclipse.emf.common.util.URI
* @return
* AMALTHEA model - null if load failed
@@ -115,21 +115,21 @@
* <li>absolute (example: "d:/temp/")</li>
* <li>relative to project folder (example: "input/")</li>
* </ul>
- *
+ *
* @param pathname String
* @return
* ResourceSet - null if load failed
*/
public static ResourceSet loadFromDirectoryNamed(String pathname) {
if (pathname == null) return null;
-
+
final File folder = new File(pathname);
return loadFromDirectory(folder);
}
/**
* Static method to load AMALTHEA models from a directory.
- *
+ *
* @param folder standard Java file
* @return
* ResourceSet - null if load failed
@@ -152,7 +152,7 @@
/**
* Static method to load AMALTHEA models from a list of URIs.
- *
+ *
* @param uriList List of URIs
* @return
* ResourceSet - null if load failed
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/io/AmaltheaWriter.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/io/AmaltheaWriter.java
index 713fc86..75f35f8 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/io/AmaltheaWriter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/io/AmaltheaWriter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -43,7 +43,7 @@
* <li>absolute (example: "d:/temp/model_new.amxmi")</li>
* <li>relative to project folder (example: "output/model_new.amxmi")</li>
* </ul>
- *
+ *
* @param model source model
* @param pathname String
* @return
@@ -61,7 +61,7 @@
* <li>absolute (example: "d:/temp/model_new.amxmi")</li>
* <li>relative to project folder (example: "output/model_new.amxmi")</li>
* </ul>
- *
+ *
* @param model source model
* @param pathname String
* @param useZip boolean
@@ -77,7 +77,7 @@
/**
* Static method to save an AMALTHEA model to a file.
- *
+ *
* @param model source model
* @param file standard Java file
* @return
@@ -89,7 +89,7 @@
/**
* Static method to save an AMALTHEA model to a file.
- *
+ *
* @param model source model
* @param file standard Java file
* @param useZip boolean
@@ -105,7 +105,7 @@
/**
* Static method to save an AMALTHEA model to a file URI.
- *
+ *
* @param model source model
* @param uri org.eclipse.emf.common.util.URI
* @return
@@ -117,7 +117,7 @@
/**
* Static method to save an AMALTHEA model to a file URI.
- *
+ *
* @param model source model
* @param uri org.eclipse.emf.common.util.URI
* @param useZip boolean
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/predefined/AmaltheaTemplates.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/predefined/AmaltheaTemplates.java
index ea546b1..a1940f6 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/predefined/AmaltheaTemplates.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/predefined/AmaltheaTemplates.java
@@ -36,9 +36,9 @@
/**
* Adds a standard scheduler definition with required parameters to the OSModel.
- *
+ *
* If elements with the same unique name are already defined then the creation of that part is skipped.
- *
+ *
* @param os
* @param standardScheduler
* @return The just added or existing scheduler definition. <code>NULL</code> if some error occurred.
@@ -48,12 +48,12 @@
String schedulerName = standardScheduler.getAlgorithmName();
if (schedulerName == null) return null;
-
+
@SuppressWarnings("null")
- Set<SchedulerDefinition> existingSchedulerDefs =
+ Set<SchedulerDefinition> existingSchedulerDefs =
AmaltheaIndex.getElements(os, schedulerName, SchedulerDefinition.class);
@SuppressWarnings("null")
- Map<String, SchedulingParameterDefinition> existingParameterDefs =
+ Map<String, SchedulingParameterDefinition> existingParameterDefs =
AmaltheaIndex.getElements(os, SchedulingParameterDefinition.class).stream()
.collect(Collectors.toMap(SchedulingParameterDefinition::getName, Function.identity()));
@@ -70,19 +70,19 @@
// link to algorithm parameter definition (and create if necessary)
for (Parameter stdParam : standardScheduler.getAlgorithmParameters()) {
- SchedulingParameterDefinition paramDef = existingParameterDefs.get(stdParam.getParameterName());
+ SchedulingParameterDefinition paramDef = existingParameterDefs.get(stdParam.getParameterName());
if (paramDef == null) {
paramDef = addNewParameterDefinition(os, stdParam);
}
- schedulerDef.getAlgorithmParameters().add(paramDef);
+ schedulerDef.getAlgorithmParameters().add(paramDef);
}
// link to process parameter definition (and create if necessary)
for (Parameter stdParam : standardScheduler.getProcessParameters()) {
- SchedulingParameterDefinition paramDef = existingParameterDefs.get(stdParam.getParameterName());
+ SchedulingParameterDefinition paramDef = existingParameterDefs.get(stdParam.getParameterName());
if (paramDef == null) {
paramDef = addNewParameterDefinition(os, stdParam);
}
- schedulerDef.getProcessParameters().add(paramDef);
+ schedulerDef.getProcessParameters().add(paramDef);
}
return schedulerDef;
} else {
@@ -92,9 +92,9 @@
/**
* Adds a standard scheduling parameter definition to the OSModel.
- *
+ *
* If an element with the same unique name is already defined then the creation is skipped.
- *
+ *
* @param os
* @param standardParameter
* @return The just added or existing scheduling parameter definition. <code>NULL</code> if some error occurred.
@@ -106,9 +106,9 @@
if (parameterName == null) return null;
@SuppressWarnings("null")
- Set<SchedulingParameterDefinition> existingParameterDefs =
+ Set<SchedulingParameterDefinition> existingParameterDefs =
AmaltheaIndex.getElements(os, parameterName, SchedulingParameterDefinition.class);
-
+
// create scheduling parameter definition (only if not already available)
if (existingParameterDefs.isEmpty()) {
// create definition
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/predefined/StandardSchedulers.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/predefined/StandardSchedulers.java
index ecfa060..4b6148c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/predefined/StandardSchedulers.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/predefined/StandardSchedulers.java
@@ -443,7 +443,7 @@
private final boolean requiresParentScheduler;
// private enum constructor
- private Algorithm(String algorithmName, String description,
+ Algorithm(String algorithmName, String description,
Parameter[] algorithmParameters, Parameter[] processParameters,
boolean hasExactlyOneChild, boolean passesParametersUpwards, boolean requiresParentScheduler) {
this.algorithmName = algorithmName;
@@ -514,11 +514,11 @@
private final String defaultValue;
// private enum constructors
- private Parameter(String parameterName, Type type, boolean many, boolean mandatory) {
+ Parameter(String parameterName, Type type, boolean many, boolean mandatory) {
this(parameterName, type, many, mandatory, null);
}
- private Parameter(String parameterName, Type type, boolean many, boolean mandatory, String defaultValue) {
+ Parameter(String parameterName, Type type, boolean many, boolean mandatory, String defaultValue) {
this.parameterName = parameterName;
this.type = type;
this.many = many;
@@ -557,7 +557,7 @@
private final String typeName;
// private enum constructor
- private Type(String typeName) {
+ Type(String typeName) {
this.typeName = typeName;
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/ConstraintsUtil.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/ConstraintsUtil.java
index 3101c70..853dc3e 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/ConstraintsUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/ConstraintsUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -61,10 +61,10 @@
*/
public static @Nullable Time getDeadline(final @NonNull AbstractProcess process) {
checkArgument(process != null, ARG_NULL_MESSAGE);
-
+
final ConstraintsModel constraintsModel = getConstraintsModel(process);
if (constraintsModel == null) return null;
-
+
return getDeadline(process, constraintsModel);
}
@@ -83,7 +83,7 @@
.sorted(Time::compareTo)
.collect(Collectors.toList());
if (list.isEmpty()) return null;
-
+
return list.get(0);
}
@@ -93,7 +93,7 @@
*/
public static @Nullable Time getDeadline(final @NonNull Runnable runnable) {
checkArgument(runnable != null, ARG_NULL_MESSAGE);
-
+
final ConstraintsModel constraintsModel = getConstraintsModel(runnable);
if (constraintsModel == null) return null;
@@ -108,14 +108,14 @@
public static @Nullable Time getDeadline(final @NonNull Runnable runnable, final @NonNull ConstraintsModel constModel) {
checkArgument(runnable != null, ARG_NULL_MESSAGE);
checkArgument(constModel != null, ARG_NULL_MESSAGE);
-
+
List<Time> list = getDeadlineRequirements(runnable, constModel).stream()
.map(req -> ((TimeRequirementLimit) req.getLimit()).getLimitValue())
.filter(Objects::nonNull)
.sorted(Time::compareTo)
.collect(Collectors.toList());
if (list.isEmpty()) return null;
-
+
return list.get(0);
}
@@ -170,7 +170,7 @@
public static void updateDeadlineRequirement(final @NonNull Task task, final @NonNull Time deadline) {
checkArgument(task != null, ARG_NULL_MESSAGE);
checkArgument(deadline != null, ARG_NULL_MESSAGE);
-
+
final ConstraintsModel constraintsModel = getConstraintsModel(task);
if (constraintsModel == null) return;
@@ -188,7 +188,7 @@
checkArgument(constModel != null, ARG_NULL_MESSAGE);
final List<ProcessRequirement> requirements = getDeadlineRequirements(task, constModel);
-
+
if (requirements.isEmpty()) {
// create deadline requirement
addNewDeadlineRequirement(constModel, task, deadline);
@@ -208,10 +208,10 @@
public static void updateDeadlineRequirement(final @NonNull Runnable runnable, final @NonNull Time deadline) {
checkArgument(runnable != null, ARG_NULL_MESSAGE);
checkArgument(deadline != null, ARG_NULL_MESSAGE);
-
+
final ConstraintsModel constraintsModel = getConstraintsModel(runnable);
if (constraintsModel == null) return;
-
+
updateDeadlineRequirement(runnable, deadline, constraintsModel);
}
@@ -226,7 +226,7 @@
checkArgument(constModel != null, ARG_NULL_MESSAGE);
final List<RunnableRequirement> requirements = getDeadlineRequirements(runnable, constModel);
-
+
if (requirements.isEmpty()) {
// create deadline requirement
addNewDeadlineRequirement(constModel, runnable, deadline);
@@ -285,7 +285,7 @@
*/
public static List<AbstractEventChain> getAllAbstractEventChains(final @NonNull ConstraintsModel constModel) {
checkArgument(constModel != null, ARG_NULL_MESSAGE);
-
+
final List<AbstractEventChain> allECs = new ArrayList<>(constModel.getEventChains());
final Deque<AbstractEventChain> compositeECs = allECs.stream().filter(ec -> !ec.getItems().isEmpty()).collect(Collectors.toCollection(LinkedList::new));
// search for arbitrarily deep nested sub event chains
@@ -296,7 +296,7 @@
allECs.addAll(subChains);
subChains.stream().filter(sec -> !sec.getItems().isEmpty()).forEach(compositeECs::offer);
}
-
+
return allECs;
}
@@ -304,10 +304,10 @@
@SuppressWarnings("unused")
private static ConstraintsModel getConstraintsModel(final @NonNull EObject object) {
checkArgument(object != null, ARG_NULL_MESSAGE);
-
+
Amalthea modelRoot = AmaltheaServices.getContainerOfType(object, Amalthea.class);
if (modelRoot == null) return null;
-
+
return ModelUtil.getOrCreateConstraintsModel(modelRoot);
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/CustomPropertyUtil.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/CustomPropertyUtil.java
index 6d3ba2f..5d92530 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/CustomPropertyUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/CustomPropertyUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -48,7 +48,7 @@
public static Value customPut(@NonNull IAnnotatable object, @NonNull String key, int num) {
checkArgument(object != null, ARG1_MESSAGE);
checkArgument(! isNullOrEmpty(key), ARG2_MESSAGE);
-
+
IntegerObject valueObject;
valueObject = FactoryUtil.createIntegerObject(num);
@@ -142,7 +142,7 @@
checkArgument(! isNullOrEmpty(key), ARG2_MESSAGE);
List<String> keys = Splitter.on(separator).splitToList(key);
-
+
String firstKey = keys.get(0);
if (firstKey == null || firstKey.isEmpty()) return null;
@@ -172,7 +172,7 @@
}
return valueObject;
-
+
}
private static boolean isIndex(String str) {
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/DeploymentUtil.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/DeploymentUtil.java
index 281982a..f456003 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/DeploymentUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/DeploymentUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -64,7 +64,7 @@
* schedulers and the task allocated to them Assumption: Scheduler
* responsibilities are set empty core affinities are ignored otherwise the
* intersection of core affinity and scheduler responsibility is returned
- *
+ *
* @return Set of tasks
*/
public static Set<Task> getTasksMappedToCore(final @NonNull ProcessingUnit core, final @NonNull Amalthea model) { /// called it mapping
@@ -86,11 +86,8 @@
if (schedulers.contains(taskAlloc.getScheduler())) {
// check core affinities - if affinities are empty the responsibility counts
// otherwise the affinity also needs to contain the core
- if (taskAlloc.getAffinity().isEmpty()) {
+ if (taskAlloc.getAffinity().isEmpty() || taskAlloc.getAffinity().contains(core)) {
tasks.add(taskAlloc.getTask());
- } else {
- if (taskAlloc.getAffinity().contains(core))
- tasks.add(taskAlloc.getTask());
}
}
}
@@ -99,7 +96,7 @@
/**
* Returns a set of all ISR mapped to that core
- *
+ *
* @return Set of interrupt service routines (ISR)
*/
public static Set<ISR> getISRsMappedToCore(final @NonNull ProcessingUnit core, final @NonNull Amalthea model) {
@@ -116,7 +113,7 @@
for (SchedulerAllocation coreAlloc : schedulerAllocs) {
if (coreAlloc.getResponsibility().contains(core) && coreAlloc.getScheduler() == ia.getController()) {
result.add(isr);
-
+
}
}
}
@@ -127,7 +124,7 @@
/**
* Returns a list of all allocations of a task
- *
+ *
* @return List of task allocations
*/
public static List<TaskAllocation> getTaskAllocations(final @NonNull Task task, final @NonNull Amalthea model) {
@@ -139,20 +136,20 @@
}
return allocs;
}
-
+
/**
* Returns a list of all allocations of a task
- *
+ *
* @return List of task allocations
*/
public static Set<TaskAllocation> getTaskAllocations(final @NonNull Task task) {
return AmaltheaIndex.getReferringObjects(task, TaskAllocation.class);
-
+
}
-
+
/**
* Returns a list of all allocations of a isr
- *
+ *
* @return List of isr allocations
*/
public static Set<ISRAllocation> getIsrAllocations(final @NonNull Process isr) {
@@ -165,10 +162,10 @@
public static boolean isMapped(final @NonNull AbstractMemoryElement element) {
return !getMapping(element).isEmpty();
}
-
+
/**
* Set of memories the abstract element is mapped to (should be only one!)
- *
+ *
* @return Set of Memories
*/
public static Set<Memory> getMapping(final @NonNull AbstractMemoryElement element) {
@@ -179,16 +176,16 @@
/**
* Set of memories the label is mapped to (should be only one!)
- *
+ *
* @return Set of Memories
*/
public static Set<Memory> getLabelMapping(final @NonNull Label label) {
return getMapping(label);
}
-
+
/**
* Returns a created Memory element which was already added to the model
- *
+ *
* @return MemoryMapping
*/
public static MemoryMapping setMapping(final @NonNull AbstractMemoryElement element, final @NonNull Memory mem, final @NonNull Amalthea model) {
@@ -201,10 +198,10 @@
ModelUtil.getOrCreateMappingModel(model).getMemoryMapping().add(mapping);
return mapping;
}
-
+
/**
* Returns a created LabelMapping element which was already added to the model
- *
+ *
* @return MemoryMapping
*/
public static MemoryMapping setLabelMapping(final @NonNull Label label, final @NonNull Memory mem, final @NonNull Amalthea model) {
@@ -220,15 +217,15 @@
* @param model the containing model
* @return Set of cores
* @deprecated
- * This method was replaced by the function below, which does not need the containing model as a
+ * This method was replaced by the function below, which does not need the containing model as a
* parameter, instead the Amalthea index is used to access the loaded model.
* use: public static Set<ProcessingUnit> getAssignedCoreForProcess(final @NonNull Process process)
- *
+ *
*/
@Deprecated
public static Set<ProcessingUnit> getAssignedCoreForProcess(Process process, Amalthea model) {
if (model == null || process == null) return null;
-
+
final MappingModel mappingModel = model.getMappingModel();
if (mappingModel == null) return null;
@@ -244,10 +241,10 @@
return processingUnits;
}
-
+
@Deprecated
private static void getAssignedCoresForISR(ISR isr, final MappingModel mappingModel, Set<ProcessingUnit> processingUnits) {
-
+
for (ISRAllocation isrAlloc : mappingModel.getIsrAllocation()) {
if (isrAlloc.getIsr()!=null && isrAlloc.getIsr().equals(isr)) {
for (SchedulerAllocation coreAlloc : mappingModel.getSchedulerAllocation()) {
@@ -258,15 +255,15 @@
}
}
}
-
+
@Deprecated
private static void getAssignedCoresForTask(Task task, final MappingModel mappingModel, Set<ProcessingUnit> processingUnits) {
-
+
Set<TaskAllocation> taskAllocations = new HashSet<>();
-
+
for (TaskAllocation taskAlloc : mappingModel.getTaskAllocation()) {
if (taskAlloc.getTask()!=null && taskAlloc.getTask().equals(task)) {
- taskAllocations.add(taskAlloc);
+ taskAllocations.add(taskAlloc);
}
}
@@ -274,10 +271,10 @@
if (!(schedAlloc.getScheduler() instanceof TaskScheduler)) continue;
TaskScheduler scheduler1 = (TaskScheduler) schedAlloc.getScheduler();
-
+
for (TaskAllocation taskAlloc : taskAllocations) {
TaskScheduler scheduler2 = taskAlloc.getScheduler();
-
+
// check if the same scheduler manages the task and the core -- this includes hierarchical schedulers.
if (scheduler1!=null && (scheduler1.equals(scheduler2) || scheduler1.getChildSchedulers().contains(scheduler2))) {
// check core affinity -- retain the core affinity with the scheduler responsibility
@@ -288,7 +285,7 @@
}
} else {
// responsibility defines core mapping
- processingUnits.addAll(schedAlloc.getResponsibility());
+ processingUnits.addAll(schedAlloc.getResponsibility());
}
}
}
@@ -299,12 +296,12 @@
* Returns the cores the process is assigned to. Empty core affinities are
* ignored, otherwise the intersection of core affinity and scheduler
* responsibility is returned.
- *
+ *
* @param process Task or ISR
* @return Set of cores
*/
public static Set<ProcessingUnit> getAssignedCoreForProcess(final @NonNull Process process){
-
+
final Set<ProcessingUnit> processingUnits = new HashSet<>();
if (process instanceof Task) {
@@ -324,9 +321,9 @@
final Set<ProcessingUnit> processingUnitsFromAffinity = new HashSet<>();
AmaltheaIndex.getReferringObjects(task, TaskAllocation.class).stream().forEach(ta -> {
schedulers.add(ta.getScheduler());
- processingUnitsFromAffinity.addAll(ta.getAffinity());
+ processingUnitsFromAffinity.addAll(ta.getAffinity());
});
-
+
for (Scheduler scheduler : schedulers) {
if (scheduler != null) {
AmaltheaIndex.getReferringObjects(scheduler, SchedulerAllocation.class).stream()
@@ -336,8 +333,8 @@
if (!processingUnitsFromAffinity.isEmpty()) {
processingUnits.removeIf(pu -> !processingUnitsFromAffinity.contains(pu));
}
- }
-
+ }
+
private static void getAssignedCoresForISR(final @NonNull ISR isr, final Set<ProcessingUnit> processingUnits) {
final Set<InterruptController> controllers = new HashSet<>();
AmaltheaIndex.getReferringObjects(isr, ISRAllocation.class).stream()
@@ -350,7 +347,7 @@
}
}
}
-
+
/**
* @param procUnitDef processing unit definition
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/FactoryUtil.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/FactoryUtil.java
index 0e5e8d0..42d432b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/FactoryUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/FactoryUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -72,7 +72,7 @@
public static Counter createCounter(long prescaler) {
return createCounter(prescaler, 0);
}
-
+
/**
* Creates a counter
*/
@@ -239,10 +239,10 @@
}
/**
- * Creates a Time object parsed from a text representation.
- * @param timeString string representation of a time (number followed by time unit s, ms, us, ns or ps)
+ * Creates a Time object parsed from a text representation.
+ * @param timeString string representation of a time (number followed by time unit s, ms, us, ns or ps)
* @return The new Time object
- *
+ *
*/
public static Time createTime(String timeString) {
Pattern p = Pattern.compile("(-?\\d+)(\\.\\d+)?\\s?(s|ms|us|ns|ps)");
@@ -262,14 +262,14 @@
private static TimeUnit parseTimeUnit(String input) {
if (input == null) return TimeUnit.MS; //default millisecond
-
+
String unit = input.trim().toLowerCase();
if(unit.equals("ps")) return TimeUnit.PS;
if(unit.equals("ns")) return TimeUnit.NS;
if(unit.equals("us")) return TimeUnit.US;
if(unit.equals("ms")) return TimeUnit.MS;
if(unit.equals("s")) return TimeUnit.S;
-
+
return null;
}
@@ -430,7 +430,7 @@
valueObject.setValue(value);
return valueObject;
}
-
+
public static ListObject createListObject(Collection<? extends Value> values) {
ListObject valueObject = AmaltheaFactory.eINSTANCE.createListObject();
valueObject.getValues().addAll(values);
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/HardwareUtil.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/HardwareUtil.java
index c185c04..f940815 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/HardwareUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/HardwareUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -62,17 +62,17 @@
public static <T extends HwModule> List<T> getModulesFromHWStructure(Class<T> targetClass, HwStructure structure) {
List<T> results = new ArrayList<>();
collectModulesFromHWStructure(structure, targetClass, results);
-
+
return results;
}
-
+
private static <T extends HwModule> void collectModulesFromHWStructure(HwStructure structure, Class<T> targetClass, List<T> results) {
// check all modules
for (HwModule module : structure.getModules()) {
if (targetClass.isInstance(module)) {
results.add(targetClass.cast(module));
}
-
+
// special handling of processing unit caches
if (targetClass.isAssignableFrom(Cache.class) && module instanceof ProcessingUnit) {
for (Cache containedCache : ((ProcessingUnit) module).getCaches()) {
@@ -82,7 +82,7 @@
}
}
}
-
+
// call method recursive to also get modules of included structures
for (HwStructure hwStruct : structure.getStructures()) {
collectModulesFromHWStructure(hwStruct, targetClass, results);
@@ -93,7 +93,7 @@
if (puDef == null) { // null is the key for default values!
return new ArrayList<>();
}
-
+
List<ProcessingUnit> result = new ArrayList<>();
for (ProcessingUnit pu : getModulesFromHwModel(ProcessingUnit.class, model)) {
if (puDef.equals(pu.getDefinition())) {
@@ -124,7 +124,7 @@
Time time = RuntimeUtil.getExecutionTimeForCycles(cycles, defaultFrequency);
result.put(memory, time);
}
-
+
return result;
}
@@ -155,7 +155,7 @@
} else {
latency = calculateLatencyPathTime(accessElement, timeType, direction);
}
-
+
Time previousLatency = memoryAccessMap.get(destination);
if (previousLatency == null || (latency != null && AmaltheaServices.compareTimes(previousLatency, latency) < 0)) {
memoryAccessMap.put(destination, latency);
@@ -183,8 +183,8 @@
default:
break;
}
-
- return RuntimeUtil.getExecutionTimeForCycles((double)calculateLatency(latency, timeType),
+
+ return RuntimeUtil.getExecutionTimeForCycles(calculateLatency(latency, timeType),
accessElement.getSource().getFrequencyDomain().getDefaultValue());
}
@@ -222,7 +222,7 @@
}
Long tmpLatency = calculateLatency(latency, timeType);
- Time executionTimeForCycles = RuntimeUtil.getExecutionTimeForCycles((double)tmpLatency, frequency);
+ Time executionTimeForCycles = RuntimeUtil.getExecutionTimeForCycles(tmpLatency, frequency);
result = result.add(executionTimeForCycles);
}
@@ -232,7 +232,7 @@
private static IDiscreteValueDeviation getLatency(ConnectionHandler handler, AccessDirection direction) {
final ConnectionHandlerDefinition definition = handler.getDefinition();
if (definition == null) return null;
-
+
return (direction.equals(AccessDirection.READ)) ? definition.getReadLatency() : definition.getWriteLatency();
}
@@ -258,7 +258,7 @@
case WCET:
return latency.getUpperBound();
}
-
+
return (latency.getAverage() != null) ? latency.getAverage().longValue() : null;
}
@@ -304,7 +304,7 @@
public static long getFrequencyOfModuleInHz(HwModule module) {
final Frequency frequencyOfModule = getFrequencyOfModule(module);
if (frequencyOfModule == null) return 0L;
-
+
return AmaltheaServices.convertToHertz(frequencyOfModule).longValue() ;
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/InstructionsUtil.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/InstructionsUtil.java
index ed3e342..6830709 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/InstructionsUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/InstructionsUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -32,8 +32,8 @@
import org.eclipse.app4mc.amalthea.model.Ticks;
/**
- * Creates Need entries for Instructions
- *
+ * Creates Need entries for Instructions
+ *
* @deprecated (0.9.3) use {@link Ticks} instead.
*/
@Deprecated
@@ -70,11 +70,11 @@
public static IDiscreteValueDeviation getNeed(ExecutionNeed execNeed) {
return execNeed.getNeeds().get(INSTRUCTIONS_CATEGORY_NAME);
}
-
+
public static long getNeedConstant(ExecutionNeed execNeed) {
return getNeedConstant(execNeed, INSTRUCTIONS_CATEGORY_NAME);
}
-
+
public static IDiscreteValueDeviation getNeedDeviation(ExecutionNeed execNeed) {
return getNeedDeviation(execNeed, INSTRUCTIONS_CATEGORY_NAME);
}
@@ -89,38 +89,38 @@
}
- //----------------------- General -----------------------
+ //----------------------- General -----------------------
private static ExecutionNeed createExecutionNeed(String category, long value) {
DiscreteValueConstant dev = AmaltheaFactory.eINSTANCE.createDiscreteValueConstant();
dev.setValue(value);
-
+
ExecutionNeed execNeed = AmaltheaFactory.eINSTANCE.createExecutionNeed();
execNeed.getNeeds().put(category, dev);
-
+
return execNeed;
}
private static long getNeedConstant(ExecutionNeed execNeed, String category) {
if (execNeed == null || category == null) return 0;
-
+
IDiscreteValueDeviation dev = execNeed.getNeeds().get(category);
if (dev instanceof DiscreteValueConstant) {
return ((DiscreteValueConstant) dev).getValue();
}
return 0;
}
-
+
private static IDiscreteValueDeviation getNeedDeviation(ExecutionNeed execNeed, String category) {
if (execNeed == null || category == null) return null;
-
+
return execNeed.getNeeds().get(category);
}
public static List<HwFeature> getFeaturesOfCategory(ProcessingUnitDefinition puDefinition, HwFeatureCategory category) {
if (puDefinition == null || category == null) return Collections.<HwFeature>emptyList();
-
+
return puDefinition.getFeatures().stream()
.filter(i -> i.getContainingCategory() == category)
.collect(Collectors.toList());
@@ -128,7 +128,7 @@
public static List<Double> getFeatureValuesOfCategory(ProcessingUnitDefinition puDefinition, HwFeatureCategory category) {
if (puDefinition == null || category == null) return Collections.<Double>emptyList();
-
+
return puDefinition.getFeatures().stream()
.filter(i -> i.getContainingCategory() == category)
.map(HwFeature::getValue)
@@ -136,4 +136,4 @@
}
}
-
+
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/ModelUtil.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/ModelUtil.java
index e18f070..b6e5573 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/ModelUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/ModelUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015, 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -44,7 +44,7 @@
}
private static final String ARG_NULL_MESSAGE = "Argument is null, expected: Amalthea";
-
+
// Get namespace from AmaltheaPackage (for symmetric access and convenience)
public static final String MODEL_NAMESPACE = AmaltheaPackage.eNS_URI;
// Extract AMALTHEA version
@@ -56,7 +56,7 @@
? MODEL_NAMESPACE
: MODEL_NAMESPACE.substring(lastIndex + 1);
}
-
+
public static CommonElements getOrCreateCommonElements(final @NonNull Amalthea model) {
checkArgument(model != null, ARG_NULL_MESSAGE);
@@ -163,7 +163,7 @@
}
return process.getActivityGraph();
}
-
+
public static ActivityGraph getOrCreateActivityGraph(final @NonNull Runnable runnable) {
checkArgument(runnable != null, ARG_NULL_MESSAGE);
if (runnable.getActivityGraph() == null) {
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/RuntimeUtil.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/RuntimeUtil.java
index ad1adfc..d060100 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/RuntimeUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/RuntimeUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -82,7 +82,7 @@
/**
* Computes the execution time of a Process (Task or ISR) - unique mapping is required
- *
+ *
* @param process task or isr
* @param modes (optional) - null works
* @param executionCase BCET, ACET, WCET
@@ -91,23 +91,23 @@
public static Time getExecutionTimeForProcess(Process process, EMap<ModeLabel, String> modes, TimeType executionCase) {
Time dummy = FactoryUtil.createTime();
if (process == null) return dummy;
-
+
Amalthea model = getContainingModel(process);
if (model == null) return dummy;
-
+
Set<ProcessingUnit> puSet = DeploymentUtil.getAssignedCoreForProcess(process);
if (puSet.size() != 1) {
System.out.println("Mapping unclear. Process mapped to " + puSet.size() + " Cores - Use PU specific method");
return dummy;
}
-
- ProcessingUnit processingUnit = puSet.iterator().next();
+
+ ProcessingUnit processingUnit = puSet.iterator().next();
return getExecutionTimeForProcess(process, processingUnit, modes, executionCase);
}
/**
* Computes the execution time of a Process (Task or ISR) on a given processing unit
- *
+ *
* @param process task or isr
* @param processingUnit executing processing unit
* @param modes (optional) - null works
@@ -117,7 +117,7 @@
public static Time getExecutionTimeForProcess(Process process, ProcessingUnit processingUnit, EMap<ModeLabel, String> modes, TimeType executionCase) {
Time result = FactoryUtil.createTime();
if (process == null || processingUnit == null) return result;
-
+
for (Runnable runnable : SoftwareUtil.getRunnableList(process, modes) ) {
result = result.add(getExecutionTimeForRunnable(runnable, processingUnit, modes, executionCase));
}
@@ -126,7 +126,7 @@
/**
* Computes the execution time of a Runnable on a given processing unit
- *
+ *
* @param runnable runnable
* @param processingUnit executing processing unit
* @param modes (optional) - null works
@@ -140,14 +140,14 @@
for (Ticks tick : tickList) {
result = result.add(getExecutionTimeForTicks(tick, processingUnit, executionCase));
}
-
- List<ExecutionNeed> executionNeedList = SoftwareUtil.getExecutionNeeds(runnable, modes);
+
+ List<ExecutionNeed> executionNeedList = SoftwareUtil.getExecutionNeeds(runnable, modes);
if (!executionNeedList.isEmpty()) {
for (ExecutionNeed need : executionNeedList) {
result = result.add(getExecutionTimeForExecutionNeeds(need, processingUnit, executionCase));
}
}
- return result;
+ return result;
}
// Simon 11.01.2019:
@@ -174,7 +174,7 @@
/**
* Computes time for ticks on a given processing unit
- *
+ *
* @param deviation ticks deviation
* @param processingUnit executing processing unit
* @param executionCase BCET, ACET, WCET
@@ -198,7 +198,7 @@
/**
* Computes time for execution needs on a given processing unit
- *
+ *
* @param need execution need
* @param processingUnit executing processing unit
* @param executionCase BCET, ACET, WCET
@@ -207,14 +207,14 @@
public static Time getExecutionTimeForExecutionNeeds(ExecutionNeed need, ProcessingUnit processingUnit, TimeType executionCase) {
Time result = FactoryUtil.createTime();
if (need == null || processingUnit == null) return result;
-
+
Amalthea model = getContainingModel(processingUnit);
if (model == null) return result;
-
+
for (Entry<String, IDiscreteValueDeviation> needEntry : need.getNeeds()) {
String categoryName = needEntry.getKey();
if (categoryName == null) continue;
-
+
Set<HwFeatureCategory> categorySet = AmaltheaIndex.getElements(model, categoryName, HwFeatureCategory.class);
if (categorySet.size() == 1) {
result = getExecutionTimeForExecutionNeedEntry(needEntry.getValue(), categorySet.iterator().next(), processingUnit, executionCase);
@@ -229,7 +229,7 @@
/**
* Computes time for specific execution need entry on a given processing unit
- *
+ *
* @param deviation needs deviation
* @param hwFeatureCategory corresponding feature category
* @param processingUnit executing processing unit
@@ -261,14 +261,14 @@
/**
* Computes time for a number of ticks with a given frequency
- *
+ *
* @param ticks ticks / cycles
* @param frequency frequency (of an executing processing unit)
* @return execution time
*/
public static Time getExecutionTimeForCycles(double ticks, Frequency frequency) {
if (frequency == null) return null;
-
+
double cyclesPerSecond = AmaltheaServices.convertToHertz(frequency).doubleValue();
double factor = 1.0d / cyclesPerSecond;
Time oneSecond = FactoryUtil.createTime(1, TimeUnit.S);
@@ -276,26 +276,26 @@
Time result = t1.multiply(factor);
return result.adjustUnit();
}
-
+
/**
* Computes ticks for a given time (in seconds) and frequency.
- *
+ *
* @param executionTime execution time in seconds
* @param frequency frequency (of an executing processing unit)
* @return ticks / cycles
*/
public static double getTicksForExecutionTimeInSeconds(BigDecimal executionTime, Frequency frequency) {
if (executionTime == null || frequency == null) return Double.NaN;
-
+
BigDecimal cyclesPerSecond = AmaltheaServices.convertToHertz(frequency);
BigDecimal ticks = executionTime.multiply(cyclesPerSecond);
-
+
return ticks.doubleValue();
}
-
+
/**
* Computes ticks for a given time and frequency.
- *
+ *
* @param executionTime execution time
* @param frequency frequency (of an executing processing unit)
* @return ticks / cycles
@@ -339,7 +339,7 @@
/**
* Clears all runtime information (execution needs and ticks)
- *
+ *
* @param model Amalthea model
* @param modes (optional) - null works
*/
@@ -355,7 +355,7 @@
/**
* Clears all runtime information (execution needs and ticks)
- *
+ *
* @param process task or isr
* @param modes (optional) - null works
*/
@@ -369,21 +369,21 @@
/**
* Clears all runtime information (execution needs and ticks)
- *
+ *
* @param runnable runnable
* @param modes (optional) - null works
*/
public static void clearRuntimeOfRunnable(Runnable runnable, EMap<ModeLabel, String> modes) {
List<ExecutionNeed> executionNeeds = SoftwareUtil.getExecutionNeeds(runnable, modes);
AmaltheaIndex.deleteAll(executionNeeds);
-
+
List<Ticks> ticks = SoftwareUtil.getTicks(runnable, modes);
AmaltheaIndex.deleteAll(ticks);
}
/**
* Creates a new Runnable with the given runtime at beginning / end of the given process
- *
+ *
* @param process containing process (task or isr)
* @param need execution need
* @param runnableName name of new runnable
@@ -405,11 +405,11 @@
}
return run;
- }
+ }
/**
* Creates a new Runnable with the given runtime at beginning / end of the given process
- *
+ *
* @param process containing process (task or isr)
* @param ticks ticks
* @param runnableName name of new runnable
@@ -431,7 +431,7 @@
}
return run;
- }
+ }
//#######################################################
@@ -453,7 +453,7 @@
/**
* Calculates the utilization for a given process
- *
+ *
* @return Map: procUnit -> utilization
*/
public static Map<ProcessingUnit, Double> getProcessUtilization(Process process, Amalthea model, TimeType tt,
@@ -474,7 +474,7 @@
* Calculates the utilization for a given process on a given procUnit
* <p>
* Assumption (wrong): All triggers activate the process on all procUnits together! (at the same time)
- *
+ *
* @return utilization
*/
public static double getProcessUtilization(Process process, ProcessingUnit procUnit, Amalthea model, TimeType tt,
@@ -506,7 +506,7 @@
/**
* Returns the cumulative process utilization, i.e. runtime on every procUnit summed up
- *
+ *
* @return Map: process -> sum of utilization on all procUnits
*/
public static Map<Process, Double> getCumulativeProcessUtilizations(Amalthea model, TimeType tt,
@@ -524,7 +524,7 @@
for (Double value : utilizationMap.values()) {
util += value;
}
-
+
utilizations.put(proc, util);
}
@@ -579,7 +579,7 @@
// System.out.println(" --triggered by " + triggeringProcess.getName());
// InterProcessActivation ipa = getIpaForStimulus(stimulus, triggeringProcess, modes);
long ipaPrescaler = entry.getValue();
-
+
List<Time> periods = getPeriodsOfProcess(triggeringProcess, tt, modes);
for (Time t : periods) {
// if(ipa.getCounter() != null) {
@@ -631,7 +631,7 @@
/**
* Returns all Processes that trigger the given InterProcessStimulus
- *
+ *
* @return Map: process -> prescaler value
*/
public static Map<Process, Long> getTriggeringProcesses(InterProcessStimulus ip, EMap<ModeLabel, String> modes) {
@@ -671,7 +671,7 @@
/**
* Returns a Map of all sporadically triggered processes with their prescaler
- *
+ *
* @return Map of processes with a sporadic activation and depending on tt the
* time between activations
*/
@@ -704,7 +704,7 @@
/**
* Returns a Map of all sporadically triggered processes with their prescaler
- *
+ *
* @return Map of processes with a sporadic activation and the deviation of the
* activations
*/
@@ -735,7 +735,7 @@
public static Map<Process, Map<Stimulus, Long>> getPlainTriggersForModel(Amalthea model, Function<Stimulus, Boolean> filter) {
HashMap<Process, Map<Stimulus, Long>> map = new HashMap<>();
List<Process> processes = new ArrayList<>();
-
+
SWModel swModel = ModelUtil.getOrCreateSwModel(model);
processes.addAll(swModel.getTasks());
processes.addAll(swModel.getIsrs());
@@ -811,7 +811,7 @@
private static Amalthea getContainingModel(EObject object) {
if (object == null) return null;
-
+
return AmaltheaServices.getContainerOfType(object, Amalthea.class);
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/SoftwareUtil.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/SoftwareUtil.java
index d382849..c3c9694 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/SoftwareUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/SoftwareUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -85,7 +85,7 @@
/**
* Traverse the contained call graph items and collect all items.
- *
+ *
* @param container call graph, group, ...
* @return
* List of ActivityGraphItems
@@ -97,7 +97,7 @@
/**
* Traverse the contained call graph items and collect all items.
* Collection can be restricted to specific modes.
- *
+ *
* @param container call graph, group, ...
* @param modes (optional) - null works
* @return
@@ -110,7 +110,7 @@
/**
* Traverse the contained call graph items and collect all items.
* Collection can be restricted to specific modes and filtered by a lambda expression.
- *
+ *
* @param container call graph, group, ...
* @param modes (optional) - null works
* @param filter lambda expression (e.g. "a -> a instanceof LabelAccess")
@@ -121,11 +121,11 @@
final Function<ActivityGraphItem, Boolean> filter) {
return collectActivityGraphItems(container, modes, ActivityGraphItem.class, filter);
}
-
+
/**
* Traverse the runnable items graph of a runnable and collect all items.
* Collection can be restricted to specific modes and filtered by class.
- *
+ *
* @param container call graph, group, ...
* @param modes (optional) - null works
* @param targetClass subclass of ActivityGraphItem that restricts the result
@@ -136,11 +136,11 @@
final Class<T> targetClass) {
return collectActivityGraphItems(container, modes, targetClass, null);
}
-
+
/**
* Traverse the runnable items graph of a runnable and collect all items.
* Collection can be restricted to specific modes and filtered by class and lambda expression.
- *
+ *
* @param container call graph, group, ...
* @param modes (optional) - null works
* @param targetClass subclass of ActivityGraphItem that restricts the result
@@ -152,7 +152,7 @@
final Class<T> targetClass, final Function<T, Boolean> filter) {
EList<T> itemList = new BasicEList<>();
if (container != null) {
- collectActivityGraphItems(container.getItems(), modes, targetClass, filter, itemList);
+ collectActivityGraphItems(container.getItems(), modes, targetClass, filter, itemList);
}
return itemList;
}
@@ -229,27 +229,27 @@
public static boolean conditionIsSatisfiedBy(Object condition, EMap<ModeLabel, String> context) {
// no context defined => satisfied (no restriction)
if (context == null) return true;
-
+
// OR condition
if (condition instanceof ConditionDisjunction) {
return conditionIsSatisfiedBy((ConditionDisjunction) condition, context);
}
-
+
// AND condition
if (condition instanceof ConditionConjunction) {
return conditionIsSatisfiedBy((ConditionConjunction) condition, context);
}
-
+
// Compare the value of a mode label with a given value
if (condition instanceof ModeValueCondition) {
return conditionIsSatisfiedBy((ModeValueCondition) condition, context);
}
-
+
// Compare the values of two mode labels
if (condition instanceof ModeLabelCondition) {
return conditionIsSatisfiedBy((ModeLabelCondition) condition, context);
}
-
+
// no restriction for other types
return true;
}
@@ -270,7 +270,7 @@
public static boolean conditionIsSatisfiedBy(ConditionConjunction condition, EMap<ModeLabel, String> context) {
// no context defined => satisfied (no restriction)
if (context == null) return true;
-
+
// AND condition
for (Condition entry : condition.getEntries()) {
if (!conditionIsSatisfiedBy(entry, context)) {
@@ -302,7 +302,7 @@
public static boolean conditionIsSatisfiedBy(ModeLabelCondition condition, EMap<ModeLabel, String> context) {
// no context defined => satisfied (no restriction)
if (context == null) return true;
-
+
// Compare the values of two mode labels
// check completeness of specified condition
@@ -417,7 +417,7 @@
* List of LabelAccesses
*/
public static List<LabelAccess> getLabelAccessList(Runnable runnable, EMap<ModeLabel, String> modes) {
- return collectActivityGraphItems(runnable.getActivityGraph(), modes, LabelAccess.class);
+ return collectActivityGraphItems(runnable.getActivityGraph(), modes, LabelAccess.class);
}
/**
@@ -428,7 +428,7 @@
* List of LabelAccesses
*/
public static List<LabelAccess> getReadLabelAccessList(Runnable runnable, EMap<ModeLabel, String> modes) {
- return collectActivityGraphItems(runnable.getActivityGraph(), modes, LabelAccess.class, (la -> la.getAccess() == READ));
+ return collectActivityGraphItems(runnable.getActivityGraph(), modes, LabelAccess.class, (la -> la.getAccess() == READ));
}
/**
@@ -439,7 +439,7 @@
* List of LabelAccesses
*/
public static List<LabelAccess> getWriteLabelAccessList(Runnable runnable, EMap<ModeLabel, String> modes) {
- return collectActivityGraphItems(runnable.getActivityGraph(), modes, LabelAccess.class, (la -> la.getAccess() == WRITE));
+ return collectActivityGraphItems(runnable.getActivityGraph(), modes, LabelAccess.class, (la -> la.getAccess() == WRITE));
}
/**
@@ -498,7 +498,7 @@
LabelAccess::getData,
Collectors.mapping(LabelAccess::getStatistic, Collectors.toList()) ));
}
-
+
/**
* Returns a set of labels accessed by the process
* @param process process (Task or ISR)
@@ -521,7 +521,7 @@
* Set of Labels
*/
public static Set<Label> getReadLabelSet(Process process, EMap<ModeLabel, String> modes) {
- HashSet<Label> result = new HashSet<>();
+ HashSet<Label> result = new HashSet<>();
for (Runnable r : getRunnableList(process, modes))
result.addAll(getReadLabelSet(r, modes));
return result;
@@ -535,7 +535,7 @@
* Set of Labels
*/
public static Set<Label> getWriteLabelSet(Process process, EMap<ModeLabel, String> modes) {
- HashSet<Label> result = new HashSet<>();
+ HashSet<Label> result = new HashSet<>();
for (Runnable r : getRunnableList(process, modes))
result.addAll(getWriteLabelSet(r, modes));
return result;
@@ -549,7 +549,7 @@
* List of LabelAccesses
*/
public static List<LabelAccess> getLabelAccessList(Process process, EMap<ModeLabel, String> modes) {
- ArrayList<LabelAccess> result = new ArrayList<>();
+ ArrayList<LabelAccess> result = new ArrayList<>();
for (Runnable r : getRunnableList(process, modes))
result.addAll(getLabelAccessList(r, modes));
return result;
@@ -641,16 +641,16 @@
}
}
return result;
- }
+ }
/**
- * Returns the reads from a process to a certain label. Evaluates the LabelAccessStatistic.
+ * Returns the reads from a process to a certain label. Evaluates the LabelAccessStatistic.
* Definition of TimeType is possible. Null value returns the average case.
*/
public static float getLabelReadCount(Label label, Process process, EMap<ModeLabel, String> modes, TimeType timeType) {
if (timeType == null)
timeType = TimeType.ACET;
-
+
EList<@NonNull LabelAccess> accessList = collectActivityGraphItems(
process.getActivityGraph(),
modes,
@@ -661,13 +661,13 @@
}
/**
- * Returns the writes from a process to a certain label. Evaluates the LabelAccessStatistic.
+ * Returns the writes from a process to a certain label. Evaluates the LabelAccessStatistic.
* Definition of TimeType is possible. Null value returns the average case.
*/
public static float getLabelWriteCount(Label label, Process process, EMap<ModeLabel, String> modes, TimeType timeType) {
if (timeType == null)
timeType = TimeType.ACET;
-
+
EList<@NonNull LabelAccess> accessList = collectActivityGraphItems(
process.getActivityGraph(),
modes,
@@ -684,7 +684,7 @@
accesses += 1f;
continue;
}
-
+
NumericStatistic statistic = la.getStatistic().getValue();
if (statistic instanceof SingleValueStatistic) {
accesses += ((SingleValueStatistic) statistic).getValue();
@@ -719,9 +719,9 @@
}
/**
- * Returns a set of runnables called by the process - no duplicates
+ * Returns a set of runnables called by the process - no duplicates
* @param process process (Task or ISR)
- * @param modes (optional) - null works
+ * @param modes (optional) - null works
* @return
* Set of runnables called by the process
*/
@@ -736,14 +736,14 @@
public static float getLabelAccessCountFromStatistics(LabelAccess labelAcc, TimeType accType) {
if (labelAcc.getStatistic() == null)
return 1;
-
+
float accesses = 1;
final NumericStatistic value = labelAcc.getStatistic().getValue();
if (value instanceof SingleValueStatistic) {
accesses = ((SingleValueStatistic)value).getValue();
} else if (value instanceof MinAvgMaxStatistic) {
switch(accType) {
- case ACET:
+ case ACET:
accesses = ((MinAvgMaxStatistic)value).getAvg();
break;
case BCET:
@@ -759,12 +759,12 @@
return accesses;
}
- /**
+ /**
* Returns a list of runnables reading the label
* @param label label
* @param modes (optional) - null works
* @return
- * List of Runnables
+ * List of Runnables
*/
public static List<Runnable> getReaderListOfLabel(Label label, EMap<ModeLabel, String> modes) {
ArrayList<Runnable> result = new ArrayList<>();
@@ -815,7 +815,7 @@
* @param label label
* @param modes (optional) - null works
* @return
- * Set of Runnables
+ * Set of Runnables
*/
public static Set<Runnable> getWriterSetOfLabel(Label label, EMap<ModeLabel, String> modes) {
return new HashSet<>(getWriterListOfLabel(label, modes));
@@ -958,7 +958,7 @@
*/
public static List<ExecutionNeed> getExecutionNeeds(Runnable runnable, EMap<ModeLabel, String> modes) {
return collectActivityGraphItems(runnable.getActivityGraph(), modes, ExecutionNeed.class);
-
+
// Should nested runnable calls also be included ? (potential cycles)
}
@@ -977,11 +977,11 @@
for (Runnable run : getRunnableList(process, modes)) {
result.addAll(getExecutionNeeds(run, modes));
}
- return result;
+ return result;
}
- /**
- * Returns a list of all ticks for a given runnable
+ /**
+ * Returns a list of all ticks for a given runnable
* @param runnable runnable
* @param modes (optional) - null works
* @return
@@ -989,12 +989,12 @@
*/
public static List<Ticks> getTicks(Runnable runnable, EMap<ModeLabel, String> modes) {
return collectActivityGraphItems(runnable.getActivityGraph(), modes, Ticks.class);
-
+
// Should nested runnable calls also be included ? (potential cycles)
}
- /**
- * Returns a list of all ticks for a given process
+ /**
+ * Returns a list of all ticks for a given process
* @param process process (Task or ISR)
* @param modes (optional) - null works
* @return
@@ -1030,7 +1030,7 @@
* Set of ServerCall
*/
public static Set<ServerCall> getServerCallSet(Process process, EMap<ModeLabel, String> modes) {
- HashSet<ServerCall> result = new HashSet<>();
+ HashSet<ServerCall> result = new HashSet<>();
for (Runnable run : getRunnableList(process, modes)) {
result.addAll(getServerCallSet(run, modes));
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/TimeUtil.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/TimeUtil.java
index 347da65..e5b66d3 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/TimeUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/TimeUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -34,10 +34,10 @@
* Returns a list with all possible Units
* @return TimeUnit.VALUES
*/
- public static List<TimeUnit> getTimeUnitList() {
+ public static List<TimeUnit> getTimeUnitList() {
return AmaltheaServices.TIME_UNIT_LIST;
}
-
+
/**
* Converts a Time object to the given TimeUnit.
* Note: when convert from small unit to bigger unit, the function will round the number e.g 5200Ps = 5Ns
@@ -47,27 +47,27 @@
// Units are the same, no conversion
return time;
}
-
+
if (time.getUnit() == TimeUnit._UNDEFINED_ || unit == TimeUnit._UNDEFINED_ ) {
return null;
}
-
+
Time newTime = AmaltheaFactory.eINSTANCE.createTime();
-
+
List<TimeUnit> units = getTimeUnitList();
- int power = units.indexOf(time.getUnit()) - units.indexOf(unit);
+ int power = units.indexOf(time.getUnit()) - units.indexOf(unit);
// Get the difference from the source TimeUnit to the destination TimeUnit as a factor
double factor = Math.pow(1000, power);
-
+
// Convert
- if(factor >= 1.0) {
+ if(factor >= 1.0) {
newTime.setValue(time.getValue().multiply(BigInteger.valueOf((long)factor)));
} else {
factor = 1 / factor;
newTime.setValue(time.getValue().divide(BigInteger.valueOf((long)factor)));
}
newTime.setUnit(unit);
-
+
return newTime;
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/WeibullUtil.java b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/WeibullUtil.java
index f07fe74..5277b0c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/WeibullUtil.java
+++ b/plugins/org.eclipse.app4mc.amalthea.model/src/org/eclipse/app4mc/amalthea/model/util/WeibullUtil.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -36,10 +36,10 @@
public double given_upperBound = 0.0;
public double requested_mean = 0.0;
public double requested_pRemainPromille = 0.0;
-
+
public double shape = 1.0;
public double scale = 1.0;
-
+
public String error = null;
@Override
@@ -78,8 +78,8 @@
/**
* See Crénin, François, Truncated Weibull Distribution Functions and Moments (October 30, 2015).
- * Available at SSRN: https://ssrn.com/abstract=2690255 or http://dx.doi.org/10.2139/ssrn.2690255
- *
+ * Available at SSRN: https://ssrn.com/abstract=2690255 or http://dx.doi.org/10.2139/ssrn.2690255
+ *
* @param shape
* @param scale
* @param location
@@ -88,7 +88,7 @@
*/
public static double computeAverage(double shape, double scale, double location, Double upperBound) {
if (shape <= 0.0 || scale <= 0.0) return Double.NaN;
-
+
if (upperBound == null || upperBound.isNaN() || upperBound.isInfinite()) {
// Standard Weibull distribution
return location + scale * Gamma.gamma(1 + 1 / shape);
@@ -107,7 +107,7 @@
/**
* See https://en.wikipedia.org/wiki/Incomplete_gamma_function
- *
+ *
* @param s
* @param x
* @return
@@ -123,13 +123,12 @@
} else {
pRemainPromille = computePRemainPromille(shape, scale, location, upperBound);
}
-
+
return computeMedianWithPRemainPromille(shape, scale, location, pRemainPromille);
}
public static double computeMedianWithPRemainPromille(double shape, double scale, double location, double pRemainPromille) {
- if (shape <= 0.0 || scale <= 0.0) return Double.NaN;
- if (pRemainPromille < 0 || pRemainPromille >= 1000) return Double.NaN;
+ if (shape <= 0.0 || scale <= 0.0 || pRemainPromille < 0 || pRemainPromille >= 1000) return Double.NaN;
double x = scale * Math.pow(-1.0 * Math.log(0.5 + pRemainPromille / 2000.0), 1 / shape);
return location + x;
@@ -137,37 +136,37 @@
public static double computePRemainPromille(double shape, double scale, double location, double upperBound) {
if (shape <= 0.0 || scale <= 0.0) return Double.NaN;
-
+
if (location < upperBound) {
// Compute CDF at upper bound; pRemainPromille = (1 - CDF) * 1000
final double range = upperBound - location;
final double power = Math.pow(range / scale, shape);
return Math.exp(-1.0 * power) * 1000.0;
}
-
+
return Double.NaN;
}
public static double computeUpperBound(double shape, double scale, double location, double pRemainPromille) {
if (shape <= 0.0 || scale <= 0.0) return Double.NaN;
-
+
double pRemain = pRemainPromille / 1000.0;
if (pRemain > 0 && pRemain < 1) {
// Compute CDF at upper bound; pRemain = (1 - CDF)
return location + Math.pow(-1.0 * Math.log(pRemain), 1.0 / shape) * scale;
}
-
+
return Double.NaN;
}
/**
* This is a simple attempt to get a better parameter estimation for big pRemainPromille values.
- *
+ *
* As an alternative to the regular estimation another estimation based on the median value is calculated.
* The better result is selected according to the relative error of both requested values.
- *
+ *
* Better solutions are welcome !
- *
+ *
* @param lowerBound
* @param average
* @param upperBound
@@ -188,11 +187,11 @@
double p2_pRemainPromille = computePRemainPromille(p2.shape, p2.scale, lowerBound, upperBound);
// find the better one
-
+
double error1 = Math.abs(1.0 - p1_average / average) + Math.abs(1.0 - p1_pRemainPromille / pRemainPromille);
double error2 = Math.abs(1.0 - p2_average / average) + Math.abs(1.0 - p2_pRemainPromille / pRemainPromille);
if (error2 < error1) return p2;
-
+
return p1;
}
@@ -227,26 +226,26 @@
result.shape = 1;
result.scale = 1;
result.requested_pRemainPromille = pRemainPromille;
-
+
result.given_lowerBound = lowerBound;
result.requested_mean = average;
result.given_upperBound = upperBound;
-
+
// shifted values for standard 2 parameter Weibull distribution
double avg = average - lowerBound;
double max = upperBound - lowerBound;
double pRemain = pRemainPromille / 1000;
-
+
if ((max / avg) > 10000) {
result.error = "finding: upper bound and mean have no valid value for parameter";
return result;
}
-
+
if (pRemain > 1) {
result.error = "invalid_argument: pRemainPromille needs to be smaller than 1";
return result;
}
-
+
/* find zero interval */
double right = 0.2;
double left = 0.1;
@@ -262,19 +261,19 @@
result.error = NO_VALID_WEIBULL_DISTRIBUTION_FOUND;
return result;
}
-
+
// if we found the exact solution on one of the interval borders, return it
if (left_f == 0) {
right = left;
right_f = left_f;
}
-
+
if (right_f == 0) {
result.shape = right;
result.scale = computeScaleForAverage(result.shape, avg);
return result;
}
-
+
while (true) {
double half = left + (right - left) / 2;
double half_f = paramZeroFunctionforAverage(half, avg, max, pRemain);
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimBasicProfile.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimBasicProfile.java
index d2bdb3d..9554cd5 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimBasicProfile.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimBasicProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimHardwareProfile.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimHardwareProfile.java
index 1b967e0..a29b170 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimHardwareProfile.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimHardwareProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -31,7 +31,7 @@
SimHwConnection.class,
SimHwMemoryDefinition.class,
InchronHWModuleMissingClock.class,
-
+
}
)
@ValidationGroup(
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimMappingProfile.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimMappingProfile.java
index f14d097..5e2a220 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimMappingProfile.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimMappingProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimOsProfile.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimOsProfile.java
index 79db9df..00a989d 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimOsProfile.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimOsProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimSoftwareProfile.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimSoftwareProfile.java
index 5456f5f..8bf24c9 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimSoftwareProfile.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/SimSoftwareProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/basic/SimBasicIdentifiers.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/basic/SimBasicIdentifiers.java
index 188c6d1..8d128c6 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/basic/SimBasicIdentifiers.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/basic/SimBasicIdentifiers.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -29,7 +29,7 @@
/**
* Checks the sanity of HwConnection attributes.
- *
+ *
* <ul>
* <li>All names of IReferable objects must be valid C++ identifier names</li>
* </ul>
@@ -82,7 +82,7 @@
if (c != '_' && !Character.isLetter(c) && !Character.isDigit(c))
return false;
}
-
+
return true;
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/hardware/SimHwConnection.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/hardware/SimHwConnection.java
index b3998c5..3b97844 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/hardware/SimHwConnection.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/hardware/SimHwConnection.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Checks the sanity of HwConnection attributes.
- *
+ *
* <ul>
* <li>Read latency must be set</li>
* <li>Write latency must be set</li>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/hardware/SimHwMemoryDefinition.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/hardware/SimHwMemoryDefinition.java
index b5d2bc2..205c341 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/hardware/SimHwMemoryDefinition.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/hardware/SimHwMemoryDefinition.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Checks the sanity of MemoryDefinition attributes.
- *
+ *
* <ul>
* <li>Access latency must be set</li>
* <li>Data rate must be set</li>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/mapping/SimMappingSchedulerAllocation.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/mapping/SimMappingSchedulerAllocation.java
index f1051c0..4d04b99 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/mapping/SimMappingSchedulerAllocation.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/mapping/SimMappingSchedulerAllocation.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Checks the sanity of scheduler allocations.
- *
+ *
* <ul>
* <li>Executing processing unit must be set</li>
* </ul>
@@ -51,7 +51,7 @@
if (alloc.getExecutingPU() == null) {
addIssue(results, alloc, ePackage.getSchedulerAllocation_ExecutingPU(), "SchedulerAllocation: Executing processing unit must be set");
}
-
+
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/mapping/SimMappingTaskPriorityIsSet.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/mapping/SimMappingTaskPriorityIsSet.java
index be2695b..6fa546f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/mapping/SimMappingTaskPriorityIsSet.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/mapping/SimMappingTaskPriorityIsSet.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Checks the sanity of scheduler allocations.
- *
+ *
* <ul>
* <li>Executing processing unit must be set</li>
* </ul>
@@ -52,7 +52,7 @@
// if (alloc.getSchedulingParameters() == null || alloc.getSchedulingParameters().getPriority() == null ) {
// addIssue(results, alloc, ePackage.getTaskAllocation_Task(), "Priority of allocated task is not set");
// }
-
+
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/mapping/SimSchedulingParametersNegativePriority.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/mapping/SimSchedulingParametersNegativePriority.java
index 6de1487..b91105d 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/mapping/SimSchedulingParametersNegativePriority.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/mapping/SimSchedulingParametersNegativePriority.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -25,7 +25,7 @@
/**
* Checks the sanity of scheduler allocations.
- *
+ *
* <ul>
* <li>Executing processing unit must be set</li>
* </ul>
@@ -53,7 +53,7 @@
// if (param.getPriority() <0 ) {
// addIssue(results, param, ePackage.getSchedulingParameters_Priority(), "Scheduling parameter priority cannot be negative" );
// }
-//
+//
// }
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/os/SimOsSchedulerAllocation.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/os/SimOsSchedulerAllocation.java
index 2fb5c1e..7e9d73d 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/os/SimOsSchedulerAllocation.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/os/SimOsSchedulerAllocation.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -31,7 +31,7 @@
/**
* Checks if scheduler is referenced by one scheduler allocation mapping
- *
+ *
* <ul>
* <li>Each scheduler must be linked to a processing unit. Therefore a unique
* scheduler allocation mapping is necessary. Further checks (e.g. mapping to a
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareChannelAccessFeasibility.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareChannelAccessFeasibility.java
index 8f166df..48a929a 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareChannelAccessFeasibility.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareChannelAccessFeasibility.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -27,7 +27,7 @@
/**
* Checks feasibility of a memory access (channel or channel)
- *
+ *
* <ul>
* <li>Checks if a channel access is feasible for simulation. This requires that
* its memory location is accessible from each core, the access can be initiated
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareChannelElements.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareChannelElements.java
index c3edcae..795ac97 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareChannelElements.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareChannelElements.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Checks if channel access's property elements is greater 0
- *
+ *
* <ul>
* <li>Channel must specify the number of elements to be send/received, with elements > 0</li> T
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareChannelMapped.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareChannelMapped.java
index 5f2d0ef..9fb2043 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareChannelMapped.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareChannelMapped.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -27,7 +27,7 @@
/**
* Checks if an channel is mapped to a memory
- *
+ *
* <ul>
* <li>Channel must be mapped to a memory for simulation</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareLabelAccessFeasibility.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareLabelAccessFeasibility.java
index 391f813..caca73f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareLabelAccessFeasibility.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareLabelAccessFeasibility.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -27,7 +27,7 @@
/**
* Checks feasibility of a memory access (label or channel)
- *
+ *
* <ul>
* <li>Checks if a label access is feasible for simulation. This requires that
* its memory location is accessible from each core, the access can be initiated
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareLabelAccessType.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareLabelAccessType.java
index 0a57d1e..eb9cbc0 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareLabelAccessType.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareLabelAccessType.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -27,7 +27,7 @@
/**
* Checks if an label is mapped to a memory node
- *
+ *
* <ul>
* <li>Label access must be either read or write</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareLabelMapped.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareLabelMapped.java
index c4eeb92..a236a4f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareLabelMapped.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareLabelMapped.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -27,7 +27,7 @@
/**
* Checks if an label is mapped to a memory node
- *
+ *
* <ul>
* <li>Label must be mapped to a memory for simulation.</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareMemoryAccessHelper.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareMemoryAccessHelper.java
index 53c0a10..6c92347 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareMemoryAccessHelper.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareMemoryAccessHelper.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -50,7 +50,7 @@
if (memories.isEmpty() || memories.size() > 1) {
/*
* No memory location was found for this label. As this check is part of another validation we will
- * return at this point without adding an issue. This validation may be re-run when the mapping is
+ * return at this point without adding an issue. This validation may be re-run when the mapping is
* complete.
*/
return true;
@@ -80,15 +80,15 @@
processingUnits.addAll(schedulerAllocation.getResponsibility());
}
}
- }
+ }
if (processingUnits.isEmpty()) {
/*
* No executing was found for the (task/ISR) contexts in which this activity item's runnable may be launched.
* This is not per se a problem within this validation since the mapping of tasks to schedulers, and schedulers to cores
* is handled in other validations. However it prevents this validation from checking, if a valid hw access element has been defined.
- * Therefore we return at this point without adding issues, only when the mappings are complete, this needs to be evaluated as
- * a task/scheduler combination that is not fully mapped will not be brought to execution. When the mapping is complete this validation
+ * Therefore we return at this point without adding issues, only when the mappings are complete, this needs to be evaluated as
+ * a task/scheduler combination that is not fully mapped will not be brought to execution. When the mapping is complete this validation
* may be re-run to completion.
*
*/
@@ -97,7 +97,7 @@
for (ProcessingUnit processingUnit : processingUnits) {
for (Memory memory : memories) {
- Set<HwAccessElement> hwAccessElements =
+ Set<HwAccessElement> hwAccessElements =
AmaltheaIndex.getReferringObjects(memory,HwAccessElement.class);
boolean foundAccessElement = false;
for (HwAccessElement hwAccessElement : hwAccessElements) {
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareModeLabelAccessFeasibility.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareModeLabelAccessFeasibility.java
index 0464548..b730388 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareModeLabelAccessFeasibility.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareModeLabelAccessFeasibility.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -27,7 +27,7 @@
/**
* Checks feasibility of a memory access (modeLabel or channel)
- *
+ *
* <ul>
* <li>Checks if a modeLabel access is feasible for simulation. This requires
* that its memory location is accessible from each core, the access can be
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareModeLabelAccessType.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareModeLabelAccessType.java
index 79aa52f..82dff56 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareModeLabelAccessType.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareModeLabelAccessType.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -29,7 +29,7 @@
/**
* Checks if an modeLabel access has valid access type
* (read/set/increment/decrement)
- *
+ *
* <ul>
* <li>ModeLabel access must be either read or write</li>
* </ul>
@@ -53,15 +53,15 @@
if (eObject instanceof ModeLabelAccess) {
ModeLabelAccess modeLabelAccess= (ModeLabelAccess)eObject;
-// if (!(modeLabelAccess.getAccess() == ModeLabelAccessEnum.READ ||
-// modeLabelAccess.getAccess() == ModeLabelAccessEnum.SET||
-// modeLabelAccess.getAccess() == ModeLabelAccessEnum.INCREMENT||
+// if (!(modeLabelAccess.getAccess() == ModeLabelAccessEnum.READ ||
+// modeLabelAccess.getAccess() == ModeLabelAccessEnum.SET||
+// modeLabelAccess.getAccess() == ModeLabelAccessEnum.INCREMENT||
// modeLabelAccess.getAccess() == ModeLabelAccessEnum.DECREMENT)) {
// addIssue(results, modeLabelAccess, null, getMessage());
// }
if (modeLabelAccess.getAccess() == null || modeLabelAccess.getAccess() == ModeLabelAccessEnum._UNDEFINED_) {
- addIssue(results, modeLabelAccess, null, MESSAGE);
+ addIssue(results, modeLabelAccess, null, MESSAGE);
}
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareModeLabelMapped.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareModeLabelMapped.java
index b4468fd..46da2e2 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareModeLabelMapped.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareModeLabelMapped.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -27,7 +27,7 @@
/**
* Checks if an modeLabel is mapped to a memory
- *
+ *
* <ul>
* <li>ModeLabel must be mapped to a memory for simulation.</li> T
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareProcess.java b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareProcess.java
index d3fe7a2..d76fe73 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareProcess.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.sim/src/org/eclipse/app4mc/amalthea/validations/sim/software/SimSoftwareProcess.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Checks the sanity of process attributes.
- *
+ *
* <ul>
* <li>At least one stimulus must be set</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validation/core/AmaltheaValidation.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validation/core/AmaltheaValidation.java
index 6648483..c6699a2 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validation/core/AmaltheaValidation.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validation/core/AmaltheaValidation.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -55,17 +55,17 @@
protected String qualifiedName(final IReferable object) {
if (object == null) return "?";
- return "\"" + object.getQualifiedName() + "\"";
+ return "\"" + object.getQualifiedName() + "\"";
}
-
+
protected String namedContainerInfo(final EObject object) {
return " ( in " + objectInfo(AmaltheaServices.getContainerOfType(object, INamed.class)) + " )";
}
-
+
@Override
public String objectInfo(final EObject object) {
if (object == null) return "?";
-
+
String s1 = typeInfo(object);
String s2 = (object instanceof INamed) ? " " + name((INamed) object) : "";
return s1 + s2;
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/OSProfile.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/OSProfile.java
index 2e80995..de3a981 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/OSProfile.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/OSProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/SoftwareProfile.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/SoftwareProfile.java
index 03e6f56..b72c74c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/SoftwareProfile.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/SoftwareProfile.java
@@ -27,7 +27,7 @@
@ValidationGroup(
severity = Severity.ERROR,
- validations = {
+ validations = {
AmSwCallArgument.class,
AmSwDataDependency.class,
AmSwGroup.class
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicCounter.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicCounter.java
index c3b4cdc9..6a888b1 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicCounter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicCounter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2020 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -25,7 +25,7 @@
/**
* Checks the correctness of counters
-*
+*
* <ul>
* <li>The offset value of a counter must not be negative</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicCustomPropertyKey.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicCustomPropertyKey.java
index 2bcaeb5..a592b31 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicCustomPropertyKey.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicCustomPropertyKey.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -31,7 +31,7 @@
/**
* Checks the correctness of objects with custom properties
- *
+ *
* <ul>
* <li>Custom property keys have to be unique</li>
* </ul>
@@ -52,7 +52,7 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof IAnnotatable) {
IAnnotatable anno = (IAnnotatable) object;
-
+
// Map of key -> isFirst
final Map<String, Boolean> visitedKeys = new HashMap<>();
@@ -61,11 +61,11 @@
if (visitedKeys.containsKey(key)) {
if (Boolean.TRUE.equals(visitedKeys.get(key))) {
// second entry: report duplicate
-
+
// AmaltheaPackage.eINSTANCE.getCustomProperty_Key()
addIssue(results, anno, ePackage.getIAnnotatable_CustomProperties(),
"CustomProperty: duplicate key \"" + key + "\" ( in " + objectInfo(anno) + " )");
-
+
// mark key as duplicate that already has been reported
visitedKeys.put(key, false);
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicDataSize.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicDataSize.java
index 6386b68..19870a8 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicDataSize.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicDataSize.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2020 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Checks the correctness of data sizes
- *
+ *
* <ul>
* <li>Some data sizes have to fulfill the condition >0 or >=0</li>
* </ul>
@@ -56,7 +56,7 @@
if (containingFeature == null) {
return;
}
-
+
// check for features where data size has to be positive (>0)
if (containingFeature == ePackage.getAbstractMemoryElement_Size()) {
addIssue(results, ds, ePackage.getDataSize_Value(),
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicFrequency.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicFrequency.java
index 09d455e..2535e4d 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicFrequency.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicFrequency.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -27,7 +27,7 @@
/**
* Checks the correctness of Frequencies
- *
+ *
* <ul>
* <li>Some frequencies have to fulfill the condition >0 (validation >=0 is already covered by EMF)</li>
* </ul>
@@ -51,13 +51,13 @@
if (frequency.getValue() > 0d)
return; // always valid
-
+
final EStructuralFeature containingFeature = frequency.eContainingFeature();
if (containingFeature == null)
return; // unknown context
-
+
//*** the value of the following elements should be > 0
-
+
if (frequency.getValue() <= 0d) {
if (containingFeature == ePackage.getFrequencyDomain_DefaultValue()
|| containingFeature == ePackage.getClockFunction_YOffset()
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicQuantity.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicQuantity.java
index bb65742..e3530eb 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicQuantity.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicQuantity.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -28,7 +28,7 @@
/**
* Checks the correctness of Quantity
- *
+ *
* <ul>
* <li>Quantity unit has to be set (_undefined_ is an error)</li>
* </ul>
@@ -51,7 +51,7 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof Quantity) {
Quantity quantity = (Quantity) object;
-
+
Object unit = attributeValue(quantity, UNIT);
if (unit instanceof Enumerator) {
Enumerator unitEnum = (Enumerator) unit;
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicTimeRange.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicTimeRange.java
index e322f45..e5b7c07 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicTimeRange.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/basic/AmBasicTimeRange.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -28,7 +28,7 @@
/**
* Checks the correctness of Time ranges
- *
+ *
* <ul>
* <li>Some time ranges has to fulfill the condition >0 or >=0</li>
* </ul>
@@ -52,18 +52,18 @@
if (time.getValue().signum() > 0)
return; // always valid
-
+
final EStructuralFeature containingFeature = time.eContainingFeature();
if (containingFeature == null)
return; // unknown context
-
+
//*** the value of the following elements should be > 0
-
+
if (time.getValue().signum() <= 0) {
if (containingFeature == ePackage.getFixedPeriodic_Recurrence()
-
+
|| containingFeature == ePackage.getPeriodicActivation_Recurrence()
-
+
|| containingFeature == ePackage.getClockFunction_Period()
|| containingFeature == ePackage.getClockStepList_Period()
) {
@@ -73,41 +73,41 @@
}
//*** the value of the following elements should be >= 0
-
+
if (time.getValue().signum() < 0) {
if (containingFeature == ePackage.getFixedPeriodic_Offset()
-
+
|| containingFeature == ePackage.getSingleStimulus_Occurrence()
-
+
|| containingFeature == ePackage.getArrivalCurveEntry_LowerTimeBorder()
|| containingFeature == ePackage.getArrivalCurveEntry_UpperTimeBorder()
-
+
|| containingFeature == ePackage.getPeriodicSyntheticStimulus_OccurrenceTimes()
-
+
|| containingFeature == ePackage.getPeriodicActivation_Offset()
|| containingFeature == ePackage.getPeriodicActivation_Min()
|| containingFeature == ePackage.getPeriodicActivation_Max()
-
+
|| containingFeature == ePackage.getSingleActivation_Min()
|| containingFeature == ePackage.getSingleActivation_Max()
|| containingFeature == ePackage.getClockFunction_XOffset()
|| containingFeature == ePackage.getClockStep_Time()
-
+
|| containingFeature == ePackage.getDataAgeTime_MinimumTime()
|| containingFeature == ePackage.getDataAgeTime_MaximumTime()
-
+
|| containingFeature == ePackage.getDelayConstraint_Lower()
|| containingFeature == ePackage.getDelayConstraint_Upper()
-
+
|| containingFeature == ePackage.getEventChainLatencyConstraint_Minimum()
|| containingFeature == ePackage.getEventChainLatencyConstraint_Maximum()
-
+
|| containingFeature == ePackage.getRepetitionConstraint_Lower()
|| containingFeature == ePackage.getRepetitionConstraint_Upper()
|| containingFeature == ePackage.getRepetitionConstraint_Jitter()
|| containingFeature == ePackage.getRepetitionConstraint_Period()
-
+
|| containingFeature == ePackage.getSynchronizationConstraint_Tolerance()
) {
addIssue(results, time, ePackage.getTime_Value(),
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/emf/AmEmfScope.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/emf/AmEmfScope.java
index 98e1ce5..1ebe889 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/emf/AmEmfScope.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/emf/AmEmfScope.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -30,7 +30,7 @@
/**
* Checks EMF scope
- *
+ *
* <ul>
* <li>ID has to be unique in folder scope</li>
* <li>ID has to be set for {@link IReferable}</li>
@@ -53,25 +53,25 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof Amalthea) {
Amalthea root = (Amalthea) object;
-
+
List<Set<IReferable>> conflictingObjects = AmaltheaIndex.getObjectsWithConflictingNames(root);
for (Set<IReferable> set : conflictingObjects) {
for (IReferable element : set) {
addIssue(results, element, ePackage.getINamed_Name(),
- typeInfo(element) + ": duplicate name " + qualifiedName(element));
+ typeInfo(element) + ": duplicate name " + qualifiedName(element));
}
}
-
+
// Already implemented as EMF invariant
//
// Set<IReferable> unnamedObjects = AmaltheaIndex.getElements(root, "", IReferable.class);
-//
+//
// for (IReferable element : unnamedObjects) {
// addIssue(results, element, ePackage.getINamed_Name(),
-// typeInfo(element) + ": missing name");
+// typeInfo(element) + ": missing name");
// }
-
+
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwAccessPath.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwAccessPath.java
index 872881b..033f8af 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwAccessPath.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwAccessPath.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -35,7 +35,7 @@
/**
* Checks the correctness of HwAccessPath
- *
+ *
* <ul>
* <li>HwAccessPath ranges and memory size must be consistent</li>
* <li>HwAccessPath elements must be consistent</li>
@@ -60,22 +60,22 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof HwAccessPath) {
HwAccessPath path = (HwAccessPath) object;
-
+
boolean performRangeCheck = true;
Memory memory = null;
MemoryDefinition memoryDef = null;
-
+
// ***** HwAccessPath ranges and memory size must be consistent
-
+
long addressRange = path.getEndAddress() - path.getStartAddress();
long requiredSize = path.getMemOffset() + addressRange;
-
+
if (addressRange < 0) {
addIssue(results, path, ePackage.getHwAccessPath_EndAddress(),
HW_ACCESS_PATH + name(path) + ": Start address > End address");
performRangeCheck = false; // address range is invalid
}
-
+
if (path.getDestination() instanceof Memory) {
memory = (Memory) path.getDestination();
memoryDef = memory.getDefinition();
@@ -87,25 +87,25 @@
} else {
performRangeCheck = false; // destination is not of type Memory
}
-
+
if (performRangeCheck && requiredSize > memoryDef.getSize().getNumberBytes()) {
addIssue(results, path, ePackage.getHwAccessPath_EndAddress(),
HW_ACCESS_PATH + name(path) + ": Address range > Memory size");
}
-
+
// ***** HwAccessPath elements must be consistent
-
+
EList<HwPathElement> pathElements = path.getPathElements();
-
+
if (pathElements.isEmpty()) return; // no further checks possible
-
+
ProcessingUnit source = path.getSource();
HwDestination destination = path.getDestination();
HwPathElement first = pathElements.get(0);
HwPathElement last = pathElements.get(pathElements.size() - 1);
-
+
if (first instanceof HwConnection) {
- // check if source has a common port with the first path element
+ // check if source has a common port with the first path element
if (Collections.disjoint(source.getPorts(), first.getPorts())) {
addIssue(results, path, ePackage.getHwAccessPath_PathElements(),
HW_ACCESS_PATH + name(path) + ": No common port at the beginning of the path");
@@ -114,13 +114,13 @@
addIssue(results, path, ePackage.getHwAccessPath_PathElements(),
HW_ACCESS_PATH + name(path) + ": First path element must be a connection");
}
-
+
if (last instanceof HwConnection) {
if (destination == null) {
addIssue(results, path, ePackage.getHwPath_Destination(),
HW_ACCESS_PATH + name(path) + ": Destination is undefined");
} else {
- // check if destination has a common port with the last path element
+ // check if destination has a common port with the last path element
if (Collections.disjoint(destination.getPorts(), last.getPorts())) {
addIssue(results, path, ePackage.getHwAccessPath_PathElements(),
HW_ACCESS_PATH + name(path) + ": No common port at the end of the path");
@@ -130,15 +130,15 @@
addIssue(results, path, ePackage.getHwAccessPath_PathElements(),
HW_ACCESS_PATH + name(path) + ": Last path element must be a connection");
}
-
+
if (pathElements.size() < 2) return; // no further checks possible
-
+
// iterate over list
-
+
for (int i = 0; i < pathElements.size() - 1; i++) {
HwPathElement item1 = pathElements.get(i);
HwPathElement item2 = pathElements.get(i + 1);
-
+
if (Collections.disjoint(item1.getPorts(), item2.getPorts())) {
addIssue(results, path, ePackage.getHwAccessPath_PathElements(),
HW_ACCESS_PATH + name(path) + ": No common port between element[" + i + "] and element[" + (i+1) + "]");
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwConnection.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwConnection.java
index 33f4979..bee3d3d 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwConnection.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwConnection.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -28,7 +28,7 @@
/**
* Checks the correctness of HwConnection
- *
+ *
* <ul>
* <li>HwConnections must refer to two HwPorts</li>
* <li>HwConnections must be linked to HwPorts of the same Interface</li>
@@ -53,36 +53,36 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof HwConnection) {
HwConnection connection = (HwConnection) object;
-
+
boolean continueChecks = true;
HwPort port1 = connection.getPort1();
HwPort port2 = connection.getPort2();
-
+
// ***** HwConnections must refer to two HwPorts
-
+
if (port1 == null) {
addIssue(results, connection, ePackage.getHwConnection_Port1(),
HW_CONNECTION + qualifiedName(connection) + ": Port 1 is missing");
continueChecks = false;
}
-
+
if (port2 == null) {
addIssue(results, connection, ePackage.getHwConnection_Port2(),
HW_CONNECTION + qualifiedName(connection) + ": Port 2 is missing");
continueChecks = false;
}
-
+
if (port1 != null && port1 == port2) {
addIssue(results, connection, ePackage.getHwConnection_Port1(),
HW_CONNECTION + qualifiedName(connection) + ": Port 1 equals port 2");
continueChecks = false;
}
-
+
if (!continueChecks)
return; // fundamental error -> no further checks
-
+
// ***** HwConnections must be linked to HwPorts of the same Interface
-
+
if (!connection.isInternal() // internal connection -> no error
&& port1.getPortInterface() != PortInterface._UNDEFINED_ // undefined -> no error
&& port2.getPortInterface() != PortInterface._UNDEFINED_
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwDefinition.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwDefinition.java
index 47712ee..bf6ac10 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwDefinition.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwDefinition.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -31,7 +31,7 @@
/**
* Checks the correctness of HwDefinition
- *
+ *
* <ul>
* <li>Only one feature of a category can be referred</li>
* </ul>
@@ -52,7 +52,7 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof HwDefinition) {
HwDefinition definition = (HwDefinition) object;
-
+
// currently only ProcessingUnitDefinitions have references to HwFeatures
if (definition instanceof ProcessingUnitDefinition) {
ProcessingUnitDefinition puDef = (ProcessingUnitDefinition) definition;
@@ -60,7 +60,7 @@
final Map<HwFeatureCategory, HwFeature> visitedCategories = new HashMap<>();
for (final HwFeature feature : puDef.getFeatures()) {
final HwFeatureCategory category = feature.getContainingCategory();
-
+
if (visitedCategories.containsKey(category)) {
final HwFeature firstFeature = visitedCategories.put(category, null);
if (firstFeature != null) {
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwModuleDefinition.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwModuleDefinition.java
index 6895a60..ca3cb8b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwModuleDefinition.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwModuleDefinition.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -30,7 +30,7 @@
/**
* Checks the correctness of HwModule definitions
- *
+ *
* <ul>
* <li>Memory definition must be set</li>
* <li>ProcessingUnit definition must be set</li>
@@ -59,9 +59,9 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof HwModule) {
HwModule module = (HwModule) object;
-
+
// ***** Memory definition must be set
-
+
if (module instanceof Memory) {
Memory memory = (Memory) module;
if (memory.getDefinition() == null) {
@@ -69,9 +69,9 @@
"HW Module (Memory) " + name(module) + MISSING_DEFINITION);
}
}
-
+
// ***** ProcessingUnit definition must be set
-
+
if (module instanceof ProcessingUnit) {
ProcessingUnit pu = (ProcessingUnit) module;
if (pu.getDefinition() == null) {
@@ -79,9 +79,9 @@
"HW Module (ProcessingUnit) " + name(module) + MISSING_DEFINITION);
}
}
-
+
// ***** ConnectionHandler definition must be set
-
+
if (module instanceof ConnectionHandler) {
ConnectionHandler handler = (ConnectionHandler) module;
if (handler.getDefinition() == null) {
@@ -89,9 +89,9 @@
"HW Module (ConnectionHandler) " + name(module) + MISSING_DEFINITION);
}
}
-
+
// ***** Cache definition must be set
-
+
if (module instanceof Cache) {
Cache cache = (Cache) module;
if (cache.getDefinition() == null) {
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwPort.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwPort.java
index ab9fc20..3a2e46a 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwPort.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwPort.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -28,7 +28,7 @@
/**
* Checks the correctness of HwPort
- *
+ *
* <ul>
* <li>A HwPort can only have one (non internal) HwConnection</li>
* </ul>
@@ -49,12 +49,12 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof HwPort) {
HwPort port = (HwPort) object;
-
+
// ***** A HwPort can only have one (non internal) HwConnection
-
+
if (port.isDelegated())
return; // ignore HwStructure ports
-
+
EList<HwConnection> connections = port.getConnections();
if (connections.size() > 1) {
int counter = 0;
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwPortBitWidth.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwPortBitWidth.java
index 2e52103..e1b94ba 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwPortBitWidth.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwPortBitWidth.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Checks the correctness of HwPort enumerations
- *
+ *
* <ul>
* <li>PortType must be set</li>
* <li>PortInterface must be set</li>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwPortEnumerations.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwPortEnumerations.java
index f628970..c69df4f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwPortEnumerations.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwPortEnumerations.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -28,7 +28,7 @@
/**
* Checks the correctness of HwPort enumerations
- *
+ *
* <ul>
* <li>PortType must be set</li>
* <li>PortInterface must be set</li>
@@ -51,16 +51,16 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof HwPort) {
HwPort port = (HwPort) object;
-
+
// ***** PortType must be set
-
+
if (port.getPortType() == PortType._UNDEFINED_) {
addIssue(results, port, ePackage.getHwPort_PortType(),
"HW Port " + qualifiedName(port) + ": undefined port type");
}
-
+
// ***** PortInterface must be set
-
+
if (port.getPortInterface() == PortInterface._UNDEFINED_) {
addIssue(results, port, ePackage.getHwPort_PortInterface(),
"HW Port " + qualifiedName(port) + ": undefined port interface");
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwStructure.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwStructure.java
index 3958866..86b184c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwStructure.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/hardware/AmHwStructure.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -56,23 +56,23 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof HwStructure) {
HwStructure structure = (HwStructure) object;
-
+
final HashSet<HwModule> subModules = new HashSet<>(AmaltheaServices.getAllModules(structure));
final HashSet<HwStructure> subStructures = new HashSet<>(structure.getStructures());
-
+
// check for each connection of structure
for (HwConnection conn : structure.getConnections()) {
boolean p1InnerPort = false;
boolean p1OuterPort = false;
boolean p2InnerPort = false;
boolean p2OuterPort = false;
-
+
HwPort port1 = conn.getPort1();
HwPort port2 = conn.getPort2();
// fundamental checks are handled in method checkHwConnection(HwConnection)
if (port1 == null || port2 == null || port1 == port2)
break;
-
+
EObject container1 = port1.eContainer();
if (subModules.contains(container1) || subStructures.contains(container1)) {
p1InnerPort = true;
@@ -82,7 +82,7 @@
// It is only a recommendation (perhaps a future warning)
// addIssue(results, conn, "HW Connection " + name(conn) + ": Port 1 is not contained in structure");
}
-
+
EObject container2 = port2.eContainer();
if (subModules.contains(container2) || subStructures.contains(container2)) {
p2InnerPort = true;
@@ -92,9 +92,9 @@
// It is only a recommendation (perhaps a future warning)
// addIssue(results, conn, "HW Connection " + name(conn) + ": Port 2 is not contained in structure");
}
-
+
if ((p1InnerPort && p2InnerPort) || (p1OuterPort && p2OuterPort)) {
-
+
// ***** regular test: HwConnections always need one Initiator and one Responder
// HwPort
if ((port1.getPortType() == PortType.INITIATOR && port2.getPortType() == PortType.INITIATOR)
@@ -102,9 +102,9 @@
addIssue(results, conn, ePackage.getHwConnection_Port1(),
"HW Connection " + qualifiedName(conn) + ": Port types do not fulfill initiator -> responder");
}
-
+
} else if ((p1InnerPort && p2OuterPort) || (p1OuterPort && p2InnerPort)) {
-
+
// ***** delegate test: HwConnections always need one Initiator and one
// Responder HwPort
if ((port1.getPortType() == PortType.INITIATOR && port2.getPortType() == PortType.RESPONDER)
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingIsrScheduler.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingIsrScheduler.java
index 62e5293..7ddf867 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingIsrScheduler.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingIsrScheduler.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -29,7 +29,7 @@
/**
* Checks the correctness of ISR -> Scheduler mapping
- *
+ *
* <ul>
* <li>An ISR should have an allocation to an interrupt controller</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingSchedulerAllocationHierarchy.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingSchedulerAllocationHierarchy.java
index ed50933..4a0d7b3 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingSchedulerAllocationHierarchy.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingSchedulerAllocationHierarchy.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -31,7 +31,7 @@
/**
* Checks the correctness of SchedulerAllocations for hierarchical task schedulers.
- *
+ *
* <ul>
* <li>A child scheduler should only be responsible for a subset of processing units of its ancestors</li>
* </ul>
@@ -55,11 +55,11 @@
final Scheduler sched = sall.getScheduler();
if (sched == null || !(sched instanceof TaskScheduler)) return; // only task schedulers can be hierarchical
-
+
final TaskScheduler ts = (TaskScheduler)sched;
// skip empty responsibilities or top level schedulers
if (sall.getResponsibility().isEmpty() || null == ts.getParentScheduler()) return;
-
+
final Set<ProcessingUnit> ancestorResponsibilities = new HashSet<>();
TaskScheduler parent = ts.getParentScheduler();
do {
@@ -67,8 +67,8 @@
.forEach(ancestorResponsibilities::addAll);
parent = parent.getParentScheduler();
} while (ancestorResponsibilities.isEmpty() && null != parent);
-
- if (false == ancestorResponsibilities.containsAll(sall.getResponsibility())) {
+
+ if (!ancestorResponsibilities.containsAll(sall.getResponsibility())) {
addIssue(results, sall, ePackage.getSchedulerAllocation_Responsibility(), objectInfo(sall)
+ " for child " + objectInfo(ts) + " should only be responsible for a "
+ "subset of processing units of its parent schedulers");
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingSchedulerAllocationTopLevelResponsibility.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingSchedulerAllocationTopLevelResponsibility.java
index 392cc16..bb8e0c0 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingSchedulerAllocationTopLevelResponsibility.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingSchedulerAllocationTopLevelResponsibility.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -33,7 +33,7 @@
/**
* Checks the correctness of SchedulerAllocations per processing unit.
- *
+ *
* <ul>
* <li>A processing unit should have at most one interrupt controller responsible for it</li>
* <li>A processing unit should have at most one top level scheduler responsible for it</li>
@@ -55,21 +55,21 @@
public void validate(EObject object, List<ValidationDiagnostic> results) {
if (object instanceof MappingModel) {
final MappingModel mm = (MappingModel) object;
-
+
// sets to check for multiple core responsibilities
final Set<ProcessingUnit> pUsWithTLScheduler = new HashSet<>();
final Set<ProcessingUnit> pUsWithIC = new HashSet<>();
-
+
for(final SchedulerAllocation sall:mm.getSchedulerAllocation()) {
if (null == sall.getScheduler()) continue; // skip allocations without scheduler value
-
+
final Scheduler sched = sall.getScheduler();
for(final ProcessingUnit pu:sall.getResponsibility()) {
if (sched instanceof InterruptController && !pUsWithIC.add(pu)) {
addIssue(results, sall, ePackage.getSchedulerAllocation_Responsibility(), objectInfo(pu)
+ " should have at most one interrupt controller that is responsible for it");
}
-
+
if (sched instanceof TaskScheduler && ((TaskScheduler)sched).getParentScheduler() == null && !pUsWithTLScheduler.add(pu)) {
addIssue(results, sall, ePackage.getSchedulerAllocation_Responsibility(), objectInfo(pu)
+ " should have at most one top level scheduler that is responsible for it");
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingSchedulerProcessingUnit.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingSchedulerProcessingUnit.java
index 0bd0736..8c6cb7b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingSchedulerProcessingUnit.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingSchedulerProcessingUnit.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -29,7 +29,7 @@
/**
* Checks the correctness of Scheduler -> ProcessingUnit mapping
- *
+ *
* <ul>
* <li>A top level scheduler should be responsible for at least one processing unit</li>
* </ul>
@@ -50,11 +50,11 @@
public void validate(EObject object, List<ValidationDiagnostic> results) {
if (object instanceof Scheduler) {
Scheduler sched = (Scheduler) object;
-
+
if (sched instanceof TaskScheduler && ((TaskScheduler)sched).getParentScheduler() != null) {
return; // no core responsibility required for child schedulers
}
-
+
EList<SchedulerAllocation> allocations = sched.getSchedulerAllocations();
if (allocations.isEmpty()) {
addIssue(results, sched, null, "Scheduler not responsible for any core: " + name(sched));
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingTaskScheduler.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingTaskScheduler.java
index 0dde266..5006a40 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingTaskScheduler.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/mapping/AmMappingTaskScheduler.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -29,7 +29,7 @@
/**
* Checks the correctness of Task -> Scheduler mapping
- *
+ *
* <ul>
* <li>A task should have an allocation to a task scheduler</li>
* </ul>
@@ -50,7 +50,7 @@
public void validate(EObject object, List<ValidationDiagnostic> results) {
if (object instanceof Task) {
Task task = (Task) object;
-
+
Set<TaskAllocation> allocations = AmaltheaIndex.getReferringObjects(task, TaskAllocation.class);
if (allocations.isEmpty()) {
addIssue(results, task, null, "Unmapped task found: " + name(task));
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/misc/AmConstraintsEventChain.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/misc/AmConstraintsEventChain.java
index f1824e9..d0d6d36 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/misc/AmConstraintsEventChain.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/misc/AmConstraintsEventChain.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -32,7 +32,7 @@
/**
* Checks the correctness of event chains
- *
+ *
* <ul>
* <li>Stimulus and response shall not reference the same event</li>
* <li>The stimulus of the first segment has to be the same as the stimulus of the event chain</li>
@@ -61,7 +61,7 @@
public void validate(EObject object, List<ValidationDiagnostic> results) {
if (object instanceof AbstractEventChain) {
AbstractEventChain chain = (AbstractEventChain) object;
-
+
checkChainConsistency(chain, results);
}
}
@@ -76,13 +76,13 @@
AmaltheaPackage.eINSTANCE.getAbstractEventChain_Stimulus(),
EVENT_CHAIN + name(eventChain) + ": stimulus and response refer to the same event");
}
-
+
switch (eventChain.getItemType()) {
case SEQUENCE:
- checkSequence(eventChain, eventChain.getItems(), results);
+ checkSequence(eventChain, eventChain.getItems(), results);
break;
case PARALLEL:
- checkParallel(eventChain, eventChain.getItems(), results);
+ checkParallel(eventChain, eventChain.getItems(), results);
break;
default:
@@ -123,7 +123,7 @@
for (int i = 0; i < subEventChains.size() - 1; i++) {
AbstractEventChain current = subEventChains.get(i);
AbstractEventChain next = subEventChains.get(i + 1);
-
+
if (current.getResponse() != next.getStimulus()) {
addIssue(results, eventChain,
AmaltheaPackage.eINSTANCE.getAbstractEventChain_Items(),
@@ -133,20 +133,20 @@
}
private void checkParallel(final AbstractEventChain eventChain, final EList<EventChainItem> eventChainItems, List<ValidationDiagnostic> results) {
-
+
if (eventChainItems == null || eventChainItems.isEmpty()) return;
-
+
if (eventChainItems.contains(null)) {
addIssue(results, eventChain,
AmaltheaPackage.eINSTANCE.getAbstractEventChain_Items(),
EVENT_CHAIN + name(eventChain) + ": parallel item list contains null reference");
}
-
+
List<AbstractEventChain> subEventChains = eventChainItems.stream()
.map(EventChainItem::getEventChain)
.filter(Objects::nonNull)
.collect(Collectors.toList());
-
+
for (AbstractEventChain subEC : subEventChains) {
// check stimuli (should be identical)
if (eventChain.getStimulus() != subEC.getStimulus()) {
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSMandatorySchedulingParametersSet.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSMandatorySchedulingParametersSet.java
index fda4a8c..f3d8027 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSMandatorySchedulingParametersSet.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSMandatorySchedulingParametersSet.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -40,7 +40,7 @@
/**
* Checks for each scheduler, if mandatory parameters are set.
- *
+ *
* <ul>
* <li>Mandatory algorithm scheduling parameters must be set.</li>
* <li>Mandatory process scheduling parameters for task and ISR allocations must be set.</li>
@@ -63,17 +63,17 @@
public void validate(EObject object, List<ValidationDiagnostic> results) {
if (object instanceof Scheduler) {
final Scheduler sc = (Scheduler) object;
-
+
if (sc.getDefinition() == null) return;
-
+
final Map<Pair<EObject, EStructuralFeature>, List<SchedulingParameterDefinition>> missingSPs = new LinkedHashMap<>();
-
+
// check algorithm parameters
final List<SchedulingParameterDefinition> missingMandatoryAlgorithmParameterDefs = sc.getDefinition().getAlgorithmParameters()
.stream().filter(SchedulingParameterDefinition::isMandatory).collect(Collectors.toList());
sc.getSchedulingParameters().stream().map(Entry::getKey).forEach(missingMandatoryAlgorithmParameterDefs::remove);
missingSPs.put(new Pair<>(sc, ePackage.getISchedulingParameterContainer_SchedulingParameters()), missingMandatoryAlgorithmParameterDefs);
-
+
final List<SchedulingParameterDefinition> mandatoryProcessParameterDefs = sc.getDefinition().getProcessParameters()
.stream().filter(SchedulingParameterDefinition::isMandatory).collect(Collectors.toList());
if (sc instanceof TaskScheduler) {
@@ -85,7 +85,7 @@
// TODO: consider grouping schedulers - look for parent scheduler parameters
missingSPs.put(new Pair<>(ta, ePackage.getISchedulingParameterContainer_SchedulingParameters()), perTAMissing);
}
-
+
// check scheduler association parameters
for(final SchedulerAssociation sa:ts.getChildAssociations()) {
final List<SchedulingParameterDefinition> perSAMissing = new ArrayList<>(mandatoryProcessParameterDefs);
@@ -103,7 +103,7 @@
missingSPs.put(new Pair<>(ia, ePackage.getISRAllocation_Priority()), perIAMissing);
}
}
-
+
missingSPs.forEach((eo, missingList) -> missingList.forEach(missing ->
addIssue(results, eo.getKey(), eo.getValue(), "Mandatory scheduling parameter \"" + missing.getName()
+ "\" is not set for " + objectInfo(eo.getKey()))
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSSchedulingParameterEmptyOverriddenValue.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSSchedulingParameterEmptyOverriddenValue.java
index 5c947fd..6d410af 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSSchedulingParameterEmptyOverriddenValue.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSSchedulingParameterEmptyOverriddenValue.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -28,7 +28,7 @@
/**
* Checks whether an overridden scheduling parameter actually provides a value.
- *
+ *
* <ul>
* <li>An overridden scheduling parameter should provide a value.</li>
* </ul>
@@ -49,12 +49,12 @@
public void validate(EObject object, List<ValidationDiagnostic> results) {
if (object instanceof SchedulingParameterImpl) {
final SchedulingParameterImpl sp = (SchedulingParameterImpl) object;
-
+
if (sp.getKey() == null) return; // checked by standard EMF validations
-
+
final List<Value> values = AmOSSchedulingParameterMultiplicityMatchesDefinition.getAllValues(sp.getValue());
final SchedulingParameterDefinition spd = sp.getKey();
-
+
if (spd.eIsSet(ePackage.getSchedulingParameterDefinition_DefaultValue()) && values.isEmpty()) {
final String message = "There should be " + (spd.isMany() ? "at least one" : "a")
+ " value provided for the overridden " + typeInfo(sp) + " \"" + spd.getName()
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSSchedulingParameterMultiplicityMatchesDefinition.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSSchedulingParameterMultiplicityMatchesDefinition.java
index aaf1e97..de05124 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSSchedulingParameterMultiplicityMatchesDefinition.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSSchedulingParameterMultiplicityMatchesDefinition.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -30,7 +30,7 @@
/**
* Checks whether the multiplicity of scheduling parameters matches the parameter definition.
- *
+ *
* <ul>
* <li>Number of scheduling parameter values must match their parameter definition.</li>
* </ul>
@@ -51,12 +51,12 @@
public void validate(EObject object, List<ValidationDiagnostic> results) {
if (object instanceof SchedulingParameterImpl) {
final SchedulingParameterImpl sp = (SchedulingParameterImpl) object;
-
+
if (sp.getKey() == null) return; // checked by standard EMF validations
-
+
final List<Value> values = getAllValues(sp.getValue());
final SchedulingParameterDefinition spd = sp.getKey();
-
+
if (spd.isMandatory() && values.isEmpty()) {
final String message = "There is no value for " + typeInfo(sp) + " \"" + sp.getKey().getName()
+ "\" - the " + typeInfo(sp.getKey()) + " requires " + (spd.isMany() ? "at least" : "exactly") + " one value";
@@ -69,7 +69,7 @@
}
}
}
-
+
static List<Value> getAllValues(final Value value) {
final List<Value> ret = new ArrayList<>();
if (value == null) return ret;
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSSchedulingParameterValueTypeMatchesDefinedType.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSSchedulingParameterValueTypeMatchesDefinedType.java
index 99f3530..c6f6501 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSSchedulingParameterValueTypeMatchesDefinedType.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSSchedulingParameterValueTypeMatchesDefinedType.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -34,7 +34,7 @@
/**
* Checks whether the value type of a scheduling parameter matches the defined type of its parameter definition.
- *
+ *
* <ul>
* <li>Scheduling parameter type must match its defined type.</li>
* </ul>
@@ -55,9 +55,9 @@
public void validate(EObject object, List<ValidationDiagnostic> results) {
if (object instanceof SchedulingParameterImpl) {
final SchedulingParameterImpl sp = (SchedulingParameterImpl) object;
-
+
if (sp.getKey() == null || sp.getValue() == null || sp.getValue().eClass() == null) return; // checked by standard EMF validations
-
+
final Set<EClass> valueEClasses = getAllUsedEClassesForParameterValue(sp.getValue());
final Set<EClass> allowedEClasses = getAllowedEClassesForParameterDefinition(sp.getKey());
if (!allowedEClasses.containsAll(valueEClasses)) {
@@ -66,7 +66,7 @@
}
}
}
-
+
private static Set<EClass> getAllUsedEClassesForParameterValue(final Value value) {
final Set<EClass> ret = new HashSet<>();
if (value == null || value.eClass() == null) return ret;
@@ -77,7 +77,7 @@
}
return ret;
}
-
+
private static Set<EClass> getAllowedEClassesForParameterDefinition(final SchedulingParameterDefinition spd) {
final Set<EClass> ret = new HashSet<>();
if (spd.getType() == null) return ret;
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSStandardSchedulerDefinitionConformance.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSStandardSchedulerDefinitionConformance.java
index dc81369..c2d9273 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSStandardSchedulerDefinitionConformance.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSStandardSchedulerDefinitionConformance.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -32,7 +32,7 @@
/**
* Checks for each scheduler definition, if it represents a standard scheduler (by name) and if all standard parameters are there.
- *
+ *
* <ul>
* <li>Referred algorithm and process parameters from the standard scheduler definition should also be in this scheduler definition.
* This definition may have additional parameters, though.</li>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSStandardSchedulingParameterDefinitionConformance.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSStandardSchedulingParameterDefinitionConformance.java
index abaa188..c235082 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSStandardSchedulingParameterDefinitionConformance.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/os/AmOSStandardSchedulingParameterDefinitionConformance.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -32,7 +32,7 @@
/**
* Checks for each scheduling parameter definition (if used in a standard scheduler) if the parameters conform to the standard
* scheduler's definition.
- *
+ *
* <ul>
* <li>For each standard scheduling parameter, the type should be the same as modeled in this scheduler definition.</li>
* <li>For each standard scheduling parameter, the attributes should be the same as modeled in this scheduler definition.</li>
@@ -58,7 +58,7 @@
if (object instanceof SchedulingParameterDefinition) {
final SchedulingParameterDefinition candidateSPD = (SchedulingParameterDefinition) object;
final OSModel dummyOSModel = AmaltheaFactory.eINSTANCE.createOSModel();
-
+
// find all scheduler definition referring to this scheduling parameter definitions
candidateSPD.getSchedulerDefinitions().stream()
// check if any of these scheduler definitions is a standard scheduler and look for a parameter definition
@@ -66,7 +66,7 @@
// that has the same name as this parameter, go and check it against the just found standard parameter
.filter(spd -> spd.getParameterName().equals(candidateSPD.getName())).findFirst()
.map(spd -> AmaltheaTemplates.addStandardSchedulingParameterDefinition(dummyOSModel, spd)).ifPresent(standardSPD -> {
-
+
// check all attributes (this includes the type)
ePackage.getSchedulingParameterDefinition().getEAttributes().forEach(spdAttribute -> {
final Object standardValue = standardSPD.eGet(spdAttribute);
@@ -77,7 +77,7 @@
+ "' in " + objectInfo(candidateSPD));
}
});
-
+
// check if the default value should be provided
if (!candidateSPD.isMandatory() && candidateSPD.getDefaultValue() == null && standardSPD.getDefaultValue() != null) {
addIssue(results, candidateSPD, ePackage.getSchedulingParameterDefinition_DefaultValue(), "Standard scheduling parameter "
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/software/AmSwCallArgument.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/software/AmSwCallArgument.java
index 655f66c..2634481 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/software/AmSwCallArgument.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/software/AmSwCallArgument.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -29,11 +29,11 @@
/**
* Checks the correctness of call argument definitions
- *
+ *
* <ul>
* <li>The referred runnable must contain the referred parameter</li>
* </ul>
- */
+ */
@Validation(
id = "AM-SW-CallArgument",
@@ -50,25 +50,25 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof CallArgument) {
CallArgument argument = (CallArgument) object;
-
+
RunnableCall runnableCall = argument.getContainingCall();
Runnable calledRunnable = runnableCall.getRunnable();
RunnableParameter parameter = argument.getParameter();
-
+
if (parameter == null) {
addIssue(results, argument, ePackage.getCallArgument_Parameter(),
"Call argument: Parameter of argument is undefined");
}
-
+
if (calledRunnable == null) {
addIssue(results, runnableCall, ePackage.getRunnableCall_Runnable(),
"Call argument: Called runnable is undefined");
}
-
+
if (parameter == null || calledRunnable == null) {
return; // Skip further checks
}
-
+
if (!calledRunnable.getParameters().contains(parameter)) {
addIssue(results, argument, ePackage.getCallArgument_Parameter(),
"Call argument: Called Runnable \"" + calledRunnable.getName()
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/software/AmSwDataDependency.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/software/AmSwDataDependency.java
index e86af23..4bf468f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/software/AmSwDataDependency.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/software/AmSwDataDependency.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -37,7 +37,7 @@
/**
* Checks the correctness of data dependency references
- *
+ *
* <ul>
* <li>A data dependency can only be defined for:</li>
* <ul>
@@ -69,10 +69,10 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof DataDependency) {
DataDependency dependency = (DataDependency) object;
-
+
Runnable runnable = dependency.getContainingRunnable();
if (runnable == null) return;
-
+
EObject container = dependency.eContainer();
if (container instanceof LabelAccess) {
LabelAccess labelAccess = (LabelAccess) container;
@@ -82,7 +82,7 @@
"Data dependency: A data dependency can only be defined for WRITE label accesses");
}
}
-
+
if (container instanceof RunnableParameter) {
RunnableParameter runParam = (RunnableParameter) container;
DirectionType direction = runParam.getDirection();
@@ -91,7 +91,7 @@
"Data dependency: A data dependency can only be defined for OUT/INOUT parameters");
}
}
-
+
if (container instanceof CallArgument) {
CallArgument callArg = (CallArgument) container;
RunnableParameter parameter = callArg.getParameter();
@@ -103,13 +103,13 @@
}
}
}
-
+
List<RunnableParameter> localParameters = getSuitableParameters(runnable);
if (!localParameters.containsAll(dependency.getParameters())) {
addIssue(results, dependency, ePackage.getDataDependency_Parameters(),
"Data dependency: A data dependency can only refer to local IN/INOUT parameters");
}
-
+
List<CallArgument> localCallArguments = getSuitableCallArguments(runnable);
if (!localCallArguments.containsAll(dependency.getCallArguments())) {
addIssue(results, dependency, ePackage.getDataDependency_CallArguments(),
@@ -135,7 +135,7 @@
// CallArguments (out, inout) of contained calls
List<DirectionType> possibleDirections = Arrays.asList(DirectionType.OUT, DirectionType.INOUT);
-
+
return SoftwareUtil.collectActivityGraphItems(runnable.getActivityGraph(), null, RunnableCall.class).stream()
.flatMap(e -> e.getArguments().stream())
.filter(e -> e.getParameter() != null)
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/software/AmSwGroup.java b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/software/AmSwGroup.java
index 0108181..65c8d48 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/software/AmSwGroup.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.standard/src/org/eclipse/app4mc/amalthea/validations/standard/software/AmSwGroup.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -26,11 +26,11 @@
/**
* Checks the correctness of groups
- *
+ *
* <ul>
* <li>Groups where interruptible is set to <b>FALSE</b> must not have any nested groups</li>
* </ul>
- */
+ */
@Validation(
id = "AM-SW-Group",
@@ -47,8 +47,8 @@
public void validate(final EObject object, final List<ValidationDiagnostic> results) {
if (object instanceof Group) {
final Group argument = (Group) object;
-
- if (false == argument.isInterruptible() &&
+
+ if (!argument.isInterruptible() &&
argument.getItems().stream().anyMatch(Group.class::isInstance)) {
addIssue(results, argument, ePackage.getIActivityGraphItemContainer_Items(),
"Group: uninterruptible groups must not contain nested groups (in group \"" + argument.getName() + "\")");
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TABasicProfile.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TABasicProfile.java
index c8ccbd6..fc10ac6 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TABasicProfile.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TABasicProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2020 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TAConstraintsProfile.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TAConstraintsProfile.java
index 4eef44d..8b0cb9d 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TAConstraintsProfile.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TAConstraintsProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2020 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TAHardwareProfile.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TAHardwareProfile.java
index f103af5..f034e69 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TAHardwareProfile.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TAHardwareProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2020 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TASoftwareProfile.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TASoftwareProfile.java
index 731849d..963808b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TASoftwareProfile.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TASoftwareProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2020 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TAStimuliProfile.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TAStimuliProfile.java
index d0183a8..18afd47 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TAStimuliProfile.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/TAStimuliProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2020 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/basic/TABasicContinuousValueGaussDistribution.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/basic/TABasicContinuousValueGaussDistribution.java
index 1dbe944..7fb711c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/basic/TABasicContinuousValueGaussDistribution.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/basic/TABasicContinuousValueGaussDistribution.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -27,7 +27,7 @@
/**
* Checks sanity of mean of continuous value Gauss distributions
- *
+ *
* <ul>
* <li>Mean must not be less than the lower bound</li>
* <li>Mean must not be greater than the upper bound</li>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/basic/TABasicDiscreteValueGaussDistribution.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/basic/TABasicDiscreteValueGaussDistribution.java
index ac2f5fe..bfb15e0 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/basic/TABasicDiscreteValueGaussDistribution.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/basic/TABasicDiscreteValueGaussDistribution.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -27,7 +27,7 @@
/**
* Checks sanity of mean of discrete value Gauss distributions
- *
+ *
* <ul>
* <li>Mean must not be less than the lower bound</li>
* <li>Mean must not be greater than the upper bound</li>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/basic/TABasicTimeGaussDistribution.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/basic/TABasicTimeGaussDistribution.java
index c09a3a8..37dc635 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/basic/TABasicTimeGaussDistribution.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/basic/TABasicTimeGaussDistribution.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -28,7 +28,7 @@
/**
* Checks sanity of mean of time Gauss distributions
- *
+ *
* <ul>
* <li>Mean must not be less than the lower bound</li>
* <li>Mean must not be greater than the upper bound</li>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsDataAgeTime.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsDataAgeTime.java
index bd84d9e..6a7c487 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsDataAgeTime.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsDataAgeTime.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -28,7 +28,7 @@
/**
* Validates min and max times of data age time.
- *
+ *
* <ul>
* <li>Maximum time must not be smaller than minimum time</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsDelayConstraint.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsDelayConstraint.java
index 55a9a78..bd3d736 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsDelayConstraint.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsDelayConstraint.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Validates upper and lower bounds of delay constraints.
- *
+ *
* <ul>
* <li>Upper bound must not be smaller than lower bound</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsECLConstraint.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsECLConstraint.java
index e0b3b7a..b24fd3a 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsECLConstraint.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsECLConstraint.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Validates min and max bounds of event chain latency constraints.
- *
+ *
* <ul>
* <li>Maximum must not be smaller than minimum</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsEDFTaskMustHaveDeadline.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsEDFTaskMustHaveDeadline.java
index 89f8a06..584e212 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsEDFTaskMustHaveDeadline.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsEDFTaskMustHaveDeadline.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Validates whether a task that is mapped to a scheduler with EDF scheduling policy
* has a deadline requirement.
- *
+ *
* <ul>
* <li>EDF tasks must have a deadline requirement</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsRTLimitMustBePositive.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsRTLimitMustBePositive.java
index a19fd6b..18308c7 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsRTLimitMustBePositive.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsRTLimitMustBePositive.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -30,7 +30,7 @@
/**
* Validates whether a timing requirement limit for time metric RESPONSE_TIME is positive.
- *
+ *
* <ul>
* <li>Response time must be positive</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsRepetitionConstraint.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsRepetitionConstraint.java
index 2e6a663..aa32482 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsRepetitionConstraint.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/constraints/TAConstraintsRepetitionConstraint.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Validates lower and upper bound of repetition constraints.
- *
+ *
* <ul>
* <li>Upper bound must not be smaller than lower bound</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/hardware/TAHardwareHWFIPCPositive.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/hardware/TAHardwareHWFIPCPositive.java
index ccb2f26..1107dcd 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/hardware/TAHardwareHWFIPCPositive.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/hardware/TAHardwareHWFIPCPositive.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -25,7 +25,7 @@
/**
* Validates whether the value of the instructions per cycle HwFeature is sane.
- *
+ *
* <ul>
* <li>IPC (instructions per cycle) must be positive</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/hardware/TAHardwarePUDIPCMissing.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/hardware/TAHardwarePUDIPCMissing.java
index 1c05161..bf2df21 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/hardware/TAHardwarePUDIPCMissing.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/hardware/TAHardwarePUDIPCMissing.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -29,7 +29,7 @@
/**
* Validates whether the instructions per cycle HWFeature is set for
* a processing unit definition of type CPU and has a sane value.
- *
+ *
* <ul>
* <li>IPC (instructions per cycle) should be set, otherwise default (1.0) will be assumed</li>
* <li>Only one IPC HwFeature should be specified for a processing unit definition</li>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/misc/TAMiscSemaphore.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/misc/TAMiscSemaphore.java
index 9769e97..e206bb6 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/misc/TAMiscSemaphore.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/misc/TAMiscSemaphore.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -25,7 +25,7 @@
/**
* Validates sanity of initial and max value of semaphores.
- *
+ *
* <ul>
* <li>Initial value must not be negative</li>
* <li>Max value must be positive</li>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareModeConditionConjunctionAlwaysFalse.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareModeConditionConjunctionAlwaysFalse.java
index 14b8cec..67c972b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareModeConditionConjunctionAlwaysFalse.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareModeConditionConjunctionAlwaysFalse.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -19,9 +19,9 @@
import org.eclipse.app4mc.amalthea.model.AmaltheaServices;
import org.eclipse.app4mc.amalthea.model.INamed;
-import org.eclipse.app4mc.amalthea.model.ModeValueCondition;
import org.eclipse.app4mc.amalthea.model.ModeConditionConjunction;
import org.eclipse.app4mc.amalthea.model.ModeLiteral;
+import org.eclipse.app4mc.amalthea.model.ModeValueCondition;
import org.eclipse.app4mc.amalthea.model.RelationalOperator;
import org.eclipse.app4mc.amalthea.validation.core.AmaltheaValidation;
import org.eclipse.app4mc.validation.annotation.Validation;
@@ -31,7 +31,7 @@
/**
* Validates (only simple) whether a conjunction of mode conditions always yields true.
- *
+ *
* <ul>
* <li>Checks whether the logical conjunction (AND) of all entries will never be fulfilled</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareModeConditionDisjunctionAlwaysTrue.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareModeConditionDisjunctionAlwaysTrue.java
index 60f153f..9133d74 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareModeConditionDisjunctionAlwaysTrue.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareModeConditionDisjunctionAlwaysTrue.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -22,9 +22,9 @@
import org.eclipse.app4mc.amalthea.model.AmaltheaServices;
import org.eclipse.app4mc.amalthea.model.EnumMode;
import org.eclipse.app4mc.amalthea.model.INamed;
-import org.eclipse.app4mc.amalthea.model.ModeValueCondition;
import org.eclipse.app4mc.amalthea.model.ModeConditionDisjunction;
import org.eclipse.app4mc.amalthea.model.ModeLiteral;
+import org.eclipse.app4mc.amalthea.model.ModeValueCondition;
import org.eclipse.app4mc.amalthea.model.RelationalOperator;
import org.eclipse.app4mc.amalthea.validation.core.AmaltheaValidation;
import org.eclipse.app4mc.validation.annotation.Validation;
@@ -34,7 +34,7 @@
/**
* Validates (only simple) whether a disjunction of mode conditions always yields true.
- *
+ *
* <ul>
* <li>Checks whether the logical disjunction (OR) of all entries of type ModeCondition will be fulfilled</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareOsEvent.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareOsEvent.java
index 280e45d..dff9a3f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareOsEvent.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareOsEvent.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -33,7 +33,7 @@
/**
* Validates sanity of usage of OsEvents.
- *
+ *
* <ul>
* <li>If there is at least one wait event for this os event, there must also be at least one set event for this os event</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareRunnableCall.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareRunnableCall.java
index b6d938a..7e2a704 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareRunnableCall.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareRunnableCall.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2021 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -28,7 +28,7 @@
/**
* Validates sanity of runnable calls.
- *
+ *
* <ul>
* <li>The called runnable may not refer to the runnable owning this runnable call</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareServerCall.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareServerCall.java
index b0fd1ef..42a294f 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareServerCall.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/software/TASoftwareServerCall.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -28,7 +28,7 @@
/**
* Validates sanity of server calls.
- *
+ *
* <ul>
* <li>Server runnable may not refer to the runnable owning this server call</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/stimuli/TAStimuliVRStimulus.java b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/stimuli/TAStimuliVRStimulus.java
index 4c50623..9b69c13 100644
--- a/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/stimuli/TAStimuliVRStimulus.java
+++ b/plugins/org.eclipse.app4mc.amalthea.validations.ta/src/org/eclipse/app4mc/amalthea/validations/ta/stimuli/TAStimuliVRStimulus.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016-2019 Vector Informatik GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Vector Informatik GmbH - initial API and implementation
********************************************************************************
@@ -25,7 +25,7 @@
/**
* Validates sanity of variable rate stimuli.
- *
+ *
* <ul>
* <li>Scenario must be set</li>
* </ul>
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/DiagramLocation.java b/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/DiagramLocation.java
index ae19b80..7ffb7aa 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/DiagramLocation.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/DiagramLocation.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
*******************************************************************************/
@@ -47,27 +47,26 @@
}
public DiagramLocation(IFolder folder, String baseFilename) {
- if (folder == null || !folder.exists()) return;
- if (baseFilename == null || baseFilename.isEmpty()) return;
-
+ if (folder == null || !folder.exists() || baseFilename == null || baseFilename.isEmpty()) return;
+
initialize(folder, baseFilename);
}
private void initialize(IFolder folder, String baseFilename) {
- this.diagramFolder = folder;
- this.plantUmlFileName = baseFilename + ".plantuml";
- this.plantUmlFilePath = folder.getFile(plantUmlFileName).getLocation().toString();
- this.diagramFileName = baseFilename + ".svg";
- this.diagramFilePath = folder.getFile(diagramFileName).getLocation().toString();
+ diagramFolder = folder;
+ plantUmlFileName = baseFilename + ".plantuml";
+ plantUmlFilePath = folder.getFile(plantUmlFileName).getLocation().toString();
+ diagramFileName = baseFilename + ".svg";
+ diagramFilePath = folder.getFile(diagramFileName).getLocation().toString();
}
private IFile getResourceFile(EObject eObject) {
if (eObject == null) return null;
-
+
Resource eResource = eObject.eResource();
if (eResource == null) return null;
-
+
URI uri = eResource.getURI();
IPath path = new Path(uri.toPlatformString(true));
return ResourcesPlugin.getWorkspace().getRoot().getFile(path);
@@ -75,7 +74,7 @@
private IFolder getOrCreateDiagramFolder(IFile file, String folderName) {
if (file == null) return null;
-
+
IContainer parentFolder = file.getParent();
if (parentFolder == null) return null;
@@ -98,7 +97,7 @@
String modelName = "model"; // default
if (file != null && file.getName() != null) {
- modelName = file.getName().replaceFirst("[.][^.]+$", ""); // remove extension
+ modelName = file.getName().replaceFirst("[.][^.]+$", ""); // remove extension
}
String extendedName = "";
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/HWBlockDiagramVisualization.java b/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/HWBlockDiagramVisualization.java
index ac481b2..a68edac 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/HWBlockDiagramVisualization.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/HWBlockDiagramVisualization.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
*******************************************************************************/
@@ -40,23 +40,23 @@
@PostConstruct
public void createVisualization(
- HWModel hwModel,
+ HWModel hwModel,
Composite parent,
Shell shell,
@Optional
@Preference(
- nodePath = "net.sourceforge.plantuml.eclipse",
- value = PlantumlConstants.GRAPHVIZ_PATH)
+ nodePath = "net.sourceforge.plantuml.eclipse",
+ value = PlantumlConstants.GRAPHVIZ_PATH)
String dotPath,
UISynchronize sync) {
-
+
Browser browser = new Browser(parent, SWT.NONE);
-
+
DiagramLocation diagramLocation = new DiagramLocation(hwModel);
if (!diagramLocation.isValid()) return;
-
+
// *** Execute job
-
+
JobChangeAdapter listener = new JobChangeAdapter() {
@Override
public void done(IJobChangeEvent event) {
@@ -67,7 +67,7 @@
});
}
};
-
+
VisualizationHandler handler = new VisualizationHandler();
handler.execute(shell, sync, dotPath, hwModel.getStructures(), diagramLocation, false, listener);
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/HWBlockDiagramVisualization2.java b/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/HWBlockDiagramVisualization2.java
index 00e68e6..16fd812 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/HWBlockDiagramVisualization2.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/HWBlockDiagramVisualization2.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
*******************************************************************************/
@@ -42,23 +42,23 @@
@PostConstruct
public void createVisualization(
- List<HwStructure> structures,
+ List<HwStructure> structures,
Composite parent,
Shell shell,
@Optional
@Preference(
- nodePath = "net.sourceforge.plantuml.eclipse",
- value = PlantumlConstants.GRAPHVIZ_PATH)
+ nodePath = "net.sourceforge.plantuml.eclipse",
+ value = PlantumlConstants.GRAPHVIZ_PATH)
String dotPath,
UISynchronize sync) {
-
+
Browser browser = new Browser(parent, SWT.NONE);
-
+
DiagramLocation diagramLocation = new DiagramLocation(structures.get(0));
if (!diagramLocation.isValid()) return;
-
+
// *** Execute job
-
+
JobChangeAdapter listener = new JobChangeAdapter() {
@Override
public void done(IJobChangeEvent event) {
@@ -69,7 +69,7 @@
});
}
};
-
+
VisualizationHandler handler = new VisualizationHandler();
handler.execute(shell, sync, dotPath, structures, diagramLocation, false, listener);
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/ModelToTextResult.java b/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/ModelToTextResult.java
index 23293c4..7c75528 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/ModelToTextResult.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/ModelToTextResult.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2018-2020 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
*******************************************************************************/
@@ -15,18 +15,18 @@
package org.eclipse.app4mc.amalthea.visualization.hw;
public class ModelToTextResult {
-
+
private boolean errorFlag;
private String errorMessage;
-
+
private CharSequence output;
public ModelToTextResult() {
- this.errorFlag = false;
+ errorFlag = false;
}
public boolean getErrorFlag() {
- return this.errorFlag;
+ return errorFlag;
}
public void setErrorFlag(boolean errorFlag) {
@@ -34,15 +34,15 @@
}
public boolean error() {
- return this.errorFlag;
+ return errorFlag;
}
public boolean success() {
- return !this.errorFlag;
+ return !errorFlag;
}
public String getErrorMessage() {
- return this.errorMessage;
+ return errorMessage;
}
public void setErrorMessage(String errorMessage) {
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/VisualizationHandler.java b/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/VisualizationHandler.java
index 0578419..d093355 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/VisualizationHandler.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualization.hw/src/org/eclipse/app4mc/amalthea/visualization/hw/VisualizationHandler.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
*******************************************************************************/
@@ -64,8 +64,8 @@
UISynchronize sync,
@Optional
@Preference(
- nodePath = "net.sourceforge.plantuml.eclipse",
- value = PlantumlConstants.GRAPHVIZ_PATH)
+ nodePath = "net.sourceforge.plantuml.eclipse",
+ value = PlantumlConstants.GRAPHVIZ_PATH)
String dotPath,
@Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection) {
@@ -84,7 +84,7 @@
// Execute job
List<HwStructure> structures = new ArrayList<>();
-
+
if (eObject instanceof HWModel) {
structures.addAll(((HWModel) eObject).getStructures());
} else if (eObject instanceof HwStructure) {
@@ -97,7 +97,7 @@
}
/**
- *
+ *
* @param shell The active Shell needed for info/error dialog creation.
* @param dotPathFromPlantUMLPreferencePage The path to Graphviz dot.exe needed for visualization.
* @param hwModel The {@link HWModel} that should be visualized.
@@ -117,7 +117,7 @@
String dotPathFromSystemProperty=System.getenv(PROPERTY_GRAPHVIZ_DOT);
-
+
File dotFile = null;
if (dotPathFromPlantUMLPreferencePage != null) {
@@ -166,7 +166,7 @@
byte[] svgBytes = outputStream.toByteArray();
String svgString = new String(svgBytes, StandardCharsets.UTF_8);
-
+
fileStream.write(svgBytes);
fileStream.flush();
@@ -203,8 +203,8 @@
}
private File ensureValidDotFile(Shell shell, UISynchronize sync, String dotPath, String origin) {
-
-
+
+
if (dotPath == null || dotPath.equals("")) {
showErrorDialog(shell, sync, "Missing Graphviz dot.exe location."
+ "\nPlease specify location via Window - Preferences - PlantUML - Path to the dot executable of Graphviz.");
@@ -213,7 +213,7 @@
final File dotFile = new File(dotPath);
if (!dotFile.canExecute()) {
-
+
if(origin.equals("PlantUMLPreference")) {
showErrorDialog(shell, sync, "Invalid Graphviz dot.exe location: \'" + dotFile.getAbsolutePath()+"\'"
+ "\nPlease set location via Window - Preferences - PlantUML - Path to the 'dot executable of Graphviz'.");
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.addon/src/org/eclipse/app4mc/amalthea/visualizations/addon/MappingModelVisualization.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.addon/src/org/eclipse/app4mc/amalthea/visualizations/addon/MappingModelVisualization.java
index 6e790a5..0f866d5 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.addon/src/org/eclipse/app4mc/amalthea/visualizations/addon/MappingModelVisualization.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.addon/src/org/eclipse/app4mc/amalthea/visualizations/addon/MappingModelVisualization.java
@@ -235,9 +235,9 @@
theme.defaultHAlign = HorizontalAlignmentEnum.LEFT;
theme.defaultVAlign = VerticalAlignmentEnum.TOP;
theme.defaultCellPainter = new PaddingDecorator(new TextPainter(true, true, true), 2);
-
+
theme.treeCellPainter = new PaddingDecorator(new TextPainter(false, true, true), 2, 2, 2, 15);
-
+
Bundle bundle = FrameworkUtil.getBundle(this.getClass());
URL leafImageUrl = FileLocator.find(bundle, new Path("images/right_leaf.png"), null);
@@ -285,7 +285,7 @@
* Public class TableItem is accessed by NatTable and contains data of one table
* row.
*/
- public class TableItem {
+ public static class TableItem {
private TableItem parent;
private List<TableItem> path = new ArrayList<>();
@@ -328,7 +328,7 @@
}
public void setProcessingUnits(String cores) {
- this.processingUnits = cores;
+ processingUnits = cores;
}
public String getProcesses() {
@@ -340,7 +340,7 @@
}
}
- private class TableItemTreeFormat implements TreeList.Format<TableItem> {
+ private static class TableItemTreeFormat implements TreeList.Format<TableItem> {
/**
* Populate path with a list describing the path from a root node to this
@@ -371,7 +371,7 @@
*/
@Override
public Comparator<? super TableItem> getComparator(int depth) {
- return (i1, i2) -> i1.scheduler.compareTo(i2.scheduler);
+ return Comparator.comparing(i1 -> i1.scheduler);
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/AbstractDeviationChart.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/AbstractDeviationChart.java
index 93b8182..c97ecbe 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/AbstractDeviationChart.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/AbstractDeviationChart.java
@@ -86,7 +86,7 @@
AreaChart<Number, Number> chart = new AreaChart<>(xAxis, yAxis);
chart.setTitle(getChartTitle(deviation));
- chart.setAnimated(false);
+ chart.setAnimated(false);
chart.setVerticalGridLinesVisible(false);
chart.setHorizontalGridLinesVisible(false);
chart.setLegendVisible(false);
@@ -100,7 +100,7 @@
if (deviation != null) {
String className = deviation.eClass().getName();
for (String genericName : DEVIATION_LIST) {
- if (className.contains(genericName)) return genericName;
+ if (className.contains(genericName)) return genericName;
}
}
return null;
@@ -123,7 +123,7 @@
return "occurrences";
}
}
-
+
return defaultText;
}
@@ -134,7 +134,7 @@
statusLabel.setMaxWidth(Double.MAX_VALUE);
statusLabel.setAlignment(Pos.CENTER);
statusLabel.setTextFill(Color.RED);
-
+
pane.setBottom(statusLabel);
return statusLabel;
}
@@ -143,10 +143,10 @@
protected void setChartXBounds(AreaChart<Number, Number> chart, double lowerBound, double upperBound) {
if (lowerBound >= upperBound) return;
-
+
if (chart.getXAxis() instanceof NumberAxis) {
NumberAxis axis = (NumberAxis) chart.getXAxis();
-
+
// ValueAxis<Number> allows to set the bounds
axis.setAutoRanging(false);
axis.setLowerBound(lowerBound);
@@ -159,7 +159,7 @@
protected void setChartYBounds(AreaChart<Number, Number> chart, double upperBound) {
if (chart.getYAxis() instanceof NumberAxis) {
NumberAxis axis = (NumberAxis) chart.getYAxis();
-
+
// ValueAxis<Number> allows to set the bounds
axis.setAutoRanging(false);
axis.setLowerBound(0);
@@ -171,11 +171,11 @@
if (series.getData().isEmpty()) return;
chart.getData().add(series);
-
+
// set standard color for line and fill
series.getNode().lookup(CHART_SERIES_AREA_LINE).setStyle("-fx-stroke: rgba(0, 128, 0, 1.0);");
series.getNode().lookup(CHART_SERIES_AREA_FILL).setStyle("-fx-fill: rgba(0, 128, 0, 0.15);");
-
+
// hide line markers
for (Data<Number, Number> data : series.getData()) {
data.getNode().setVisible(false);
@@ -186,11 +186,11 @@
if (series.getData().isEmpty()) return;
chart.getData().add(series);
-
+
// set color and dash style for line; no fill
series.getNode().lookup(CHART_SERIES_AREA_LINE).setStyle("-fx-stroke: rgba(128, 128, 128, 1.0); -fx-stroke-dash-array: 2;");
series.getNode().lookup(CHART_SERIES_AREA_FILL).setStyle("-fx-fill: rgba(0, 0, 0, 0.0);");
-
+
// hide line markers
for (Data<Number, Number> data : series.getData()) {
data.getNode().setVisible(false);
@@ -199,13 +199,13 @@
protected void addSeriesGradient(AreaChart<Number, Number> chart, final Series<Number, Number> series) {
if (series.getData().isEmpty()) return;
-
+
chart.getData().add(series);
-
+
// set color and dash style for line; no fill
series.getNode().lookup(CHART_SERIES_AREA_LINE).setStyle("-fx-stroke: rgba(0, 0, 0, 0.0);");
series.getNode().lookup(CHART_SERIES_AREA_FILL).setStyle("-fx-fill: linear-gradient(to top, rgba(0, 128, 0, 0.3), rgba(0, 128, 0, 0.0));");
-
+
// hide line markers
for (Data<Number, Number> data : series.getData()) {
data.getNode().setVisible(false);
@@ -218,7 +218,7 @@
chart.getData().add(series);
series.getData().add(new XYChart.Data<>(x, 0.0));
series.getData().add(new XYChart.Data<>(x, y));
-
+
series.getNode().lookup(CHART_SERIES_AREA_LINE).setStyle("-fx-stroke: rgba(0, 128, 0, 1.0);");
series.getData().get(1).getNode().setVisible(false);
}
@@ -233,11 +233,11 @@
series.setName("min");
series.getData().add(new XYChart.Data<>(min, 0.0));
series.getData().add(new XYChart.Data<>(min, y));
-
+
series.getNode().lookup(CHART_SERIES_AREA_LINE).setStyle("-fx-stroke: rgba(0, 0, 0, 1.0);");
series.getData().get(1).getNode().setVisible(false);
}
-
+
// add upper bounds marker
if (max != null) {
final Series<Number, Number> series = new XYChart.Series<>();
@@ -245,11 +245,11 @@
series.setName("max");
series.getData().add(new XYChart.Data<>(max, 0.0));
series.getData().add(new XYChart.Data<>(max, y));
-
+
series.getNode().lookup(CHART_SERIES_AREA_LINE).setStyle("-fx-stroke: rgba(0, 0, 0, 1.0);");
series.getData().get(1).getNode().setVisible(false);
}
-
+
// add average marker if computed average is in correct bounds (skip otherwise)
if (avg != null && (min == null || min <= avg) && (max == null || max >= avg)) {
final Series<Number, Number> series = new XYChart.Series<>();
@@ -257,7 +257,7 @@
series.setName("avg");
series.getData().add(new XYChart.Data<>(avg, 0.0));
series.getData().add(new XYChart.Data<>(avg, y));
-
+
series.getNode().lookup(CHART_SERIES_AREA_LINE).setStyle("-fx-stroke: rgba(150, 5, 5, 1.0); -fx-stroke-dash-array: 3;");
series.getData().get(1).getNode().setVisible(false);
}
@@ -281,10 +281,7 @@
for (DiscreteValueHistogramEntry entry : entries) {
final Long lowerBound = entry.getLowerBound();
final Long upperBound = entry.getUpperBound();
- if (lowerBound == null) return false;
- if (upperBound == null) return false;
- if (lowerBound.compareTo(upperBound) > 0) return false;
- if (entry.getOccurrences() < 0) return false;
+ if ((lowerBound == null) || (upperBound == null) || (lowerBound.compareTo(upperBound) > 0) || (entry.getOccurrences() < 0)) return false;
}
return true;
}
@@ -294,9 +291,7 @@
final DiscreteValueInterval interval = (DiscreteValueInterval) dev;
final Long lowerBound = interval.getLowerBound();
final Long upperBound = interval.getUpperBound();
- if (lowerBound == null) return false;
- if (upperBound == null) return false;
- if (!isValidMinAvgMax(lowerBound.doubleValue(), getAverage(interval), upperBound.doubleValue())) return false;
+ if ((lowerBound == null) || (upperBound == null) || !isValidMinAvgMax(lowerBound.doubleValue(), getAverage(interval), upperBound.doubleValue())) return false;
}
// check Weibull parameters
@@ -315,8 +310,7 @@
// check Gauss parameters
if (dev instanceof DiscreteValueGaussDistribution) {
final DiscreteValueGaussDistribution gaussDist = (DiscreteValueGaussDistribution) dev;
- if (gaussDist.getSd() <= 0) return false;
- if (!isValidMinAvgMax(gaussDist.getLowerBound(), null, gaussDist.getUpperBound())) return false;
+ if ((gaussDist.getSd() <= 0) || !isValidMinAvgMax(gaussDist.getLowerBound(), null, gaussDist.getUpperBound())) return false;
}
return true;
@@ -336,10 +330,7 @@
for (ContinuousValueHistogramEntry entry : entries) {
final Double lowerBound = entry.getLowerBound();
final Double upperBound = entry.getUpperBound();
- if (lowerBound == null) return false;
- if (upperBound == null) return false;
- if (lowerBound.compareTo(upperBound) > 0) return false;
- if (entry.getOccurrences() < 0) return false;
+ if ((lowerBound == null) || (upperBound == null) || (lowerBound.compareTo(upperBound) > 0) || (entry.getOccurrences() < 0)) return false;
}
return true;
}
@@ -349,9 +340,7 @@
final ContinuousValueInterval interval = (ContinuousValueInterval) dev;
final Double lowerBound = interval.getLowerBound();
final Double upperBound = interval.getUpperBound();
- if (lowerBound == null) return false;
- if (upperBound == null) return false;
- if (!isValidMinAvgMax(lowerBound, getAverage(interval), upperBound)) return false;
+ if ((lowerBound == null) || (upperBound == null) || !isValidMinAvgMax(lowerBound, getAverage(interval), upperBound)) return false;
}
// check Weibull parameters
@@ -366,35 +355,31 @@
final ContinuousValueBetaDistribution betaDist = (ContinuousValueBetaDistribution) dev;
return betaDist.getAlpha() > 0 && betaDist.getBeta() > 0;
}
-
+
// check Gauss parameters
if (dev instanceof ContinuousValueGaussDistribution) {
final ContinuousValueGaussDistribution gaussDist = (ContinuousValueGaussDistribution) dev;
- if (gaussDist.getSd() <= 0) return false;
- if (!isValidMinAvgMax(gaussDist.getLowerBound(), null, gaussDist.getUpperBound())) return false;
+ if ((gaussDist.getSd() <= 0) || !isValidMinAvgMax(gaussDist.getLowerBound(), null, gaussDist.getUpperBound())) return false;
}
-
+
return true;
}
-
+
public boolean isValid(ITimeDeviation dev) {
// check constant value
if (dev instanceof TimeConstant) {
return isValidTime(((TimeConstant) dev).getValue());
}
-
+
// check histogram entries
if (dev instanceof TimeHistogram) {
final EList<TimeHistogramEntry> entries = ((TimeHistogram) dev).getEntries();
if (entries.isEmpty()) return false;
-
+
for (TimeHistogramEntry entry : entries) {
final Time lowerBound = entry.getLowerBound();
final Time upperBound = entry.getUpperBound();
- if (!isValidTime(lowerBound)) return false;
- if (!isValidTime(upperBound)) return false;
- if (lowerBound.compareTo(upperBound) > 0) return false;
- if (entry.getOccurrences() < 0) return false;
+ if (!isValidTime(lowerBound) || !isValidTime(upperBound) || (lowerBound.compareTo(upperBound) > 0) || (entry.getOccurrences() < 0)) return false;
}
return true;
}
@@ -404,14 +389,13 @@
final TimeStatistics statistics = (TimeStatistics) dev;
if (!isValidTime(statistics.getAverage())) return false;
}
-
+
// check Weibull parameters (part 1)
if (dev instanceof TimeWeibullEstimatorsDistribution) {
final TimeWeibullEstimatorsDistribution weibullDist = (TimeWeibullEstimatorsDistribution) dev;
if (!isValidTime(weibullDist.getAverage())) return false;
final double promille = weibullDist.getPRemainPromille();
- if (promille <= 0) return false;
- if (promille >= 1000) return false;
+ if ((promille <= 0) || (promille >= 1000)) return false;
}
// check attributes of (abstract) interval; check average if available
@@ -419,9 +403,7 @@
final TimeInterval interval = (TimeInterval) dev;
final Time lowerBound = interval.getLowerBound();
final Time upperBound = interval.getUpperBound();
- if (!isValidTime(lowerBound)) return false;
- if (!isValidTime(upperBound)) return false;
- if (!isValidMinAvgMax(lowerBound, getAverage(interval), upperBound)) return false;
+ if (!isValidTime(lowerBound) || !isValidTime(upperBound) || !isValidMinAvgMax(lowerBound, getAverage(interval), upperBound)) return false;
}
// check Beta parameters
@@ -429,19 +411,16 @@
final TimeBetaDistribution betaDist = (TimeBetaDistribution) dev;
return betaDist.getAlpha() > 0 && betaDist.getBeta() > 0;
}
-
+
// check Gauss parameters
if (dev instanceof TimeGaussDistribution) {
final TimeGaussDistribution gaussDist = (TimeGaussDistribution) dev;
final Time mean = gaussDist.getMean();
final Time sd = gaussDist.getSd();
-
- if (!isValidTime(mean)) return false;
- if (!isValidTime(sd)) return false;
- if (sd.getValue().signum() < 1) return false;
- if (!isValidMinAvgMax(gaussDist.getLowerBound(), null, gaussDist.getUpperBound())) return false;
+
+ if (!isValidTime(mean) || !isValidTime(sd) || (sd.getValue().signum() < 1) || !isValidMinAvgMax(gaussDist.getLowerBound(), null, gaussDist.getUpperBound())) return false;
}
-
+
return true;
}
@@ -469,7 +448,7 @@
if (avg != null && max != null && avg.compareTo(max) >= 0) {
return false;
}
-
+
return true;
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/DeviationChartContinuousValue.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/DeviationChartContinuousValue.java
index d3e7ffd..7d48b61 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/DeviationChartContinuousValue.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/DeviationChartContinuousValue.java
@@ -191,7 +191,7 @@
if (lowerBound == null && upperBound != null) {
xMin = Math.min(xMin, upperBound - dev.getSd());
xMax = Math.max(xMax, upperBound + dev.getSd());
- }
+ }
}
final double step = (xMax - xMin) / 200;
@@ -210,7 +210,7 @@
} else if (upperBound != null && x > upperBound) {
seriesRight.getData().add(new Data<>(x, y));
} else {
- seriesMain.getData().add(new Data<>(x, y));
+ seriesMain.getData().add(new Data<>(x, y));
}
}
@@ -278,7 +278,7 @@
} else {
maxY = 100; // single value
}
-
+
// adopt range and add markers (min, avg, max)
setChartYBounds(chart, maxY * 1.2);
addMarkers(chart, maxY * 1.1, lower, average, upper);
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/DeviationChartDiscreteValue.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/DeviationChartDiscreteValue.java
index c45bc5b..1ac5b66 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/DeviationChartDiscreteValue.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/DeviationChartDiscreteValue.java
@@ -191,7 +191,7 @@
if (lowerBound == null && upperBound != null) {
xMin = Math.min(xMin, upperBound - dev.getSd());
xMax = Math.max(xMax, upperBound + dev.getSd());
- }
+ }
}
final double step = (xMax - xMin) / 200;
@@ -210,7 +210,7 @@
} else if (upperBound != null && x > upperBound) {
seriesRight.getData().add(new Data<>(x, y));
} else {
- seriesMain.getData().add(new Data<>(x, y));
+ seriesMain.getData().add(new Data<>(x, y));
}
}
@@ -278,7 +278,7 @@
} else {
maxY = 100; // single value
}
-
+
// adopt range and add markers (min, avg, max)
setChartYBounds(chart, maxY * 1.2);
addMarkers(chart, maxY * 1.1, lower, average, upper);
@@ -330,7 +330,7 @@
final double average = dev.getAverage().doubleValue();
final double remain = dev.getPRemainPromille();
- WeibullUtil.Parameters params = WeibullUtil.findParameters(lower, average, upper, remain);
+ WeibullUtil.Parameters params = WeibullUtil.findParameters(lower, average, upper, remain);
double shape = params.shape;
double scale = params.scale;
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/DeviationChartTime.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/DeviationChartTime.java
index b2b952b..c64247b 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/DeviationChartTime.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/DeviationChartTime.java
@@ -198,7 +198,7 @@
private double scaleTo(Time time, TimeUnit unit) {
// Get the difference from the source TimeUnit to the destination TimeUnit as a factor
List<TimeUnit> units = AmaltheaServices.TIME_UNIT_LIST;
- int power = units.indexOf(time.getUnit()) - units.indexOf(unit);
+ int power = units.indexOf(time.getUnit()) - units.indexOf(unit);
double factor = Math.pow(1000, power);
return time.getValue().doubleValue() * factor;
@@ -236,7 +236,7 @@
private String fillChart(AreaChart<Number, Number> chart, TimeGaussDistribution dev, TimeUnit commonUnit) {
double maxY = 0.000001; // initialize with a lower bound > 0
-
+
final double mean = scaleTo(dev.getMean(), commonUnit);
final double sd = scaleTo(dev.getSd(), commonUnit);
@@ -263,7 +263,7 @@
if (lowerBound == null && upperBound != null) {
xMin = Math.min(xMin, upperBound - sd);
xMax = Math.max(xMax, upperBound + sd);
- }
+ }
}
final double step = (xMax - xMin) / 200;
@@ -282,7 +282,7 @@
} else if (upperBound != null && x > upperBound) {
seriesRight.getData().add(new Data<>(x, y));
} else {
- seriesMain.getData().add(new Data<>(x, y));
+ seriesMain.getData().add(new Data<>(x, y));
}
}
@@ -351,7 +351,7 @@
} else {
maxY = 100; // single value
}
-
+
// adopt range and add markers (min, avg, max)
setChartYBounds(chart, maxY * 1.2);
addMarkers(chart, maxY * 1.1, lower, average, upper);
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/RunnableDependencyVisualization.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/RunnableDependencyVisualization.java
index 3a7c706..e3a4eed 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/RunnableDependencyVisualization.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/RunnableDependencyVisualization.java
@@ -32,8 +32,6 @@
import org.eclipse.e4.core.services.events.IEventBroker;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.osgi.service.component.annotations.Component;
@@ -61,39 +59,39 @@
public class RunnableDependencyVisualization implements Visualization {
private ArrowPainter arrowPainter = new ArrowPainter();
-
+
@PostConstruct
public void createVisualization(Runnable runnable, Composite parent, IEventBroker broker) {
if (runnable.eContainer() instanceof SWModel) {
parent.setLayout(new GridLayout());
-
+
FXCanvas fxCanvas = new FXCanvas(parent, SWT.NONE);
-
+
GridDataFactory
.fillDefaults()
.grab(true, true)
.applyTo(fxCanvas);
-
+
// create the root layout pane
BorderPane layout = new BorderPane();
layout.setBackground(new Background(new BackgroundFill(Color.WHITE, null, null)));
-
+
// create a Scene instance
// set the layout container as root
// set the background fill to the background color of the shell
Scene scene = new Scene(layout);
-
+
// set the Scene to the FXCanvas
fxCanvas.setScene(scene);
-
+
List<Runnable> runnables = RunnableHelper.getRunnableDependencies((SWModel)runnable.eContainer(), runnable, false);
int indexOfSelected = runnables.indexOf(runnable);
-
+
List<RunnablePainter> painter = runnables.stream()
.map(r -> new RunnablePainter(r, false))
.collect(Collectors.toList());
-
- List<RunnablePainter> readPainter = painter.subList(0, indexOfSelected);
+
+ List<RunnablePainter> readPainter = painter.subList(0, indexOfSelected);
RunnablePainter selectedPainter = painter.get(indexOfSelected);
List<RunnablePainter> writePainter = indexOfSelected < painter.size() - 1
? painter.subList(indexOfSelected + 1, painter.size())
@@ -101,26 +99,26 @@
double[] columnWidths = calculateColumnWidths(readPainter, selectedPainter, writePainter);
double[] rowHeights = calculateRowHeights(readPainter, selectedPainter, writePainter);
-
+
// calculate the max scale factor
double minWidth = Arrays.stream(columnWidths).sum();
double minHeight = Arrays.stream(rowHeights).sum();
-
+
double max = Math.max(minWidth, minHeight);
double factor = RunnableHelper.CANVAS_MAX / max;
painter.forEach(p -> p.setMaxScaleFactor(factor));
-
+
// add zoom buttons
Button zoomIn = new Button("+");
zoomIn.setPrefSize(40, 40);
-
+
Button zoomOut = new Button("-");
zoomOut.setPrefSize(40, 40);
zoomIn.setOnAction(event -> {
if (!zoomIn.isDisabled()) {
painter.forEach(RunnablePainter::zoomIn);
-
+
if (painter.get(0).getScaleFactor() == painter.get(0).getMaxScaleFactor()) {
zoomIn.setDisable(true);
}
@@ -128,14 +126,14 @@
zoomOut.setDisable(false);
}
}
-
+
parent.redraw();
});
-
+
zoomOut.setOnAction(event -> {
if (!zoomOut.isDisabled()) {
painter.forEach(RunnablePainter::zoomOut);
-
+
if (painter.get(0).getScaleFactor() == 0.1) {
zoomOut.setDisable(true);
}
@@ -143,15 +141,15 @@
zoomIn.setDisable(false);
}
}
-
+
parent.redraw();
});
-
+
VBox vBox = new VBox(5);
vBox.setPadding(new Insets(5));
vBox.getChildren().addAll(zoomIn, zoomOut);
layout.setLeft(vBox);
-
+
// disable zoom buttons if max scaling is reached on start
if (!painter.isEmpty()) {
if (painter.get(0).getScaleFactor() == painter.get(0).getMaxScaleFactor()) {
@@ -163,14 +161,14 @@
}
Canvas canvas = new Canvas();
-
+
ScrollPane scrollable = new ScrollPane();
scrollable.setPadding(new Insets(0));
scrollable.setStyle("-fx-background: rgb(255,255,255);\n -fx-background-color: rgb(255,255,255)");
scrollable.setContent(canvas);
-
+
layout.setCenter(scrollable);
-
+
canvas.setOnMouseClicked(event -> {
for (RunnablePainter p : painter) {
if (p.equals(selectedPainter)) {
@@ -187,13 +185,13 @@
canvas.setOnScroll(event -> {
if (event.isControlDown()) {
double deltaY = event.getDeltaY();
-
+
if (deltaY < 0){
zoomOut.fire();
} else {
zoomIn.fire();
}
-
+
event.consume();
}
});
@@ -202,7 +200,7 @@
Point2D screenToLocal = canvas.screenToLocal(event.getScreenX(), event.getScreenY());
double x = screenToLocal.getX();
double y = screenToLocal.getY();
-
+
boolean activate = false;
for (RunnablePainter p : painter) {
if (p.equals(selectedPainter)) {
@@ -213,133 +211,129 @@
break;
}
}
-
+
if (activate) {
scene.setCursor(Cursor.HAND);
} else {
scene.setCursor(Cursor.DEFAULT);
}
});
-
+
GraphicsContext gc = canvas.getGraphicsContext2D();
- parent.addPaintListener(new PaintListener() {
-
- @Override
- public void paintControl(PaintEvent e) {
-
- org.eclipse.swt.graphics.Rectangle parentBounds = parent.getBounds();
+ parent.addPaintListener(e -> {
- double[] scaledColumnWidths = Arrays.stream(columnWidths).map(width -> width * selectedPainter.getScaleFactor()).toArray();
- double[] scaledRowHeights = Arrays.stream(rowHeights).map(height -> height * selectedPainter.getScaleFactor()).toArray();
-
- double minWidth = Arrays.stream(scaledColumnWidths).sum();
- double minHeight = Arrays.stream(scaledRowHeights).sum();
+ org.eclipse.swt.graphics.Rectangle parentBounds = parent.getBounds();
- double canvasWidth = minWidth;
- double canvasHeight = minHeight;
-
- double parentBoundsWidth = parentBounds.width - 30d - vBox.getWidth();
- if (parentBoundsWidth > minWidth) {
- canvasWidth = parentBoundsWidth;
- }
-
- double parentBoundsHeight = parentBounds.height - 30d;
- if (parentBoundsHeight > minHeight) {
- canvasHeight = parentBoundsHeight;
- }
-
- // textures with bigger dimensions than 8192 x 8192 can't processed by even modern graphic cards
- // therefore we max it out by applying the max zoom factor we set to the painter before
- canvasWidth = Math.min(RunnableHelper.CANVAS_MAX, canvasWidth);
- canvasHeight = Math.min(RunnableHelper.CANVAS_MAX, canvasHeight);
-
- canvas.setWidth(canvasWidth);
- canvas.setHeight(canvasHeight);
- gc.clearRect(0, 0, canvasWidth, canvasHeight);
+ double[] scaledColumnWidths = Arrays.stream(columnWidths).map(width -> width * selectedPainter.getScaleFactor()).toArray();
+ double[] scaledRowHeights = Arrays.stream(rowHeights).map(height -> height * selectedPainter.getScaleFactor()).toArray();
- double xStart = parentBounds.x;
- double yStart = parentBounds.y;
-
- Rectangle bounds = null;
+ double minWidth1 = Arrays.stream(scaledColumnWidths).sum();
+ double minHeight1 = Arrays.stream(scaledRowHeights).sum();
- int row = 0;
- int column = 0;
-
- // paint the read dependencies
- for (RunnablePainter p : readPainter) {
- bounds = new Rectangle(
- Double.valueOf(xStart),
- Double.valueOf(yStart),
- scaledColumnWidths[column],
- scaledRowHeights[row]);
-
- p.paint(gc, bounds);
+ double canvasWidth = minWidth1;
+ double canvasHeight = minHeight1;
- yStart += scaledRowHeights[row];
-
- row++;
- }
-
- // paint the selected Runnable
- xStart = parentBounds.x + scaledColumnWidths[0];
- yStart = parentBounds.y;
+ double parentBoundsWidth = parentBounds.width - 30d - vBox.getWidth();
+ if (parentBoundsWidth > minWidth1) {
+ canvasWidth = parentBoundsWidth;
+ }
- selectedPainter.setRunnableHeaderFontFill(Color.WHITE);
- selectedPainter.setRunnableColor(Color.GREEN);
-
- row = 0;
- column = 1;
-
+ double parentBoundsHeight = parentBounds.height - 30d;
+ if (parentBoundsHeight > minHeight1) {
+ canvasHeight = parentBoundsHeight;
+ }
+
+ // textures with bigger dimensions than 8192 x 8192 can't processed by even modern graphic cards
+ // therefore we max it out by applying the max zoom factor we set to the painter before
+ canvasWidth = Math.min(RunnableHelper.CANVAS_MAX, canvasWidth);
+ canvasHeight = Math.min(RunnableHelper.CANVAS_MAX, canvasHeight);
+
+ canvas.setWidth(canvasWidth);
+ canvas.setHeight(canvasHeight);
+ gc.clearRect(0, 0, canvasWidth, canvasHeight);
+
+ double xStart = parentBounds.x;
+ double yStart = parentBounds.y;
+
+ Rectangle bounds = null;
+
+ int row = 0;
+ int column = 0;
+
+ // paint the read dependencies
+ for (RunnablePainter p1 : readPainter) {
bounds = new Rectangle(
Double.valueOf(xStart),
Double.valueOf(yStart),
scaledColumnWidths[column],
scaledRowHeights[row]);
-
- selectedPainter.paint(gc, bounds);
-
- // paint the write dependencies
- xStart = parentBounds.x + scaledColumnWidths[0] + scaledColumnWidths[1];
- yStart = parentBounds.y;
-
- row = 0;
- column = 2;
-
- for (RunnablePainter p : writePainter) {
- bounds = new Rectangle(
- Double.valueOf(xStart),
- Double.valueOf(yStart),
- scaledColumnWidths[column],
- scaledRowHeights[row]);
-
- p.paint(gc, bounds);
- yStart += scaledRowHeights[row];
-
- row++;
- }
-
- // paint arrows
- for (RunnablePainter rp : painter) {
- Map<Label, Rectangle> writeRectangles = rp.getWriteRectangles();
- writeRectangles.entrySet().forEach(entry -> {
- for (RunnablePainter rp2 : painter) {
- Rectangle readRect = rp2.getReadRectangle(entry.getKey());
- if (readRect != null) {
- Rectangle writeRect = entry.getValue();
+ p1.paint(gc, bounds);
- double startX = writeRect.getX() + writeRect.getWidth();
- double startY = writeRect.getY() + ((writeRect.getHeight() / 10) * 9);
- double endX = readRect.getX();
- double endY = readRect.getY() + ((readRect.getHeight() / 10) * 9);
-
- arrowPainter.paint(gc, startX, startY, endX, endY);
- }
+ yStart += scaledRowHeights[row];
+
+ row++;
+ }
+
+ // paint the selected Runnable
+ xStart = parentBounds.x + scaledColumnWidths[0];
+ yStart = parentBounds.y;
+
+ selectedPainter.setRunnableHeaderFontFill(Color.WHITE);
+ selectedPainter.setRunnableColor(Color.GREEN);
+
+ row = 0;
+ column = 1;
+
+ bounds = new Rectangle(
+ Double.valueOf(xStart),
+ Double.valueOf(yStart),
+ scaledColumnWidths[column],
+ scaledRowHeights[row]);
+
+ selectedPainter.paint(gc, bounds);
+
+ // paint the write dependencies
+ xStart = parentBounds.x + scaledColumnWidths[0] + scaledColumnWidths[1];
+ yStart = parentBounds.y;
+
+ row = 0;
+ column = 2;
+
+ for (RunnablePainter p2 : writePainter) {
+ bounds = new Rectangle(
+ Double.valueOf(xStart),
+ Double.valueOf(yStart),
+ scaledColumnWidths[column],
+ scaledRowHeights[row]);
+
+ p2.paint(gc, bounds);
+
+ yStart += scaledRowHeights[row];
+
+ row++;
+ }
+
+ // paint arrows
+ for (RunnablePainter rp : painter) {
+ Map<Label, Rectangle> writeRectangles = rp.getWriteRectangles();
+ writeRectangles.entrySet().forEach(entry -> {
+ for (RunnablePainter rp2 : painter) {
+ Rectangle readRect = rp2.getReadRectangle(entry.getKey());
+ if (readRect != null) {
+ Rectangle writeRect = entry.getValue();
+
+ double startX = writeRect.getX() + writeRect.getWidth();
+ double startY = writeRect.getY() + ((writeRect.getHeight() / 10) * 9);
+ double endX = readRect.getX();
+ double endY = readRect.getY() + ((readRect.getHeight() / 10) * 9);
+
+ arrowPainter.paint(gc, startX, startY, endX, endY);
}
-
- });
- }
+ }
+
+ });
}
});
}
@@ -347,20 +341,20 @@
private static double[] calculateColumnWidths(List<RunnablePainter> readPainter, RunnablePainter selectedPainter, List<RunnablePainter> writePainter) {
double[] widths = { 0d, 0d, 0d };
-
+
for (RunnablePainter runnablePainter : readPainter) {
widths[0] = Math.max(widths[0], runnablePainter.getPreferredMinimumWidth());
}
-
+
widths[1] = selectedPainter.getPreferredMinimumWidth();
-
+
for (RunnablePainter runnablePainter : writePainter) {
widths[2] = Math.max(widths[2], runnablePainter.getPreferredMinimumWidth());
}
-
+
return widths;
}
-
+
private static double[] calculateRowHeights(List<RunnablePainter> readPainter, RunnablePainter selectedPainter, List<RunnablePainter> writePainter) {
int rowCount = Math.max(readPainter.size(), writePainter.size());
if (rowCount == 0) {
@@ -369,25 +363,25 @@
rowCount = 1;
}
double[] heights = new double[rowCount];
-
+
for (int row = 0; row < rowCount; row++) {
double height = 0;
-
+
if (readPainter.size() > row) {
height = Math.max(height, readPainter.get(row).getPreferredMinimumHeight());
}
-
+
if (row == 0) {
height = Math.max(height, selectedPainter.getPreferredMinimumHeight());
}
-
+
if (writePainter.size() > row) {
height = Math.max(height, writePainter.get(row).getPreferredMinimumHeight());
}
-
+
heights[row] = height;
}
-
+
return heights;
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/RunnableSharedDependencyVisualization.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/RunnableSharedDependencyVisualization.java
index bfbcc16..16a243d 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/RunnableSharedDependencyVisualization.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/RunnableSharedDependencyVisualization.java
@@ -33,8 +33,6 @@
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.osgi.service.component.annotations.Component;
@@ -63,7 +61,7 @@
public class RunnableSharedDependencyVisualization implements Visualization {
private ArrowPainter arrowPainter = new ArrowPainter();
-
+
@PostConstruct
public void createVisualization(List<Runnable> runnables, Composite parent, IEventBroker broker) {
parent.setLayout(new GridLayout());
@@ -73,19 +71,19 @@
.fillDefaults()
.grab(true, true)
.applyTo(fxCanvas);
-
+
// create the root layout pane
BorderPane layout = new BorderPane();
layout.setBackground(new Background(new BackgroundFill(Color.WHITE, null, null)));
-
+
// create a Scene instance
// set the layout container as root
// set the background fill to the background color of the shell
Scene scene = new Scene(layout);
-
+
// set the Scene to the FXCanvas
fxCanvas.setScene(scene);
-
+
// if to many Runnables, show dialog to provide filter
List<Runnable> toRender = runnables;
RunnableFilterDialog dialog = new RunnableFilterDialog(parent.getShell(), runnables);
@@ -96,15 +94,15 @@
toRender = Collections.emptyList();
}
}
-
+
List<RunnablePainter> painter = toRender.stream()
.map(r -> new RunnablePainter(r, false))
.collect(Collectors.toList());
-
+
// add zoom buttons
Button zoomIn = new Button("+");
zoomIn.setPrefSize(40, 40);
-
+
Button zoomOut = new Button("-");
zoomOut.setPrefSize(40, 40);
@@ -122,11 +120,11 @@
parent.redraw();
}
});
-
+
zoomIn.setOnAction(event -> {
if (!zoomIn.isDisabled()) {
painter.forEach(RunnablePainter::zoomIn);
-
+
if (painter.get(0).getScaleFactor() == painter.get(0).getMaxScaleFactor()) {
zoomIn.setDisable(true);
}
@@ -134,14 +132,14 @@
zoomOut.setDisable(false);
}
}
-
+
parent.redraw();
});
-
+
zoomOut.setOnAction(event -> {
if (!zoomOut.isDisabled()) {
painter.forEach(RunnablePainter::zoomOut);
-
+
if (painter.get(0).getScaleFactor() == 0.1) {
zoomOut.setDisable(true);
}
@@ -149,17 +147,17 @@
zoomIn.setDisable(false);
}
}
-
+
parent.redraw();
});
-
+
VBox vBox = new VBox(5);
vBox.setPadding(new Insets(5));
vBox.getChildren().addAll(zoomIn, zoomOut, filter);
layout.setLeft(vBox);
RunnableHelper.setMaxScaleFactor(painter);
-
+
// disable zoom buttons if max scaling is reached on start
if (!painter.isEmpty()) {
if (painter.get(0).getScaleFactor() == painter.get(0).getMaxScaleFactor()) {
@@ -169,15 +167,15 @@
zoomOut.setDisable(true);
}
}
-
+
Canvas canvas = new Canvas();
-
+
ScrollPane scrollable = new ScrollPane();
scrollable.setStyle("-fx-background: rgb(255,255,255);\n -fx-background-color: rgb(255,255,255)");
scrollable.setContent(canvas);
-
+
layout.setCenter(scrollable);
-
+
canvas.setOnMouseClicked(event -> {
for (RunnablePainter p : painter) {
if (p.getRunnableRectangle().contains(event.getX(), event.getY())) {
@@ -191,13 +189,13 @@
canvas.setOnScroll(event -> {
if (event.isControlDown()) {
double deltaY = event.getDeltaY();
-
+
if (deltaY < 0){
zoomOut.fire();
} else {
zoomIn.fire();
}
-
+
event.consume();
}
});
@@ -206,7 +204,7 @@
Point2D screenToLocal = canvas.screenToLocal(event.getScreenX(), event.getScreenY());
double x = screenToLocal.getX();
double y = screenToLocal.getY();
-
+
boolean activate = false;
for (RunnablePainter p : painter) {
if (p.getRunnableRectangle().contains(x, y)) {
@@ -214,7 +212,7 @@
break;
}
}
-
+
if (activate) {
scene.setCursor(Cursor.HAND);
} else {
@@ -224,94 +222,90 @@
GraphicsContext gc = canvas.getGraphicsContext2D();
- parent.addPaintListener(new PaintListener() {
-
- @Override
- public void paintControl(PaintEvent e) {
-
- org.eclipse.swt.graphics.Rectangle parentBounds = parent.getBounds();
-
- // need to calculate the minimum dimensions based on the scaling level
- double[] grid = RunnableHelper.calculateGrid(painter.size());
- double[] minDim = RunnableHelper.calculateMinimumCellDimensions(grid, painter);
-
- double minWidth = grid[0] * minDim[0];
- double minHeight = grid[1] * minDim[1];
-
- double canvasWidth = minWidth;
- double canvasHeight = minHeight;
-
- double width = minWidth / grid[0];
- double height = minHeight / grid[1];
-
- double parentBoundsWidth = parentBounds.width - 35d - vBox.getWidth();
- if (parentBoundsWidth > minWidth) {
- canvasWidth = parentBoundsWidth;
- }
-
- double parentBoundsHeight = parentBounds.height - 30d;
- if (parentBoundsHeight > minHeight) {
- canvasHeight = parentBoundsHeight;
- }
-
- // textures with bigger dimensions than 8192 x 8192 can't processed by even modern graphic cards
- // therefore we max it out by applying the max zoom factor we set to the painter before
- canvasWidth = Math.min(RunnableHelper.CANVAS_MAX, canvasWidth);
- canvasHeight = Math.min(RunnableHelper.CANVAS_MAX, canvasHeight);
-
- canvas.setWidth(canvasWidth);
- canvas.setHeight(canvasHeight);
- gc.clearRect(0, 0, canvasWidth, canvasHeight);
-
- double xStart = parentBounds.x;
- double yStart = parentBounds.y;
-
- int count = 0;
- RunnablePainter p = null;
- for (int row = 0; row < grid[1]; row++) {
- for (int column = 0; column < grid[0]; column++) {
- if (count >= painter.size()) {
- break;
- }
-
- p = painter.get(count);
-
- Rectangle bounds = new Rectangle(
- Double.valueOf(xStart),
- Double.valueOf(yStart),
- Double.valueOf(width),
- Double.valueOf(height));
-
- p.paint(gc, bounds);
-
- count++;
- xStart += width;
- }
-
- xStart = parentBounds.x;
- yStart += height;
- }
-
- // paint arrows
- for (RunnablePainter rp : painter) {
- Map<Label, Rectangle> writeRectangles = rp.getWriteRectangles();
- writeRectangles.entrySet().forEach(entry -> {
- for (RunnablePainter rp2 : painter) {
- Rectangle readRect = rp2.getReadRectangle(entry.getKey());
- if (readRect != null) {
- Rectangle writeRect = entry.getValue();
+ parent.addPaintListener(e -> {
- double startX = writeRect.getX() + writeRect.getWidth();
- double startY = writeRect.getY() + ((writeRect.getHeight() / 10) * 9);
- double endX = readRect.getX();
- double endY = readRect.getY() + ((readRect.getHeight() / 10) * 9);
-
- arrowPainter.paint(gc, startX, startY, endX, endY);
- }
- }
-
- });
+ org.eclipse.swt.graphics.Rectangle parentBounds = parent.getBounds();
+
+ // need to calculate the minimum dimensions based on the scaling level
+ double[] grid = RunnableHelper.calculateGrid(painter.size());
+ double[] minDim = RunnableHelper.calculateMinimumCellDimensions(grid, painter);
+
+ double minWidth = grid[0] * minDim[0];
+ double minHeight = grid[1] * minDim[1];
+
+ double canvasWidth = minWidth;
+ double canvasHeight = minHeight;
+
+ double width = minWidth / grid[0];
+ double height = minHeight / grid[1];
+
+ double parentBoundsWidth = parentBounds.width - 35d - vBox.getWidth();
+ if (parentBoundsWidth > minWidth) {
+ canvasWidth = parentBoundsWidth;
+ }
+
+ double parentBoundsHeight = parentBounds.height - 30d;
+ if (parentBoundsHeight > minHeight) {
+ canvasHeight = parentBoundsHeight;
+ }
+
+ // textures with bigger dimensions than 8192 x 8192 can't processed by even modern graphic cards
+ // therefore we max it out by applying the max zoom factor we set to the painter before
+ canvasWidth = Math.min(RunnableHelper.CANVAS_MAX, canvasWidth);
+ canvasHeight = Math.min(RunnableHelper.CANVAS_MAX, canvasHeight);
+
+ canvas.setWidth(canvasWidth);
+ canvas.setHeight(canvasHeight);
+ gc.clearRect(0, 0, canvasWidth, canvasHeight);
+
+ double xStart = parentBounds.x;
+ double yStart = parentBounds.y;
+
+ int count = 0;
+ RunnablePainter p = null;
+ for (int row = 0; row < grid[1]; row++) {
+ for (int column = 0; column < grid[0]; column++) {
+ if (count >= painter.size()) {
+ break;
+ }
+
+ p = painter.get(count);
+
+ Rectangle bounds = new Rectangle(
+ Double.valueOf(xStart),
+ Double.valueOf(yStart),
+ Double.valueOf(width),
+ Double.valueOf(height));
+
+ p.paint(gc, bounds);
+
+ count++;
+ xStart += width;
}
+
+ xStart = parentBounds.x;
+ yStart += height;
+ }
+
+ // paint arrows
+ for (RunnablePainter rp : painter) {
+ Map<Label, Rectangle> writeRectangles = rp.getWriteRectangles();
+ writeRectangles.entrySet().forEach(entry -> {
+ for (RunnablePainter rp2 : painter) {
+ Rectangle readRect = rp2.getReadRectangle(entry.getKey());
+ if (readRect != null) {
+ Rectangle writeRect = entry.getValue();
+
+ double startX = writeRect.getX() + writeRect.getWidth();
+ double startY = writeRect.getY() + ((writeRect.getHeight() / 10) * 9);
+ double endX = readRect.getX();
+ double endY = readRect.getY() + ((readRect.getHeight() / 10) * 9);
+
+ arrowPainter.paint(gc, startX, startY, endX, endY);
+ }
+ }
+
+ });
}
});
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/RunnableVisualization.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/RunnableVisualization.java
index 7c01e04..382fa4c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/RunnableVisualization.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/RunnableVisualization.java
@@ -21,8 +21,6 @@
import org.eclipse.app4mc.visualization.ui.registry.Visualization;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.osgi.service.component.annotations.Component;
@@ -47,51 +45,51 @@
})
public class RunnableVisualization implements Visualization {
-
+
@PostConstruct
public void createVisualization(Runnable runnable, Composite parent) {
parent.setLayout(new GridLayout());
-
+
FXCanvas fxCanvas = new FXCanvas(parent, SWT.NONE);
-
+
GridDataFactory
.fillDefaults()
.grab(true, true)
.applyTo(fxCanvas);
-
+
// create the root layout pane
BorderPane layout = new BorderPane();
layout.setBackground(new Background(new BackgroundFill(Color.WHITE, null, null)));
-
+
// create a Scene instance
// set the layout container as root
// set the background fill to the background color of the shell
Scene scene = new Scene(layout);
-
+
// set the Scene to the FXCanvas
fxCanvas.setScene(scene);
-
+
RunnablePainter painter = new RunnablePainter(runnable);
// calculate the max scale factor
double minWidth = painter.getPreferredMinimumWidth();
double minHeight = painter.getPreferredMinimumHeight();
-
+
double max = Math.max(minWidth, minHeight);
double factor = RunnableHelper.CANVAS_MAX / max;
painter.setMaxScaleFactor(factor);
-
+
// add zoom buttons
Button zoomIn = new Button("+");
zoomIn.setPrefSize(40, 40);
-
+
Button zoomOut = new Button("-");
zoomOut.setPrefSize(40, 40);
zoomIn.setOnAction(event -> {
if (!zoomIn.isDisabled()) {
painter.zoomIn();
-
+
if (painter.getScaleFactor() == painter.getMaxScaleFactor()) {
zoomIn.setDisable(true);
}
@@ -99,14 +97,14 @@
zoomOut.setDisable(false);
}
}
-
+
parent.redraw();
});
-
+
zoomOut.setOnAction(event -> {
if (!zoomOut.isDisabled()) {
painter.zoomOut();
-
+
if (painter.getScaleFactor() == 0.1) {
zoomOut.setDisable(true);
}
@@ -114,15 +112,15 @@
zoomIn.setDisable(false);
}
}
-
+
parent.redraw();
});
-
+
VBox vBox = new VBox(5);
vBox.setPadding(new Insets(5));
vBox.getChildren().addAll(zoomIn, zoomOut);
layout.setLeft(vBox);
-
+
// disable zoom buttons if max scaling is reached on start
if (painter.getScaleFactor() == painter.getMaxScaleFactor()) {
zoomIn.setDisable(true);
@@ -132,70 +130,66 @@
}
Canvas canvas = new Canvas();
-
+
ScrollPane scrollable = new ScrollPane();
scrollable.setPadding(new Insets(0));
scrollable.setStyle("-fx-background: rgb(255,255,255);\n -fx-background-color: rgb(255,255,255)");
scrollable.setContent(canvas);
-
+
layout.setCenter(scrollable);
canvas.setOnScroll(event -> {
if (event.isControlDown()) {
double deltaY = event.getDeltaY();
-
+
if (deltaY < 0){
zoomOut.fire();
} else {
zoomIn.fire();
}
-
+
event.consume();
}
});
GraphicsContext gc = canvas.getGraphicsContext2D();
-
- parent.addPaintListener(new PaintListener() {
-
- @Override
- public void paintControl(PaintEvent e) {
-
- org.eclipse.swt.graphics.Rectangle parentBounds = parent.getBounds();
-
- double scaledColumnWidth = painter.getPreferredMinimumWidth() * painter.getScaleFactor();
- double scaledRowHeight = painter.getPreferredMinimumHeight() * painter.getScaleFactor();
-
- double canvasWidth = scaledColumnWidth;
- double canvasHeight = scaledRowHeight;
-
- double parentBoundsWidth = parentBounds.width - 30d - vBox.getWidth();
- if (parentBoundsWidth > scaledColumnWidth) {
- canvasWidth = parentBoundsWidth;
- }
-
- double parentBoundsHeight = parentBounds.height - 30d;
- if (parentBoundsHeight > scaledRowHeight) {
- canvasHeight = parentBoundsHeight;
- }
-
- // textures with bigger dimensions than 8192 x 8192 can't processed by even modern graphic cards
- // therefore we max it out by applying the max zoom factor we set to the painter before
- canvasWidth = Math.min(RunnableHelper.CANVAS_MAX, canvasWidth);
- canvasHeight = Math.min(RunnableHelper.CANVAS_MAX, canvasHeight);
-
- canvas.setWidth(canvasWidth);
- canvas.setHeight(canvasHeight);
- gc.clearRect(0, 0, canvasWidth, canvasHeight);
-
- Rectangle bounds = new Rectangle(
- Double.valueOf(parentBounds.x),
- Double.valueOf(parentBounds.y),
- Double.valueOf(scaledColumnWidth),
- Double.valueOf(scaledRowHeight));
-
- painter.paint(gc, bounds);
+
+ parent.addPaintListener(e -> {
+
+ org.eclipse.swt.graphics.Rectangle parentBounds = parent.getBounds();
+
+ double scaledColumnWidth = painter.getPreferredMinimumWidth() * painter.getScaleFactor();
+ double scaledRowHeight = painter.getPreferredMinimumHeight() * painter.getScaleFactor();
+
+ double canvasWidth = scaledColumnWidth;
+ double canvasHeight = scaledRowHeight;
+
+ double parentBoundsWidth = parentBounds.width - 30d - vBox.getWidth();
+ if (parentBoundsWidth > scaledColumnWidth) {
+ canvasWidth = parentBoundsWidth;
}
+
+ double parentBoundsHeight = parentBounds.height - 30d;
+ if (parentBoundsHeight > scaledRowHeight) {
+ canvasHeight = parentBoundsHeight;
+ }
+
+ // textures with bigger dimensions than 8192 x 8192 can't processed by even modern graphic cards
+ // therefore we max it out by applying the max zoom factor we set to the painter before
+ canvasWidth = Math.min(RunnableHelper.CANVAS_MAX, canvasWidth);
+ canvasHeight = Math.min(RunnableHelper.CANVAS_MAX, canvasHeight);
+
+ canvas.setWidth(canvasWidth);
+ canvas.setHeight(canvasHeight);
+ gc.clearRect(0, 0, canvasWidth, canvasHeight);
+
+ Rectangle bounds = new Rectangle(
+ Double.valueOf(parentBounds.x),
+ Double.valueOf(parentBounds.y),
+ Double.valueOf(scaledColumnWidth),
+ Double.valueOf(scaledRowHeight));
+
+ painter.paint(gc, bounds);
});
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/SWModelRunnableSharedDependencyVisualization.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/SWModelRunnableSharedDependencyVisualization.java
index 7af35ee..c8ab75c 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/SWModelRunnableSharedDependencyVisualization.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/SWModelRunnableSharedDependencyVisualization.java
@@ -30,10 +30,10 @@
@Reference
RunnableSharedDependencyVisualization visualization;
-
+
@PostConstruct
public void createVisualization(SWModel model, Composite parent, IEventBroker broker) {
- this.visualization.createVisualization(model.getRunnables(), parent, broker);
+ visualization.createVisualization(model.getRunnables(), parent, broker);
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/SoftwareModelVisualization.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/SoftwareModelVisualization.java
index a8b592e..b2905ec 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/SoftwareModelVisualization.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/SoftwareModelVisualization.java
@@ -54,29 +54,29 @@
@PostConstruct
public void createVisualization(SWModel model, Composite parent) {
parent.setLayout(new GridLayout());
-
+
FXCanvas canvas = new FXCanvas(parent, SWT.NONE);
-
+
GridDataFactory
.fillDefaults()
.grab(true, true)
.applyTo(canvas);
-
+
// create the root layout pane
BorderPane layout = new BorderPane();
layout.setBackground(new Background(new BackgroundFill(Color.WHITE, null, null)));
-
+
// create a Scene instance
// set the layout container as root
// set the background fill to the background color of the shell
Scene scene = new Scene(layout);
-
+
// set the Scene to the FXCanvas
canvas.setScene(scene);
-
+
Label output = new Label();
layout.setCenter(output);
-
+
RotateTransition rotateTransition = new RotateTransition(Duration.seconds(1), output);
rotateTransition.setByAngle(360);
@@ -94,12 +94,12 @@
TranslateTransition trans = new TranslateTransition(Duration.seconds(0.5), output);
trans.setFromY(output.getBoundsInLocal().getMinY());
trans.setToY(-1 * ((scene.getHeight() / 2) - output.getHeight()) + 25);
-
+
trans.setOnFinished(event -> {
-
+
GridPane grid = new GridPane();
grid.setHgap(10);
-
+
ColumnConstraints leftCol = new ColumnConstraints();
leftCol.setHgrow(Priority.NEVER);
ColumnConstraints rightCol = new ColumnConstraints();
@@ -107,23 +107,23 @@
rightCol.setHalignment(HPos.RIGHT);
ColumnConstraints spacerCol = new ColumnConstraints();
spacerCol.setHgrow(Priority.ALWAYS);
-
+
grid.getColumnConstraints().addAll(leftCol, rightCol, spacerCol);
-
+
Font defaultFont = Font.getDefault();
Font boldFont = Font.font(defaultFont.getFamily(), FontWeight.BOLD, defaultFont.getSize());
-
+
Text headlineText = new Text(output.getText());
headlineText.setFont(Font.font(defaultFont.getFamily(), defaultFont.getSize() * 4));
grid.add(headlineText, 0, 0);
GridPane.setColumnSpan(headlineText, 3);
GridPane.setHalignment(headlineText, HPos.CENTER);
GridPane.setValignment(headlineText, VPos.CENTER);
-
+
grid.add(new Text(), 0, 1);
grid.add(new Text(), 1, 1);
grid.add(new Text(), 2, 1);
-
+
addLine(grid, defaultFont, boldFont, "Activations:", model.getActivations().size(), 2);
addLine(grid, defaultFont, boldFont, "Channels:", model.getChannels().size(), 3);
addLine(grid, defaultFont, boldFont, "Custom Entities:", model.getCustomEntities().size(), 4);
@@ -139,16 +139,16 @@
addLine(grid, defaultFont, boldFont, "Sections:", model.getSections().size(), 14);
addLine(grid, defaultFont, boldFont, "Tasks:", model.getTasks().size(), 15);
addLine(grid, defaultFont, boldFont, "Type Definitions:", model.getTypeDefinitions().size(), 16);
-
+
layout.setCenter(grid);
});
-
- trans.play();
+
+ trans.play();
});
-
+
parallelTransition.play();
}
-
+
private void addLine(GridPane grid, Font defaultFont, Font boldFont, String label, int size, int row) {
Text activationsText = new Text(label);
activationsText.setFont(size > 0 ? boldFont : defaultFont);
@@ -157,7 +157,7 @@
activationsNumber.setFont(size > 0 ? boldFont : defaultFont);
grid.add(activationsNumber, 1, row);
}
-
+
@PreDestroy
public void dispose() {
System.out.println("Destroy resources");
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/ArrowPainter.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/ArrowPainter.java
index 8f22d1e..cf83e32 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/ArrowPainter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/ArrowPainter.java
@@ -25,17 +25,17 @@
private Paint arrowColor;
private double[] lineDashes;
-
+
/**
* Create an {@link ArrowPainter} with orange color and a dashed line style.
*/
public ArrowPainter() {
this(Color.ORANGE, new double[] {6, 3});
}
-
+
/**
* Create an {@link ArrowPainter} with the given color and dash style.
- *
+ *
* @param arrowColor The color to use.
* @param lineDashes The line dash to use.
*/
@@ -46,7 +46,7 @@
/**
* Paint an arrow on the given {@link GraphicsContext}.
- *
+ *
* @param gc The {@link GraphicsContext} that should be used for painting.
* @param startX The start X of the arrow.
* @param startY The start Y of the arrow.
@@ -54,18 +54,18 @@
* @param endY The end Y of the arrow.
*/
public void paint(GraphicsContext gc, double startX, double startY, double endX, double endY) {
-
+
Paint previousStroke = gc.getStroke();
double[] previousDashes = gc.getLineDashes();
-
- gc.setStroke(this.arrowColor);
- gc.setLineDashes(this.lineDashes);
+
+ gc.setStroke(arrowColor);
+ gc.setLineDashes(lineDashes);
gc.strokeLine(
- startX,
- startY,
- endX,
+ startX,
+ startY,
+ endX,
endY);
-
+
double factor = 10 / Math.hypot(startX-endX, startY-endY);
double factorO = 7 / Math.hypot(startX-endX, startY-endY);
@@ -80,15 +80,15 @@
gc.setLineDashes(0);
// upper arrow line
gc.strokeLine(
- endX + dx - oy,
- endY + dy + ox,
- endX,
+ endX + dx - oy,
+ endY + dy + ox,
+ endX,
endY);
// lower arrow line
gc.strokeLine(
- endX + dx + oy,
- endY + dy - ox,
- endX,
+ endX + dx + oy,
+ endY + dy - ox,
+ endX,
endY);
gc.setStroke(previousStroke);
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/FontMetrics.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/FontMetrics.java
index 814ad1a..aaf41c2 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/FontMetrics.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/FontMetrics.java
@@ -21,7 +21,7 @@
* Helper class to calculate metrics based on a {@link Font}.
*/
public class FontMetrics {
-
+
private final Text internal = new Text();
public final double lineHeight;
public final double ascent;
@@ -29,26 +29,26 @@
/**
* Create a new {@link FontMetrics} object for the given {@link Font}.
- *
+ *
* @param font The {@link Font} for which the {@link FontMetrics} class should
* be created.
*/
public FontMetrics(Font font) {
- this.internal.setFont(font);
- Bounds bounds = this.internal.getLayoutBounds();
- this.lineHeight = bounds.getHeight();
- this.ascent = -bounds.getMinY();
- this.descent = bounds.getMaxY();
+ internal.setFont(font);
+ Bounds bounds = internal.getLayoutBounds();
+ lineHeight = bounds.getHeight();
+ ascent = -bounds.getMinY();
+ descent = bounds.getMaxY();
}
/**
* The width needed for a given text.
- *
+ *
* @param txt The text for which the width is requested.
* @return The width of the given text for the configured {@link Font}.
*/
public double computeStringWidth(String txt) {
- this.internal.setText(txt);
- return this.internal.getLayoutBounds().getWidth();
+ internal.setText(txt);
+ return internal.getLayoutBounds().getWidth();
}
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/RunnableFilterDialog.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/RunnableFilterDialog.java
index 37de90b..2060cb4 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/RunnableFilterDialog.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/RunnableFilterDialog.java
@@ -25,14 +25,10 @@
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -44,7 +40,7 @@
* Dialog to filter a list of Runnables.
*/
public class RunnableFilterDialog extends Dialog {
-
+
private static final String STATISTICS_MSG = "Currently selected {0} of {1}";
private List<Runnable> originalList;
@@ -57,45 +53,45 @@
* Fake empty Activation needed to support clearing of activation filter.
*/
private Activation emptyActivation;
-
+
public RunnableFilterDialog(Shell parentShell, List<Runnable> toFilter) {
super(parentShell);
- this.originalList = toFilter;
- this.result = toFilter;
-
- this.emptyActivation = AmaltheaFactory.eINSTANCE.createCustomActivation();
- this.emptyActivation.setName("---");
-
- this.activationFilter = this.emptyActivation;
+ originalList = toFilter;
+ result = toFilter;
+
+ emptyActivation = AmaltheaFactory.eINSTANCE.createCustomActivation();
+ emptyActivation.setName("---");
+
+ activationFilter = emptyActivation;
}
private void filterRunnable() {
- this.result = this.originalList.stream().filter(r -> {
- return r.getName().contains(this.nameFilter)
- && ((this.activationFilter != null && !this.activationFilter.equals(emptyActivation))
- ? r.getActivations().contains(this.activationFilter)
+ result = originalList.stream().filter(r -> {
+ return r.getName().contains(nameFilter)
+ && ((activationFilter != null && !activationFilter.equals(emptyActivation))
+ ? r.getActivations().contains(activationFilter)
: true);
}).collect(Collectors.toList());
}
-
+
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
-
+
container.setLayout(new GridLayout(2, false));
-
+
Label hint = new Label(container, SWT.NONE);
hint.setText("The number of Runnables to visualize is greater than 100. The painting may take very long or even fail at all.\n\nPlease try to reduce the number of Runnables by applying a filter.");
-
+
GridDataFactory.swtDefaults()
.align(SWT.FILL, SWT.BEGINNING)
.span(2, 1)
.grab(true, false)
.applyTo(hint);
-
+
Label statistics = new Label(container, SWT.NONE);
statistics.setText(MessageFormat.format(STATISTICS_MSG, result.size(), originalList.size()));
-
+
GridDataFactory.swtDefaults()
.align(SWT.FILL, SWT.BEGINNING)
.span(2, 1)
@@ -104,26 +100,22 @@
Label name = new Label(container, SWT.NONE);
name.setText("Name filter:");
-
+
GridDataFactory.swtDefaults()
.align(SWT.FILL, SWT.BEGINNING)
.grab(false, false)
.applyTo(name);
-
+
Text nameFilterText = new Text(container, SWT.BORDER);
- nameFilterText.setText(this.nameFilter);
- nameFilterText.addModifyListener(new ModifyListener() {
-
- @Override
- public void modifyText(ModifyEvent e) {
- nameFilter = nameFilterText.getText();
-
- filterRunnable();
-
- statistics.setText(MessageFormat.format(STATISTICS_MSG, result.size(), originalList.size()));
- }
+ nameFilterText.setText(nameFilter);
+ nameFilterText.addModifyListener(e -> {
+ nameFilter = nameFilterText.getText();
+
+ filterRunnable();
+
+ statistics.setText(MessageFormat.format(STATISTICS_MSG, result.size(), originalList.size()));
});
-
+
GridDataFactory.swtDefaults()
.align(SWT.FILL, SWT.FILL)
.grab(true, false)
@@ -131,13 +123,13 @@
Label activation = new Label(container, SWT.NONE);
activation.setText("Activation filter:");
-
+
GridDataFactory.swtDefaults()
.align(SWT.FILL, SWT.BEGINNING)
.grab(false, false)
.applyTo(activation);
-
-
+
+
ComboViewer activationFilterCombo = new ComboViewer(container, SWT.READ_ONLY);
activationFilterCombo.setContentProvider(ArrayContentProvider.getInstance());
@@ -152,48 +144,45 @@
}
});
- List<Activation> activations = this.originalList.stream().flatMap(r -> r.getActivations().stream()).distinct().collect(Collectors.toList());
- activations.add(0, this.emptyActivation);
+ List<Activation> activations = originalList.stream().flatMap(r -> r.getActivations().stream()).distinct().collect(Collectors.toList());
+ activations.add(0, emptyActivation);
activationFilterCombo.setInput(activations);
-
- if (this.activationFilter != null) {
- activationFilterCombo.setSelection(new StructuredSelection(Arrays.asList(this.activationFilter)));
+
+ if (activationFilter != null) {
+ activationFilterCombo.setSelection(new StructuredSelection(Arrays.asList(activationFilter)));
}
-
+
GridDataFactory.swtDefaults()
.align(SWT.FILL, SWT.FILL)
.grab(true, false)
.applyTo(activationFilterCombo.getControl());
- activationFilterCombo.addSelectionChangedListener(new ISelectionChangedListener() {
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- if (selection.size() > 0) {
- activationFilter = (Activation) selection.getFirstElement();
-
- filterRunnable();
-
- statistics.setText(MessageFormat.format(STATISTICS_MSG, result.size(), originalList.size()));
- }
+ activationFilterCombo.addSelectionChangedListener(event -> {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ if (selection.size() > 0) {
+ activationFilter = (Activation) selection.getFirstElement();
+
+ filterRunnable();
+
+ statistics.setText(MessageFormat.format(STATISTICS_MSG, result.size(), originalList.size()));
}
});
-
+
return container;
}
-
+
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setText("Filter Runnables");
}
-
+
@Override
protected boolean isResizable() {
return true;
}
-
+
public List<Runnable> getSelectedRunnables() {
- return this.result;
+ return result;
}
}
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/RunnableHelper.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/RunnableHelper.java
index 3a8ae45..84f1472 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/RunnableHelper.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/RunnableHelper.java
@@ -29,17 +29,17 @@
private RunnableHelper() {
// empty private default constructor for helper class
}
-
+
/**
* Typically textures with bigger dimensions than 8192 x 8192 can't even be
* processed by modern graphic cards. Since even that is to much in some cases,
* we specify an even smaller value.
*/
public static final double CANVAS_MAX = 6000;
-
+
/**
* Calculates a grid out of the given number of items.
- *
+ *
* @param count The number of items.
* @return A grid definition where the first entry in the array is the number of
* columns, the second is the number of rows.
@@ -49,25 +49,25 @@
if (count == 3) {
return new double[] {3, 1};
}
-
+
double sqrt = Math.sqrt(count);
-
+
double columns = Math.ceil(sqrt);
double rows = Math.max(1, Math.floor(sqrt));
double cells = columns * rows;
-
+
if (cells < count) {
rows += 1;
}
return new double[] {columns, rows};
}
-
+
/**
* Calculate the minimum grid cell width based on the minimum preferred
* dimensions of the given painter.
- *
+ *
* @param grid The grid definition.
* @param painter The painter that should be rendered in the grid cells.
* @return The minimum cell dimensions where the first entry in the array is the
@@ -95,7 +95,7 @@
/**
* Find all {@link Runnable} to which the given {@link Runnable} has
* dependencies in terms of Label access.
- *
+ *
* @param swModel The {@link SWModel} needed to access all available
* {@link Runnable}.
* @param runnable The {@link Runnable} for which the dependencies
@@ -109,11 +109,11 @@
* dependent.
*/
public static List<Runnable> getRunnableDependencies(SWModel swModel, Runnable runnable, boolean collectTransitive) {
-
+
List<Label> readItems = SoftwareUtil.getReadLabelAccessList(runnable, null).stream()
.map(LabelAccess::getData)
.collect(Collectors.toList());
-
+
List<Label> writeItems = SoftwareUtil.getWriteLabelAccessList(runnable, null).stream()
.map(LabelAccess::getData)
.collect(Collectors.toList());
@@ -122,22 +122,22 @@
List<Runnable> dependencies = new ArrayList<>();
collectReadDependencies(swModel, readItems, dependencies, collectTransitive);
Collections.reverse(dependencies);
-
+
// first remove the starting point if it was added to the read dependencies
dependencies.remove(runnable);
-
+
// now add it at the correct position
dependencies.add(runnable);
-
+
// find all Runnables that read from labels that are written by the given Runnable
collectWriteDependencies(swModel, writeItems, dependencies, collectTransitive);
return dependencies;
}
-
+
/**
* Collect all {@link Runnable} that write to the given {@link Label}s.
- *
+ *
* @param swModel The {@link SWModel} needed to access all available
* {@link Runnable}.
* @param readItems The {@link Label}s to check for.
@@ -156,34 +156,34 @@
List<Label> wItems = SoftwareUtil.getWriteLabelAccessList(r, null).stream()
.map(LabelAccess::getData)
.collect(Collectors.toList());
-
+
for (Label l : readItems) {
if (wItems.contains(l)) {
return true;
}
}
-
+
return false;
})
.filter(item -> !collected.contains(item))
.collect(Collectors.toList());
collected.addAll(directReadDependency);
-
+
if (collectTransitive) {
directReadDependency.forEach(dependency -> {
List<Label> read = SoftwareUtil.getReadLabelAccessList(dependency, null).stream()
.map(LabelAccess::getData)
.collect(Collectors.toList());
-
+
collectReadDependencies(swModel, read, collected, collectTransitive);
});
}
}
-
+
/**
* Collect all {@link Runnable} that read from the given {@link Label}s.
- *
+ *
* @param swModel The {@link SWModel} needed to access all available
* {@link Runnable}.
* @param writeItems The {@link Label}s to check for.
@@ -202,35 +202,35 @@
List<Label> rItems = SoftwareUtil.getReadLabelAccessList(r, null).stream()
.map(LabelAccess::getData)
.collect(Collectors.toList());
-
+
for (Label l : writeItems) {
if (rItems.contains(l)) {
return true;
}
}
-
+
return false;
})
.filter(item -> !collected.contains(item))
.collect(Collectors.toList());
-
+
collected.addAll(directWriteDependency);
-
+
if (collectTransitive) {
directWriteDependency.forEach(dependency -> {
List<Label> write = SoftwareUtil.getWriteLabelAccessList(dependency, null).stream()
.map(LabelAccess::getData)
.collect(Collectors.toList());
-
+
collectWriteDependencies(swModel, write, collected, collectTransitive);
});
}
}
-
+
/**
* Calculates the maximum scale factor to be used to avoid texture overflows on
* rendering.
- *
+ *
* @param painter The list of {@link RunnablePainter} needed for calculation of
* the grid and the minimum cell dimensions.
*/
@@ -241,7 +241,7 @@
/**
* Calculates the maximum scale factor to be used to avoid texture overflows on
* rendering.
- *
+ *
* @param painter The list of {@link RunnablePainter} needed for calculation of
* the minimum cell dimensions.
* @param grid The grid definition needed for calculation of the minimum cell
@@ -249,7 +249,7 @@
*/
public static void setMaxScaleFactor(List<RunnablePainter> painter, double[] grid) {
double[] minDim = RunnableHelper.calculateMinimumCellDimensions(grid, painter);
-
+
// calculate the maximum scaling factor
// because textures with bigger dimensions than 8192 x 8192 can't even be processed by modern graphic cards
double max = Math.max(grid[0] * minDim[0], grid[1] * minDim[1]);
diff --git a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/RunnablePainter.java b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/RunnablePainter.java
index 37c5064..c59d1c8 100644
--- a/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/RunnablePainter.java
+++ b/plugins/org.eclipse.app4mc.amalthea.visualizations.standard/src/org/eclipse/app4mc/amalthea/visualizations/standard/util/RunnablePainter.java
@@ -33,39 +33,39 @@
private static final double MIN_UNIT_HEIGHT = 20;
private static final FontMetrics MIN_BOLD_FONT_METRICS = new FontMetrics(Font.font(Font.getDefault().getFamily(), FontWeight.BOLD, 12));
private static final FontMetrics MIN_FONT_METRICS = new FontMetrics(Font.font(Font.getDefault().getFamily(), 12));
-
+
private final Runnable runnable;
private List<LabelAccess> readItems;
private List<LabelAccess> writeItems;
-
+
private int itemMax = 0;
-
+
private double scaleFactor = 1.0d;
private double maxScaleFactor = 0d;
private boolean autoscale = true;
-
+
private Rectangle runnableRectangle;
private HashMap<Label, Rectangle> readAccessRectangles = new HashMap<>();
private HashMap<Label, Rectangle> writeAccessRectangles = new HashMap<>();
-
+
private Color runnableStroke = Color.GREEN;
private Color runnableHeaderFillColor = Color.LIGHTGREEN;
private Color runnableBodyFillColor = null;
private Color runnableHeaderFontFill = Color.BLACK;
private Color labelFontFill = Color.GREEN;
-
+
/**
* Create a new painter for the given {@link Runnable} with enable autoscaling.
- *
+ *
* @param runnable The {@link Runnable} for which the painter should be created.
*/
public RunnablePainter(Runnable runnable) {
this(runnable, true);
}
-
+
/**
* Create a new painter for the given {@link Runnable}.
- *
+ *
* @param runnable The {@link Runnable} for which the painter should be
* created.
* @param autoscale <code>true</code> if the rendering should be automatically
@@ -76,40 +76,40 @@
this.runnable = runnable;
this.autoscale = autoscale;
- this.readItems = SoftwareUtil.getReadLabelAccessList(runnable, null);
- this.writeItems = SoftwareUtil.getWriteLabelAccessList(runnable, null);
-
- this.itemMax = Math.max(this.readItems.size(), this.writeItems.size());
- if (this.itemMax == 0) {
+ readItems = SoftwareUtil.getReadLabelAccessList(runnable, null);
+ writeItems = SoftwareUtil.getWriteLabelAccessList(runnable, null);
+
+ itemMax = Math.max(readItems.size(), writeItems.size());
+ if (itemMax == 0) {
// if there are no items yet, we use 1 to have at least a reasonable rendering
- this.itemMax = 1;
+ itemMax = 1;
}
}
/**
- *
+ *
* @return The preferred minimum height using a unit height of 20.
*/
public double getPreferredMinimumHeight() {
// number of units needed for height calculation
// number of items + number of gaps between items + gap on top and bottom of box + box header + padding to border
- int units = this.itemMax + (this.itemMax - 1) + 2 + 2 + 2;
- return MIN_UNIT_HEIGHT * this.scaleFactor * units;
+ int units = itemMax + (itemMax - 1) + 2 + 2 + 2;
+ return MIN_UNIT_HEIGHT * scaleFactor * units;
}
-
+
/**
- *
+ *
* @return the preferred minimum width using a font size of 12.
*/
public double getPreferredMinimumWidth() {
double longestRead = 0;
- for (LabelAccess item : this.readItems) {
+ for (LabelAccess item : readItems) {
String name = item.getData().getDisplayName() != null ? item.getData().getDisplayName() : item.getData().getName();
longestRead = Math.max(longestRead, MIN_FONT_METRICS.computeStringWidth(name));
}
-
+
double longestWrite = 0;
- for (LabelAccess item : this.writeItems) {
+ for (LabelAccess item : writeItems) {
String name = item.getData().getDisplayName() != null ? item.getData().getDisplayName() : item.getData().getName();
longestWrite = Math.max(longestWrite, MIN_FONT_METRICS.computeStringWidth(name));
}
@@ -117,77 +117,77 @@
double textWidth = MIN_BOLD_FONT_METRICS.computeStringWidth(runnable.getName());
// padding left/ right + longestRead + longestWrite + padding label access to rectangle + rectangle width
- return ((6 * MIN_UNIT_HEIGHT) + longestRead + longestWrite + textWidth) * this.scaleFactor;
+ return ((6 * MIN_UNIT_HEIGHT) + longestRead + longestWrite + textWidth) * scaleFactor;
}
-
+
/**
* Paint the {@link Runnable} on the given {@link GraphicsContext}.
- *
+ *
* @param gc The {@link GraphicsContext} that should be used for
* rendering.
* @param parentBounds The bounds on which the {@link Runnable} should be
* painted.
*/
public void paint(GraphicsContext gc, Rectangle parentBounds) {
-
+
// number of units needed for height calculation
// number of items + number of gaps between items + gap on top and bottom of box + box header + padding to border
- int units = this.itemMax + (this.itemMax - 1) + 2 + 2 + 2;
-
+ int units = itemMax + (itemMax - 1) + 2 + 2 + 2;
+
// the minimum item height is 20
- double unitHeight = MIN_UNIT_HEIGHT * this.scaleFactor;
+ double unitHeight = MIN_UNIT_HEIGHT * scaleFactor;
double minHeight = units * unitHeight;
-
- if (this.autoscale && (parentBounds.getHeight() > minHeight)) {
+
+ if (autoscale && (parentBounds.getHeight() > minHeight)) {
unitHeight = parentBounds.getHeight() / units;
}
-
+
// calculate with font metrics
Font defaultFont = gc.getFont();
double fontSize = 12 * (Double.valueOf(unitHeight) / 20);
-
+
Font headlineFont = Font.font(defaultFont.getFamily(), FontWeight.BOLD, fontSize);
Font labelAccessFont = Font.font(defaultFont.getFamily(), fontSize);
-
+
// calculate start x positions
gc.setFont(headlineFont);
FontMetrics headlineMetrics = new FontMetrics(headlineFont);
double textWidth = headlineMetrics.computeStringWidth(runnable.getName());
-
+
// check the longest read access label
gc.setFont(labelAccessFont);
FontMetrics labelAccessMetrics = new FontMetrics(gc.getFont());
double longestRead = 0;
- for (LabelAccess item : this.readItems) {
+ for (LabelAccess item : readItems) {
String name = item.getData().getDisplayName() != null ? item.getData().getDisplayName() : item.getData().getName();
longestRead = Math.max(longestRead, labelAccessMetrics.computeStringWidth(name));
}
-
+
double longestWrite = 0;
- for (LabelAccess item : this.writeItems) {
+ for (LabelAccess item : writeItems) {
String name = item.getData().getDisplayName() != null ? item.getData().getDisplayName() : item.getData().getName();
longestWrite = Math.max(longestWrite, labelAccessMetrics.computeStringWidth(name));
}
// padding left/ right + longestRead + longestWrite + padding label access to rectangle + rectangle width
double runnableWidth = (2 * unitHeight) + longestRead + longestWrite + (2 * unitHeight) + textWidth + (2 * unitHeight);
- if (this.autoscale && (runnableWidth > parentBounds.getWidth())) {
+ if (autoscale && (runnableWidth > parentBounds.getWidth())) {
double factor = parentBounds.getWidth() / runnableWidth;
unitHeight *= factor;
fontSize = 12 * (Double.valueOf(unitHeight) / 20);
-
+
headlineFont = Font.font(defaultFont.getFamily(), FontWeight.BOLD, fontSize);
labelAccessFont = Font.font(defaultFont.getFamily(), fontSize);
headlineMetrics = new FontMetrics(headlineFont);
- textWidth = headlineMetrics.computeStringWidth(this.runnable.getName());
-
+ textWidth = headlineMetrics.computeStringWidth(runnable.getName());
+
// check the longest read access label
gc.setFont(labelAccessFont);
labelAccessMetrics = new FontMetrics(gc.getFont());
longestRead = 0;
- for (LabelAccess item : this.readItems) {
+ for (LabelAccess item : readItems) {
String name = item.getData().getDisplayName() != null ? item.getData().getDisplayName() : item.getData().getName();
longestRead = Math.max(longestRead, labelAccessMetrics.computeStringWidth(name));
}
@@ -196,147 +196,147 @@
// calculate start x positions
double rectX = parentBounds.getX() + (2 * unitHeight) + longestRead;
double runnableX = rectX + unitHeight;
-
+
// draw runnable
gc.setFont(headlineFont);
- gc.setStroke(this.runnableStroke);
-
+ gc.setStroke(runnableStroke);
+
// first draw the body
- if (this.runnableBodyFillColor != null) {
- gc.setFill(this.runnableBodyFillColor);
+ if (runnableBodyFillColor != null) {
+ gc.setFill(runnableBodyFillColor);
gc.fillRect(
- rectX,
- parentBounds.getY() + unitHeight,
- textWidth + (2 * unitHeight),
+ rectX,
+ parentBounds.getY() + unitHeight,
+ textWidth + (2 * unitHeight),
(units - 2) * unitHeight);
}
gc.strokeRect(
- rectX,
- parentBounds.getY() + unitHeight,
- textWidth + (2 * unitHeight),
+ rectX,
+ parentBounds.getY() + unitHeight,
+ textWidth + (2 * unitHeight),
(units - 2) * unitHeight);
// now draw the runnable header
- gc.setFill(this.runnableHeaderFillColor);
+ gc.setFill(runnableHeaderFillColor);
headlineMetrics = new FontMetrics(headlineFont);
- this.runnableRectangle = new Rectangle(
- rectX,
- parentBounds.getY() + unitHeight,
- textWidth + (2 * unitHeight),
+ runnableRectangle = new Rectangle(
+ rectX,
+ parentBounds.getY() + unitHeight,
+ textWidth + (2 * unitHeight),
2 * unitHeight);
gc.fillRect(
- rectX,
- parentBounds.getY() + unitHeight,
- textWidth + (2 * unitHeight),
+ rectX,
+ parentBounds.getY() + unitHeight,
+ textWidth + (2 * unitHeight),
2 * unitHeight);
- gc.setFill(this.runnableHeaderFontFill);
+ gc.setFill(runnableHeaderFontFill);
gc.fillText(
- this.runnable.getName(),
- runnableX,
+ runnable.getName(),
+ runnableX,
parentBounds.getY() + (unitHeight / 2) + (2 * unitHeight) - ((unitHeight - headlineMetrics.lineHeight) / 2) - headlineMetrics.descent);
-
+
gc.setFont(labelAccessFont);
- gc.setStroke(this.runnableStroke);
+ gc.setStroke(runnableStroke);
labelAccessMetrics = new FontMetrics(gc.getFont());
// draw read access
double yStart = parentBounds.getY() + 4 * unitHeight;
double readX = rectX - (unitHeight / 2);
- for (LabelAccess item : this.readItems) {
+ for (LabelAccess item : readItems) {
gc.setFill(Color.WHITE);
gc.fillRoundRect(
- readX,
- yStart,
- unitHeight,
- unitHeight,
- 10,
+ readX,
+ yStart,
+ unitHeight,
+ unitHeight,
+ 10,
10);
gc.strokeRoundRect(
- readX,
- yStart,
- unitHeight,
- unitHeight,
- 10,
+ readX,
+ yStart,
+ unitHeight,
+ unitHeight,
+ 10,
10);
-
- this.readAccessRectangles.put(item.getData(), new Rectangle(
- readX,
- yStart,
- unitHeight,
+
+ readAccessRectangles.put(item.getData(), new Rectangle(
+ readX,
+ yStart,
+ unitHeight,
unitHeight));
-
- gc.setFill(this.labelFontFill);
- String name = item.getData().getDisplayName() != null ? item.getData().getDisplayName() : item.getData().getName();
+
+ gc.setFill(labelFontFill);
+ String name = item.getData().getDisplayName() != null ? item.getData().getDisplayName() : item.getData().getName();
gc.fillText(
- name,
- readX - labelAccessMetrics.computeStringWidth(name) - (unitHeight / 2),
+ name,
+ readX - labelAccessMetrics.computeStringWidth(name) - (unitHeight / 2),
yStart + unitHeight - ((unitHeight - labelAccessMetrics.lineHeight) / 2) - labelAccessMetrics.descent);
-
+
yStart += (2 * unitHeight);
}
// draw write access
yStart = parentBounds.getY() + 4 * unitHeight;
double writeX = rectX + textWidth + (2 * unitHeight) - (unitHeight / 2);
- for (LabelAccess item : this.writeItems) {
+ for (LabelAccess item : writeItems) {
gc.setFill(Color.WHITE);
gc.fillRoundRect(
- writeX,
- yStart,
- unitHeight,
- unitHeight,
- 10,
+ writeX,
+ yStart,
+ unitHeight,
+ unitHeight,
+ 10,
10);
gc.strokeRoundRect(
- writeX,
- yStart,
- unitHeight,
- unitHeight,
- 10,
+ writeX,
+ yStart,
+ unitHeight,
+ unitHeight,
+ 10,
10);
-
- this.writeAccessRectangles.put(item.getData(), new Rectangle(
- writeX,
- yStart,
- unitHeight,
+
+ writeAccessRectangles.put(item.getData(), new Rectangle(
+ writeX,
+ yStart,
+ unitHeight,
unitHeight));
- gc.setFill(this.labelFontFill);
- String name = item.getData().getDisplayName() != null ? item.getData().getDisplayName() : item.getData().getName();
+ gc.setFill(labelFontFill);
+ String name = item.getData().getDisplayName() != null ? item.getData().getDisplayName() : item.getData().getName();
gc.fillText(
- name,
- writeX + unitHeight + (unitHeight / 2),
+ name,
+ writeX + unitHeight + (unitHeight / 2),
yStart + unitHeight - ((unitHeight - labelAccessMetrics.lineHeight) / 2) - labelAccessMetrics.descent);
-
+
yStart += (2 * unitHeight);
}
}
-
+
/**
- *
+ *
* @return The {@link Runnable} that this painter is assigned to.
*/
public Runnable getRunnable() {
- return this.runnable;
+ return runnable;
}
-
+
/**
* Get the {@link Rectangle} for the read label access of the given label.
* <p>
* <b>Note: </b> The {@link Rectangle} is only available AFTER
* {@link #paint(GraphicsContext, Rectangle)} was executed.
* </p>
- *
+ *
* @param label The label for which the {@link Rectangle} is requested.
* @return The {@link Rectangle} for the read label access of the given label,
* or <code>null</code> if no {@link Rectangle} is available.
*/
public Rectangle getReadRectangle(Label label) {
- return this.readAccessRectangles.get(label);
+ return readAccessRectangles.get(label);
}
-
+
/**
* Get the {@link Rectangle}s for the read label access of this painters
* {@link Runnable}.
@@ -344,29 +344,29 @@
* <b>Note: </b> The {@link Rectangle}s are only available AFTER
* {@link #paint(GraphicsContext, Rectangle)} was executed.
* </p>
- *
+ *
* @return The {@link Label} to {@link Rectangle} mapping for the read label
* access of this painters {@link Runnable}.
*/
public Map<Label, Rectangle> getReadRectangles() {
- return this.readAccessRectangles;
+ return readAccessRectangles;
}
-
+
/**
* Get the {@link Rectangle} for the write label access of the given label.
* <p>
* <b>Note: </b> The {@link Rectangle} is only available AFTER
* {@link #paint(GraphicsContext, Rectangle)} was executed.
* </p>
- *
+ *
* @param label The label for which the {@link Rectangle} is requested.
* @return The {@link Rectangle} for the write label access of the given label,
* or <code>null</code> if no {@link Rectangle} is available.
*/
public Rectangle getWriteRectangle(Label label) {
- return this.writeAccessRectangles.get(label);
+ return writeAccessRectangles.get(label);
}
-
+
/**
* Get the {@link Rectangle}s for the write label access of this painters
* {@link Runnable}.
@@ -374,14 +374,14 @@
* <b>Note: </b> The {@link Rectangle}s are only available AFTER
* {@link #paint(GraphicsContext, Rectangle)} was executed.
* </p>
- *
+ *
* @return The {@link Label} to {@link Rectangle} mapping for the write label
* access of this painters {@link Runnable}.
*/
public Map<Label, Rectangle> getWriteRectangles() {
- return this.writeAccessRectangles;
+ return writeAccessRectangles;
}
-
+
/**
* Get the {@link Rectangle}s for the runnable header of this painters
* {@link Runnable}.
@@ -389,96 +389,96 @@
* <b>Note: </b> The {@link Rectangle} is only available AFTER
* {@link #paint(GraphicsContext, Rectangle)} was executed.
* </p>
- *
+ *
* @return The {@link Rectangle} for the runnable header of this painters
* {@link Runnable}.
*/
public Rectangle getRunnableRectangle() {
- return this.runnableRectangle;
+ return runnableRectangle;
}
-
+
/**
- *
+ *
* @param fill The color that should be used to fill the runnable rectangle.
*/
public void setRunnableHeaderFill(Color fill) {
- this.runnableHeaderFillColor = fill;
+ runnableHeaderFillColor = fill;
}
-
+
/**
- *
+ *
* @param fill The color that should be used to fill the runnable body
* rectangle. Setting it to <code>null</code> will result in a
* transparent body.
*/
public void setRunnableBodyFill(Color fill) {
- this.runnableBodyFillColor = fill;
+ runnableBodyFillColor = fill;
}
-
+
/**
- *
+ *
* @param stroke The color that should be used for the border of the rectangle.
*/
public void setRunnableStroke(Color stroke) {
- this.runnableStroke = stroke;
+ runnableStroke = stroke;
}
/**
- *
+ *
* @param fill The color that should be used for the runnable header text.
*/
public void setRunnableHeaderFontFill(Color fill) {
- this.runnableHeaderFontFill = fill;
+ runnableHeaderFontFill = fill;
}
/**
- *
+ *
* @param fill The color that should be used for the label access labels.
*/
public void setLabelFontFill(Color fill) {
- this.labelFontFill = fill;
+ labelFontFill = fill;
}
/**
* Set the color for the runnable. This includes the rectangle border, the label
* access labels and the header background.
- *
+ *
* @param color The color to set.
*/
public void setRunnableColor(Color color) {
- this.runnableStroke = color;
- this.runnableHeaderFillColor = color;
- this.labelFontFill = color;
+ runnableStroke = color;
+ runnableHeaderFillColor = color;
+ labelFontFill = color;
}
-
+
/**
- *
+ *
* @return The scaling factor applied to the rendering of this painter.
*/
public double getScaleFactor() {
- return this.scaleFactor;
+ return scaleFactor;
}
-
+
/**
- *
+ *
* @param scaleFactor The scaling factor that should be applied to the rendering of this painter.
*/
public void setScaleFactor(double scaleFactor) {
- if (scaleFactor <= this.maxScaleFactor && scaleFactor >= 0.1) {
+ if (scaleFactor <= maxScaleFactor && scaleFactor >= 0.1) {
this.scaleFactor = scaleFactor;
}
}
-
+
/**
- *
+ *
* @return The maximum supported scale factor.
*/
public double getMaxScaleFactor() {
- return this.maxScaleFactor;
+ return maxScaleFactor;
}
-
+
/**
- *
+ *
* @param maxScaleFactor The maximum supported scale factor.
*/
public void setMaxScaleFactor(double maxScaleFactor) {
@@ -487,29 +487,29 @@
if (this.maxScaleFactor < 0.1) {
this.maxScaleFactor = 0.1d;
}
- if (this.maxScaleFactor < this.scaleFactor) {
- this.scaleFactor = this.maxScaleFactor;
+ if (this.maxScaleFactor < scaleFactor) {
+ scaleFactor = this.maxScaleFactor;
}
}
-
+
/**
* Increase the scaling factor to zoom in.
*/
public void zoomIn() {
- if (this.scaleFactor <= this.maxScaleFactor) {
- double newFactor = this.scaleFactor + 0.1d;
+ if (scaleFactor <= maxScaleFactor) {
+ double newFactor = scaleFactor + 0.1d;
newFactor = Math.round(newFactor * 10d) / 10d;
-
- this.scaleFactor = Math.min(this.maxScaleFactor, newFactor);
+
+ scaleFactor = Math.min(maxScaleFactor, newFactor);
}
}
-
+
/**
* Decrease the scaling factor to zoom out.
*/
public void zoomOut() {
- double newFactor = this.scaleFactor - 0.1d;
+ double newFactor = scaleFactor - 0.1d;
newFactor = Math.round(newFactor * 10d) / 10d;
- this.scaleFactor = Math.max(newFactor, 0.1d);
+ scaleFactor = Math.max(newFactor, 0.1d);
}
}
diff --git a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/EventChainImporter.java b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/EventChainImporter.java
index 1e149b2..86206c4 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/EventChainImporter.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/EventChainImporter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -31,10 +31,10 @@
import org.eclipse.jface.operation.IRunnableWithProgress;
public class EventChainImporter implements IRunnableWithProgress {
-
+
private final ATDBConnection con;
private final Amalthea model;
-
+
public EventChainImporter(final ATDBConnection con, final Amalthea model) {
this.con = con;
this.model = model;
@@ -42,35 +42,35 @@
@Override
public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
- if (this.model.getConstraintsModel() != null) {
- final List<AbstractEventChain> allECs = ConstraintsUtil.getAllAbstractEventChains(this.model.getConstraintsModel());
+ if (model.getConstraintsModel() != null) {
+ final List<AbstractEventChain> allECs = ConstraintsUtil.getAllAbstractEventChains(model.getConstraintsModel());
final int eventChainCount = allECs.size();
final SubMonitor subMon = SubMonitor.convert(progressMonitor, "Importing event chains from AMALTHEA...", eventChainCount);
try {
- this.con.executeBatchUpdate(atdbCon -> {
+ con.executeBatchUpdate(atdbCon -> {
for(final EntityProperty ep:EntityProperty.eventChainProperties) {
atdbCon.insertProperty(ep.camelName, ep.type);
}
-
+
// first add all ecs as entity, so that we can refer to them in the second step
for(final AbstractEventChain ec:allECs) {
final String eventChainName = ec.getName();
atdbCon.insertEventChain(eventChainName);
}
-
+
// second set all properties
for(final AbstractEventChain ec:allECs) {
final String eventChainName = ec.getName();
-
+
// items
final List<String> itemNames = ec.getItems().stream().map(EventChainItem::getEventChain)
.map(AbstractEventChain::getName).collect(Collectors.toList());
atdbCon.insertEntityRefsPropertyValue(eventChainName, EntityProperty.EC_ITEMS.camelName, itemNames);
-
+
// stimulus/response events
insertEventRefProp(atdbCon, eventChainName, EntityProperty.EC_STIMULUS.camelName, ec.getStimulus());
insertEventRefProp(atdbCon, eventChainName, EntityProperty.EC_RESPONSE.camelName, ec.getResponse());
-
+
// min items completed
if (ec.getItemType() == EventChainItemType.PARALLEL && ec.getMinItemsCompleted() > 0) {
atdbCon.insertPropertyValue(eventChainName, EntityProperty.EC_MIN_ITEMS_COMPLETED.camelName, ec.getMinItemsCompleted());
@@ -84,7 +84,7 @@
subMon.done();
}
}
-
+
private static void insertEventRefProp(final ATDBConnection atdbCon, final String eventChainName, final String propertyName,
final Event ev) throws SQLException{
final String eventName = ev.getName();
diff --git a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/EventChainMetricCalculator.java b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/EventChainMetricCalculator.java
index a17e854..5d02f3a 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/EventChainMetricCalculator.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/EventChainMetricCalculator.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -32,9 +32,9 @@
import org.osgi.framework.FrameworkUtil;
public class EventChainMetricCalculator implements IRunnableWithProgress {
-
+
private final ATDBConnection con;
-
+
public EventChainMetricCalculator(final ATDBConnection con) {
this.con = con;
}
@@ -42,18 +42,18 @@
@Override
public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
final SubMonitor subMon = SubMonitor.convert(progressMonitor, "Calculating event chain metrics...", 3);
- try (final Statement mStmt = this.con.createStatement()) {
+ try (final Statement mStmt = con.createStatement()) {
// create event chain instances with separate sql program (a sequence of queries)
- String ecInstCalculationSQL = "";
+ String ecInstCalculationSQL;
final Bundle bundle = FrameworkUtil.getBundle(EventChainMetricCalculator.class);
final String pathInBundle = EventChainMetricCalculator.class.getPackage().getName().replace('.', '/') + "/ecinststatements.sql";
final URL fileURL = bundle.getResource(pathInBundle);
ecInstCalculationSQL = loadStringFromFile(fileURL);
if (ecInstCalculationSQL.length() == 0) return;
- this.con.executeUpdate(ecInstCalculationSQL);
+ con.executeUpdate(ecInstCalculationSQL);
subMon.worked(1);
-
- this.con.executeBatchUpdate(atdbCon -> {
+
+ con.executeBatchUpdate(atdbCon -> {
// calculate event chain metrics min max avg for age and reaction latency values
final List<String> latencyTypes = Arrays.asList("Age", "Reaction");
for (final String latencyType : latencyTypes) {
@@ -75,14 +75,14 @@
}
});
subMon.worked(1);
-
- this.con.executeBatchStatements(mStmt);
+
+ con.executeBatchStatements(mStmt);
subMon.worked(1);
} catch (SQLException e) {
throw new InvocationTargetException(e);
}
}
-
+
private static String loadStringFromFile(final URL fileURL) {
try (final InputStream fileIS = fileURL.openStream();
final ByteArrayOutputStream bAOS = new ByteArrayOutputStream();) {
diff --git a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/EventImporter.java b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/EventImporter.java
index 9d0340d..78c802e 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/EventImporter.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/EventImporter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -33,10 +33,10 @@
import org.eclipse.jface.operation.IRunnableWithProgress;
public class EventImporter implements IRunnableWithProgress {
-
+
private final ATDBConnection con;
private final Amalthea model;
-
+
public EventImporter(final ATDBConnection con, final Amalthea model) {
this.con = con;
this.model = model;
@@ -44,31 +44,31 @@
@Override
public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
- if (this.model.getEventModel() != null) {
- final int eventCount = this.model.getEventModel().getEvents().size();
+ if (model.getEventModel() != null) {
+ final int eventCount = model.getEventModel().getEvents().size();
final SubMonitor subMon = SubMonitor.convert(progressMonitor, "Importing events from AMALTHEA...", eventCount);
try {
- this.con.executeBatchUpdate(atdbCon -> {
- final List<Event> events = this.model.getEventModel().getEvents();
+ con.executeBatchUpdate(atdbCon -> {
+ final List<Event> events = model.getEventModel().getEvents();
for(final Event event:events) {
// ignore event sets for now
if (event instanceof EventSet) continue;
-
+
final String eventName = event.getName();
final Optional<String> optEventTypeName = getEventTypeName(event);
if (optEventTypeName.isPresent()) {
atdbCon.insertEventType(optEventTypeName.get());
}
final String eventTypeName = optEventTypeName.orElse("");
-
+
final Optional<String> optEntityName = getEntityName(event);
if (optEntityName.isPresent()) {
atdbCon.insertEntity(optEntityName.get(), "");
}
final String entityName = optEntityName.orElse("");
-
+
final String sourceEntityName = getSourceEntityName(event).orElse("");
-
+
atdbCon.insertEvent(eventName, eventTypeName, entityName, sourceEntityName);
subMon.worked(1);
}
@@ -79,22 +79,22 @@
subMon.done();
}
}
-
+
public static Optional<String> getEventTypeName(final Event event) {
return Stream.of("eventType").map(p -> getPropertyValue(event, p)).filter(Objects::nonNull)
.map(p -> p instanceof Enumerator ? ((Enumerator)p).getName() : p.toString()).findFirst();
}
-
+
public static Optional<String> getEntityName(final Event event) {
return Stream.of("entity").map(p -> getPropertyValue(event, p)).filter(Objects::nonNull)
.map(p -> p instanceof INamed ? ((INamed)p).getName() : p.toString()).findFirst();
}
-
+
public static Optional<String> getSourceEntityName(final Event event) {
return Stream.of("runnable", "process", "core").map(p -> getPropertyValue(event, p)).filter(Objects::nonNull)
.map(p -> p instanceof INamed ? ((INamed)p).getName() : p.toString()).findFirst();
}
-
+
private static Object getPropertyValue(final EObject eo, final String propertyName) {
if (eo == null || propertyName == null || eo.eClass() == null) {
return null;
diff --git a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/ImportTransformation.java b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/ImportTransformation.java
index 3a3702b..6c9e5f8 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/ImportTransformation.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/ImportTransformation.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -30,12 +30,12 @@
import com.google.common.io.Files;
public class ImportTransformation implements IRunnableWithProgress {
-
+
private final String amxmiSource;
private final String atdbSource;
private final String atdbFile;
private final boolean copySource;
-
+
public ImportTransformation(final String amxmiSource, final String atdbSource, final String atdbFile, final boolean copySource) {
this.amxmiSource = amxmiSource;
this.atdbSource = atdbSource;
@@ -45,43 +45,43 @@
@Override
public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
- if (this.amxmiSource.isEmpty() || this.atdbFile.isEmpty()) {
+ if (amxmiSource.isEmpty() || atdbFile.isEmpty()) {
return;
}
final SubMonitor subMon = SubMonitor.convert(progressMonitor, "Inserting AMALTHEA model specification parts to ATDB...", 4);
// copy atdb source if not empty
- if (this.copySource && !this.atdbSource.isEmpty() && !this.atdbSource.equals(this.atdbFile)) {
+ if (copySource && !atdbSource.isEmpty() && !atdbSource.equals(atdbFile)) {
try {
- Files.copy(new File(this.atdbSource), new File(this.atdbFile));
+ Files.copy(new File(atdbSource), new File(atdbFile));
} catch (IOException e) {
throw new InvocationTargetException(e);
}
}
final SubMonitor openAMXMI_ATDBMonitor = subMon.split(1);
openAMXMI_ATDBMonitor.beginTask("Opening AMXMI and ATDB files...", 1);
- try (final ATDBConnection con = new ATDBConnection(this.atdbFile, AccessMode.ReadWrite)) {
- final Amalthea model = AmaltheaLoader.loadFromFileNamed(this.amxmiSource);
-
+ try (final ATDBConnection con = new ATDBConnection(atdbFile, AccessMode.ReadWrite)) {
+ final Amalthea model = AmaltheaLoader.loadFromFileNamed(amxmiSource);
+
// ensure that we have a minimal data base
new ATDBBuilder(con).createBasicDBStructure().createBasicViews();
-
+
// import events
final SubMonitor eventImportMonitor = subMon.split(1);
final EventImporter eventImporter = new EventImporter(con, model);
eventImporter.run(eventImportMonitor);
-
+
// import event chains
final SubMonitor ecImportMonitor = subMon.split(1);
final EventChainImporter ecImporter = new EventChainImporter(con, model);
ecImporter.run(ecImportMonitor);
-
+
// calculate event chain instances and metrics
final SubMonitor ecInstMetricMonitor = subMon.split(1);
if (con.tableExists("traceEvent")) {
final EventChainMetricCalculator ecmc = new EventChainMetricCalculator(con);
ecmc.run(ecInstMetricMonitor);
}
-
+
} catch (SQLException e) {
throw new InvocationTargetException(e);
} finally {
diff --git a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/handler/AMXMI2ATDBImport.java b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/handler/AMXMI2ATDBImport.java
index 3ed1d25..224a9ce 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/handler/AMXMI2ATDBImport.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/handler/AMXMI2ATDBImport.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -43,14 +43,11 @@
final String name = amxmiSource.substring(from + 1, to);
return c.getProject().getFile(name + ".atdb");
}).findFirst().orElseThrow(() -> new IllegalArgumentException("Selected *.amxmi file is not part of a Eclipse workspace!"));
- if (amxmiSource.length() == 0 || atdbSource.length() == 0) {
+ if (amxmiSource.length() == 0 || atdbSource.length() == 0 || (runnableContext == null)) {
return;
}
- if (runnableContext == null) {
- return;
- }
-
+
ImportWizard.importAndOpenInIDE(amxmiSource, atdbSource, atdbTarget, true, runnableContext);
}
-
+
}
diff --git a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/handler/AmaltheaModelAndATDBElementExpression.java b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/handler/AmaltheaModelAndATDBElementExpression.java
index de9ab92..32ba540 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/handler/AmaltheaModelAndATDBElementExpression.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/handler/AmaltheaModelAndATDBElementExpression.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -24,7 +24,7 @@
import org.eclipse.jface.viewers.IStructuredSelection;
public class AmaltheaModelAndATDBElementExpression {
-
+
@Evaluate
public boolean evaluate(@Optional @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection) {
if (selection != null && selection.size() == 2) {
diff --git a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/wizard/ImportPage.java b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/wizard/ImportPage.java
index b6e4758..b027b32 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/wizard/ImportPage.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/wizard/ImportPage.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Timing-Architects Embedded Systems GmbH - initial API and implementation
********************************************************************************
@@ -68,11 +68,11 @@
amxmiGroupLabel.setFont(parent.getFont());
// amxmi name entry field
- this.amxmiNameField = new Text(sourceContainerGroup, SWT.READ_ONLY | SWT.BORDER);
+ amxmiNameField = new Text(sourceContainerGroup, SWT.READ_ONLY | SWT.BORDER);
final GridData amxmiData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
amxmiData.widthHint = SIZING_TEXT_FIELD_WIDTH;
- this.amxmiNameField.setLayoutData(amxmiData);
- this.amxmiNameField.setFont(parent.getFont());
+ amxmiNameField.setLayoutData(amxmiData);
+ amxmiNameField.setFont(parent.getFont());
// amxmi browse button
final Button amxmiBrowseButton = new Button(sourceContainerGroup, SWT.PUSH);
@@ -87,43 +87,43 @@
amxmiBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
amxmiBrowseButton.setFont(parent.getFont());
setButtonLayoutData(amxmiBrowseButton);
-
+
// atdb label
- this.atdbGroupLabel = new Label(sourceContainerGroup, SWT.NONE);
- this.atdbGroupLabel.setText(Messages.ImportPage_fromATDB);
- this.atdbGroupLabel.setFont(parent.getFont());
- this.atdbGroupLabel.setEnabled(false);
+ atdbGroupLabel = new Label(sourceContainerGroup, SWT.NONE);
+ atdbGroupLabel.setText(Messages.ImportPage_fromATDB);
+ atdbGroupLabel.setFont(parent.getFont());
+ atdbGroupLabel.setEnabled(false);
// atdb name entry field
- this.atdbNameField = new Text(sourceContainerGroup, SWT.READ_ONLY | SWT.BORDER);
+ atdbNameField = new Text(sourceContainerGroup, SWT.READ_ONLY | SWT.BORDER);
final GridData atdbData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
atdbData.widthHint = SIZING_TEXT_FIELD_WIDTH;
- this.atdbNameField.setLayoutData(atdbData);
- this.atdbNameField.setFont(parent.getFont());
- this.atdbNameField.setEnabled(false);
+ atdbNameField.setLayoutData(atdbData);
+ atdbNameField.setFont(parent.getFont());
+ atdbNameField.setEnabled(false);
// atdb browse button
- this.atdbBrowseButton = new Button(sourceContainerGroup, SWT.PUSH);
- this.atdbBrowseButton.setText(IDEWorkbenchMessages.WizardImportPage_browse2);
- this.atdbBrowseButton.addSelectionListener(new SelectionAdapter() {
+ atdbBrowseButton = new Button(sourceContainerGroup, SWT.PUSH);
+ atdbBrowseButton.setText(IDEWorkbenchMessages.WizardImportPage_browse2);
+ atdbBrowseButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(final SelectionEvent e) {
selectATDBFile();
update();
}
});
- this.atdbBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- this.atdbBrowseButton.setFont(parent.getFont());
- this.atdbBrowseButton.setEnabled(false);
- setButtonLayoutData(this.atdbBrowseButton);
+ atdbBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+ atdbBrowseButton.setFont(parent.getFont());
+ atdbBrowseButton.setEnabled(false);
+ setButtonLayoutData(atdbBrowseButton);
}
-
+
@Override
protected void createOptionsGroupButtons(Group optionsGroup) {
- this.updateExistingATDBFile = new Button(optionsGroup, SWT.CHECK);
- this.updateExistingATDBFile.setFont(optionsGroup.getFont());
- this.updateExistingATDBFile.setText(Messages.ImportPage_optionUpdateATDB);
- this.updateExistingATDBFile.addSelectionListener(new SelectionAdapter() {
+ updateExistingATDBFile = new Button(optionsGroup, SWT.CHECK);
+ updateExistingATDBFile.setFont(optionsGroup.getFont());
+ updateExistingATDBFile.setText(Messages.ImportPage_optionUpdateATDB);
+ updateExistingATDBFile.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
super.widgetSelected(e);
@@ -146,12 +146,12 @@
protected boolean determinePageCompletion() {
boolean result = super.determinePageCompletion();
- final String amxmiPath = this.amxmiNameField.getText();
+ final String amxmiPath = amxmiNameField.getText();
final File amxmiFile = new File(amxmiPath);
result &= amxmiFile.exists();
-
- if (this.updateExistingATDBFile != null && this.updateExistingATDBFile.getSelection()) {
- final String atdbPath = this.atdbNameField.getText();
+
+ if (updateExistingATDBFile != null && updateExistingATDBFile.getSelection()) {
+ final String atdbPath = atdbNameField.getText();
final File atdbFile = new File(atdbPath);
result &= atdbFile.exists();
}
@@ -165,43 +165,43 @@
fileDialog.setFilterExtensions(new String[] { "*.amxmi" }); //$NON-NLS-1$
final String open = fileDialog.open();
if (open != null) {
- this.amxmiNameField.setText(open);
+ amxmiNameField.setText(open);
update();
}
}
-
+
private void selectATDBFile() {
final FileDialog fileDialog = new FileDialog(getShell(), SWT.OPEN);
fileDialog.setText(Messages.ImportPage_selectFile);
fileDialog.setFilterExtensions(new String[] { "*.atdb" }); //$NON-NLS-1$
final String open = fileDialog.open();
if (open != null) {
- this.atdbNameField.setText(open);
+ atdbNameField.setText(open);
update();
}
}
private void update() {
setPageComplete(determinePageCompletion());
- this.atdbGroupLabel.setEnabled(this.updateExistingATDBFile.getSelection());
- this.atdbBrowseButton.setEnabled(this.updateExistingATDBFile.getSelection());
- this.atdbNameField.setEnabled(this.updateExistingATDBFile.getSelection());
+ atdbGroupLabel.setEnabled(updateExistingATDBFile.getSelection());
+ atdbBrowseButton.setEnabled(updateExistingATDBFile.getSelection());
+ atdbNameField.setEnabled(updateExistingATDBFile.getSelection());
}
String getAMXMISource() {
- return this.amxmiNameField.getText();
+ return amxmiNameField.getText();
}
-
+
String getATDBSource() {
- return this.atdbNameField.getText();
+ return atdbNameField.getText();
}
IContainer getTargetContainer() {
return getSpecifiedContainer();
}
-
+
boolean isUpdateExistingATDB() {
- return this.updateExistingATDBFile.getSelection();
+ return updateExistingATDBFile.getSelection();
}
}
diff --git a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/wizard/ImportWizard.java b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/wizard/ImportWizard.java
index 7d454f0..bebbefb 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/wizard/ImportWizard.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/wizard/ImportWizard.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Timing-Architects Embedded Systems GmbH - initial API and implementation
********************************************************************************
@@ -23,6 +23,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.operation.IRunnableContext;
@@ -47,8 +48,8 @@
@Override
public void addPages() {
super.addPages();
- this.mainPage = new ImportPage(this.selection);
- addPage(this.mainPage);
+ mainPage = new ImportPage(selection);
+ addPage(mainPage);
}
@Override
@@ -66,16 +67,16 @@
@Override
public boolean performFinish() {
- final String amxmiSource = this.mainPage.getAMXMISource();
- final String atdbSource = this.mainPage.getATDBSource();
+ final String amxmiSource = mainPage.getAMXMISource();
+ final String atdbSource = mainPage.getATDBSource();
// get the file name of the amxmi
final int from = Math.max(amxmiSource.lastIndexOf('/'), amxmiSource.lastIndexOf('\\'));
final int to = amxmiSource.lastIndexOf(".amxmi"); //$NON-NLS-1$
final String name = amxmiSource.substring(from + 1, to);
- final IFile targetATDB = this.mainPage.getTargetContainer().getFile(this.mainPage.getTargetContainer().getLocation().append(name).addFileExtension("atdb"));
- return importAndOpenInIDE(amxmiSource, atdbSource, targetATDB, this.mainPage.isUpdateExistingATDB(), getContainer());
+ final IFile targetATDB = mainPage.getTargetContainer().getFile(mainPage.getTargetContainer().getLocation().append(name).addFileExtension("atdb"));
+ return importAndOpenInIDE(amxmiSource, atdbSource, targetATDB, mainPage.isUpdateExistingATDB(), getContainer());
}
-
+
public static boolean importAndOpenInIDE(final String amxmiSource, final String atdbSource, final IFile atdbTarget, final boolean copySource,
final IRunnableContext runnableContext) {
@@ -94,7 +95,7 @@
try {
runnableContext.run(true, true, operation);
} catch (InvocationTargetException e1) {
- Platform.getLog(AMXMI2ATDBImport.class).log(new Status(Status.ERROR,
+ Platform.getLog(AMXMI2ATDBImport.class).log(new Status(IStatus.ERROR,
FrameworkUtil.getBundle(AMXMI2ATDBImport.class).getSymbolicName(), e1.getLocalizedMessage(), e1));
return false;
} catch (InterruptedException e2) {
@@ -108,12 +109,12 @@
IDE.openEditor(page, atdbTarget);
}
catch (final PartInitException e) {
- Platform.getLog(AMXMI2ATDBImport.class).log(new Status(Status.ERROR,
+ Platform.getLog(AMXMI2ATDBImport.class).log(new Status(IStatus.ERROR,
FrameworkUtil.getBundle(AMXMI2ATDBImport.class).getSymbolicName(), e.getLocalizedMessage(), e));
return false;
}
return true;
}
-
+
}
diff --git a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/wizard/Messages.java b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/wizard/Messages.java
index 2ef8dab..63813a5 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/wizard/Messages.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.amalthea/src/org/eclipse/app4mc/atdb/_import/amalthea/wizard/Messages.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/ATDBMetricCalculator.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/ATDBMetricCalculator.java
index b6a7c02..5c7d503 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/ATDBMetricCalculator.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/ATDBMetricCalculator.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -30,9 +30,9 @@
import org.eclipse.jface.operation.IRunnableWithProgress;
public class ATDBMetricCalculator implements IRunnableWithProgress {
-
+
private final ATDBConnection con;
-
+
public ATDBMetricCalculator(final ATDBConnection con) {
this.con = con;
}
@@ -43,7 +43,7 @@
try {
// for each state: add a '[state]Time' metric signifying how long the entity instance was in that state
for (final BTFEntityState state : BTFEntityState.actStates) {
- this.con.executeBatchUpdate(atdbCon -> {
+ con.executeBatchUpdate(atdbCon -> {
for (final Entry<BTFEntityType, Entry<List<Enum<?>>, List<Enum<?>>>> et2io:state.entityType2InOutEvents.entrySet()) {
final BTFEntityType entityType = et2io.getKey();
// map and collect events as SQL list
@@ -58,7 +58,7 @@
progressMonitor.worked(1);
}
- this.con.executeBatchUpdate(atdbCon -> {
+ con.executeBatchUpdate(atdbCon -> {
// consider combi states for processes
for (final BTFCombiState cState : BTFCombiState.values()) {
final List<String> relevantStates = cState.getStates().stream().map(s -> s + "Time").collect(Collectors.toList());
@@ -67,7 +67,7 @@
});
progressMonitor.worked(1);
- this.con.executeBatchUpdate(atdbCon -> {
+ con.executeBatchUpdate(atdbCon -> {
// calculate inter-instance metrics
for (final BTFInterInstanceMetric metric : BTFInterInstanceMetric.values()) {
for (final Entry<BTFEntityType, Entry<Enumerator, Enumerator>> et2fs:metric.entityType2FirstAndSecond.entrySet()) {
@@ -81,7 +81,7 @@
});
progressMonitor.worked(1);
- this.con.executeBatchUpdate(atdbCon -> {
+ con.executeBatchUpdate(atdbCon -> {
// calculate stimuli activate2activate distances
final String activateEvent = BTFInterInstanceMetric.activateToActivate.entityType2FirstAndSecond
.entrySet().iterator().next().getValue().getKey().toString();
@@ -90,13 +90,13 @@
});
progressMonitor.worked(1);
- this.con.executeBatchUpdate(atdbCon -> {
+ con.executeBatchUpdate(atdbCon -> {
// calculate entity metrics min max avg for all time metric values
atdbCon.insertAggregatedEntityInstanceMetricsForDimension("time");
});
progressMonitor.worked(1);
- this.con.executeBatchUpdate(atdbCon -> {
+ con.executeBatchUpdate(atdbCon -> {
// insert entity specific count metrics
for (final BTFCountMetric cm : BTFCountMetric.values()) {
atdbCon.insertMetric(cm.toString(), "count");
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/BTFImporter.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/BTFImporter.java
index 1612ac6..3d90019 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/BTFImporter.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/BTFImporter.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -60,9 +60,9 @@
this.btfFile = btfFile;
final long maxMemory = Runtime.getRuntime().maxMemory();
if (maxMemory < Long.MAX_VALUE) {
- this.maxBatchSize = maxMemory >> 16;
+ maxBatchSize = maxMemory >> 16;
} else {
- this.maxBatchSize = 2 << 16;
+ maxBatchSize = 2 << 16;
}
}
@@ -72,14 +72,14 @@
final SubMonitor readingBTFMonitor = subMon.split(1, SubMonitor.SUPPRESS_NONE);
readingBTFMonitor.beginTask("Reading BTF file...", 10_000);
int readingBTFProgress = 0;
- try (final FileInputStream fis = new FileInputStream(this.btfFile);
+ try (final FileInputStream fis = new FileInputStream(btfFile);
final Scanner sc = new Scanner(fis, "UTF-8");
- final Statement propStmt = this.con.createStatement()) {
+ final Statement propStmt = con.createStatement()) {
- final PreparedStatement updEntStmt = this.con.getPreparedStatementFor("UPDATE entity SET entityTypeId = ? WHERE name = ?;");
- final PreparedStatement instStmt = this.con.getPreparedStatementFor("INSERT INTO entityInstance VALUES(?, ?);");
- final PreparedStatement evStmt = this.con.getPreparedStatementFor("INSERT INTO traceEvent VALUES(?, ?, ?, ?, ?, ?, ?, ?)");
- final long fileSize = new File(this.btfFile).length();
+ final PreparedStatement updEntStmt = con.getPreparedStatementFor("UPDATE entity SET entityTypeId = ? WHERE name = ?;");
+ final PreparedStatement instStmt = con.getPreparedStatementFor("INSERT INTO entityInstance VALUES(?, ?);");
+ final PreparedStatement evStmt = con.getPreparedStatementFor("INSERT INTO traceEvent VALUES(?, ?, ?, ?, ?, ?, ?, ?)");
+ final long fileSize = new File(btfFile).length();
long currentTimestamp = Long.MIN_VALUE;
int currentSQCNR = 0;
String currentECU = "";
@@ -212,17 +212,17 @@
appendToProperty(rName, WRITTEN_SIGNALS, ENTITY_ID_REF, entityName);
}
}
- final List<Object> parameters = Arrays.asList(currentTimestamp, currentSQCNR, this.entityName2Id.get(entityName),
- entityInstance, this.entityName2Id.get(sourceName), sourceInstance, this.eventTypeName2Id.get(eventType), null);
+ final List<Object> parameters = Arrays.asList(currentTimestamp, currentSQCNR, entityName2Id.get(entityName),
+ entityInstance, entityName2Id.get(sourceName), sourceInstance, eventTypeName2Id.get(eventType), null);
if (value.isPresent()) {
parameters.set(parameters.size()-1, value.get());
}
- this.con.setPreparedParameters(evStmt, parameters);
+ con.setPreparedParameters(evStmt, parameters);
evStmt.addBatch();
}
} else {
if (line.toLowerCase().startsWith("#timescale")) {
- this.con.insertMetaInformation("timeBase", line.substring(11));
+ con.insertMetaInformation("timeBase", line.substring(11));
} else if (line.startsWith("#simulation_duration")) {
setProperty("SIM", "simulationDuration", "time", line.substring(21, line.lastIndexOf(' ')));
}
@@ -239,8 +239,8 @@
readingBTFProgress = worked;
}
}
- if (currentBatchSize > this.maxBatchSize) {
- this.con.executeBatchStatements(instStmt, evStmt);
+ if (currentBatchSize > maxBatchSize) {
+ con.executeBatchStatements(instStmt, evStmt);
currentBatchSize = 0;
}
}
@@ -249,7 +249,7 @@
executePropertyInsertStatements(propStmt);
readingBTFMonitor.done();
- this.con.executeBatchStatements(updEntStmt, instStmt, evStmt, propStmt);
+ con.executeBatchStatements(updEntStmt, instStmt, evStmt, propStmt);
} catch (final IOException | SQLException e) {
throw new InvocationTargetException(e);
}
@@ -261,25 +261,25 @@
private final Map<String, Long> entityName2Id = new LinkedHashMap<>();
private void insertEntity(final String name, final String entityType) throws SQLException {
- if ((!entityType.isEmpty()) && this.entityTypes.add(entityType)) {
- final long entityTypeId = this.con.immediateInsertEntityType(entityType);
- this.entityTypeName2Id.put(entityType, entityTypeId);
+ if ((!entityType.isEmpty()) && entityTypes.add(entityType)) {
+ final long entityTypeId = con.immediateInsertEntityType(entityType);
+ entityTypeName2Id.put(entityType, entityTypeId);
}
- if (!this.entity2Type.containsKey(name)) {
- final long entityId = this.con.immediateInsertEntity(name, -1);
- this.entityName2Id.put(name, entityId);
+ if (!entity2Type.containsKey(name)) {
+ final long entityId = con.immediateInsertEntity(name, -1);
+ entityName2Id.put(name, entityId);
}
- this.entity2Type.compute(name, (k, v) -> ((v == null) || v.isEmpty()) ? entityType : v);
+ entity2Type.compute(name, (k, v) -> ((v == null) || v.isEmpty()) ? entityType : v);
}
private void updateEntityTypes(final PreparedStatement updEStmt) throws SQLException {
- for (final Entry<String, String> entry : this.entity2Type.entrySet()) {
+ for (final Entry<String, String> entry : entity2Type.entrySet()) {
if (entry.getValue() == null || entry.getValue().isEmpty()) {
continue;
}
final String entityName = entry.getKey();
- final long entityType = this.entityTypeName2Id.get(entry.getValue());
- this.con.setPreparedParameters(updEStmt, Arrays.asList(entityType, entityName));
+ final long entityType = entityTypeName2Id.get(entry.getValue());
+ con.setPreparedParameters(updEStmt, Arrays.asList(entityType, entityName));
updEStmt.addBatch();
}
}
@@ -289,7 +289,7 @@
private void insertEntityInstance(final PreparedStatement stmt, final String name, final int inst) throws SQLException {
final Set<Integer> instSet = instNames.computeIfAbsent(name, k -> new HashSet<>());
if (instSet.add(inst)) {
- this.con.setPreparedParameters(stmt, Arrays.asList(this.entityName2Id.get(name), inst));
+ con.setPreparedParameters(stmt, Arrays.asList(entityName2Id.get(name), inst));
stmt.addBatch();
}
}
@@ -298,9 +298,9 @@
private final Map<String, Long> eventTypeName2Id = new LinkedHashMap<>();
private void insertEventType(final String name) throws SQLException {
- if (this.eventTypes.add(name)) {
- final long eventTypeId = this.con.immediateInsertEventType(name);
- this.eventTypeName2Id.put(name, eventTypeId);
+ if (eventTypes.add(name)) {
+ final long eventTypeId = con.immediateInsertEventType(name);
+ eventTypeName2Id.put(name, eventTypeId);
}
}
@@ -320,8 +320,8 @@
private void setProperty(final String entityName, final String propertyName, final String propertyType,
final String propertyValue, final boolean append) {
- this.properties.putIfAbsent(propertyName, propertyType);
- final Map<String, List<String>> property2Value = this.entity2property2Value.computeIfAbsent(entityName, k -> new LinkedHashMap<>());
+ properties.putIfAbsent(propertyName, propertyType);
+ final Map<String, List<String>> property2Value = entity2property2Value.computeIfAbsent(entityName, k -> new LinkedHashMap<>());
final List<String> values = property2Value.computeIfAbsent(propertyName, k -> new ArrayList<>());
if (!append) {
values.clear();
@@ -331,11 +331,11 @@
private void executePropertyInsertStatements(final Statement stmt) throws SQLException {
final List<String> statements = new ArrayList<>();
- this.properties.forEach((propertyName, propertyType) -> statements.add("INSERT INTO property(name, type) VALUES('"//
+ properties.forEach((propertyName, propertyType) -> statements.add("INSERT INTO property(name, type) VALUES('"//
+ propertyName + "', '" + propertyType + "');"));
- this.entity2property2Value.forEach((entityName, property2Value) -> property2Value.forEach((propertyName, propertyValue) -> {
+ entity2property2Value.forEach((entityName, property2Value) -> property2Value.forEach((propertyName, propertyValue) -> {
final List<String> propertyValueStrings = new ArrayList<>();
- final String propertyType = this.properties.get(propertyName);
+ final String propertyType = properties.get(propertyName);
if (propertyType.endsWith("IdRef")) {
final String tableName = propertyType.substring(0, propertyType.lastIndexOf("IdRef"));
propertyValue.forEach(pv -> propertyValueStrings.add("(SELECT id FROM " + tableName + " WHERE name = '" + pv + "')"));
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/ImportTransformation.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/ImportTransformation.java
index 71e57f1..a8e1506 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/ImportTransformation.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/ImportTransformation.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Timing-Architects Embedded Systems GmbH - initial API and implementation
********************************************************************************
@@ -28,21 +28,21 @@
public class ImportTransformation implements IRunnableWithProgress {
-
+
private final String btfFile;
private final String atdbFile;
private final boolean calculateMetrics;
private final boolean persistTraceEvents;
private final boolean doInMemoryDBImport;
-
+
public ImportTransformation(final String source, final String target, final boolean calculateMetrics,
final boolean persistTraceEvents, final boolean doInMemoryDBImport) {
if (source.endsWith(".btf") && target.endsWith(".atdb")) {
- this.btfFile = source;
- this.atdbFile = target;
+ btfFile = source;
+ atdbFile = target;
} else {
- this.btfFile = "";
- this.atdbFile = "";
+ btfFile = "";
+ atdbFile = "";
}
this.calculateMetrics = calculateMetrics;
this.persistTraceEvents = persistTraceEvents;
@@ -51,21 +51,21 @@
@Override
public void run(final IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
- if (!this.btfFile.isEmpty() && !this.atdbFile.isEmpty()) {
+ if (!btfFile.isEmpty() && !atdbFile.isEmpty()) {
final SubMonitor subMon = SubMonitor.convert(progressMonitor, "Converting BTF trace to ATDB...", 100);
- AccessMode accessMode = this.doInMemoryDBImport ? AccessMode.ReadWriteInMemory : AccessMode.ReadWrite;
- try (final ATDBConnection con = new ATDBConnection(this.atdbFile, accessMode)) {
+ AccessMode accessMode = doInMemoryDBImport ? AccessMode.ReadWriteInMemory : AccessMode.ReadWrite;
+ try (final ATDBConnection con = new ATDBConnection(atdbFile, accessMode)) {
final SubMonitor createATDBMonitor = subMon.split(1, SubMonitor.SUPPRESS_NONE);
createATDBMonitor.beginTask("Creating empty ATDB...", 1);
final ATDBBuilder atdbBuilder = new ATDBBuilder(con).createBasicDBStructure().createBasicViews()
- .createOptionalAndTemporaryTables(BTFEntityType.literals, this.persistTraceEvents);
- if (this.persistTraceEvents)
+ .createOptionalAndTemporaryTables(BTFEntityType.literals, persistTraceEvents);
+ if (persistTraceEvents)
atdbBuilder.createOptionalViews(BTFEntityType.literals);
con.flushAllStatements();
createATDBMonitor.done();
-
- final SubMonitor btfImportMonitor = subMon.split(this.calculateMetrics ? 59 : 89, SubMonitor.SUPPRESS_NONE);
- final IRunnableWithProgress btfImporter = new BTFImporter(con, this.btfFile);
+
+ final SubMonitor btfImportMonitor = subMon.split(calculateMetrics ? 59 : 89, SubMonitor.SUPPRESS_NONE);
+ final IRunnableWithProgress btfImporter = new BTFImporter(con, btfFile);
btfImporter.run(btfImportMonitor);
con.flushAllStatements();
@@ -75,8 +75,8 @@
con.flushAllStatements();
writeIndicesMonitor.done();
btfImportMonitor.done();
-
- if (this.calculateMetrics) {
+
+ if (calculateMetrics) {
final SubMonitor metricCalcMonitor = subMon.split(30, SubMonitor.SUPPRESS_NONE);
calculateMetrics(metricCalcMonitor, con);
}
@@ -87,7 +87,7 @@
}
}
}
-
+
public static void calculateMetrics(final IProgressMonitor progressMonitor, final ATDBConnection con)
throws InvocationTargetException, InterruptedException, SQLException {
final ATDBBuilder atdbBuilder = new ATDBBuilder(con);
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/handler/ATDBElementExpression.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/handler/ATDBElementExpression.java
index 7362e43..3553f2a 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/handler/ATDBElementExpression.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/handler/ATDBElementExpression.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -24,7 +24,7 @@
import org.eclipse.jface.viewers.IStructuredSelection;
public class ATDBElementExpression {
-
+
@Evaluate
public boolean evaluate(@Optional @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection) {
if (selection != null && selection.size() == 1) {
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/handler/CalculateATDBMetrics.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/handler/CalculateATDBMetrics.java
index 28ee7b3..3517c76 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/handler/CalculateATDBMetrics.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/handler/CalculateATDBMetrics.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -25,6 +25,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.e4.core.di.annotations.Execute;
@@ -66,15 +67,15 @@
atdbSource.refreshLocal(1, progressMonitor);
}
};
-
+
try {
runnableContext.run(true, true, operation);
} catch (InvocationTargetException e1) {
- Platform.getLog(CalculateATDBMetrics.class).log(new Status(Status.ERROR,
+ Platform.getLog(CalculateATDBMetrics.class).log(new Status(IStatus.ERROR,
FrameworkUtil.getBundle(CalculateATDBMetrics.class).getSymbolicName(), e1.getLocalizedMessage(), e1));
} catch (InterruptedException e2) {
Thread.currentThread().interrupt();
}
}
-
+
}
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFCombiState.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFCombiState.java
index 393be08..43e70a5 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFCombiState.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFCombiState.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -23,8 +23,8 @@
private final EnumSet<BTFEntityState> states;
- private BTFCombiState(final BTFEntityState firstState, final BTFEntityState... otherStates) {
- this.states = EnumSet.of(firstState, otherStates);
+ BTFCombiState(final BTFEntityState firstState, final BTFEntityState... otherStates) {
+ states = EnumSet.of(firstState, otherStates);
}
public EnumSet<BTFEntityState> getStates() {
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFCountMetric.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFCountMetric.java
index a865f42..393aac6 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFCountMetric.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFCountMetric.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -29,13 +29,13 @@
public final Enum<?> eventToCount;
public final BTFEntityType entityType;
- private BTFCountMetric(final Enum<?> eventToCount) {
+ BTFCountMetric(final Enum<?> eventToCount) {
this.eventToCount = eventToCount;
String entityTypeName = eventToCount.getClass().getSimpleName();
entityTypeName = entityTypeName.substring(0, entityTypeName.indexOf("EventType")).toLowerCase();
- this.entityType = BTFEntityType.getForName(entityTypeName);
+ entityType = BTFEntityType.getForName(entityTypeName);
}
-
+
public static List<Enum<?>> getInvolvedBTFEventsForEntityType(final BTFEntityType entityType) {
return Stream.of(BTFCountMetric.values()).filter(cm -> cm.entityType == entityType)
.map(cm -> cm.eventToCount).collect(Collectors.toList());
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFEntityState.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFEntityState.java
index 4674307..1633113 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFEntityState.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFEntityState.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -54,24 +54,23 @@
// final state
terminated(new SimpleEntry<>(Arrays.asList(RunnableEventType.TERMINATE), Collections.emptyList()), //
new SimpleEntry<>(Arrays.asList(ProcessEventType.TERMINATE), Collections.emptyList()));
-
+
public final Map<BTFEntityType, Entry<List<Enum<?>>, List<Enum<?>>>> entityType2InOutEvents;
// list of all states excluding initial and final states
public static final List<BTFEntityState> actStates = Stream.of(values())
.filter(p -> p.entityType2InOutEvents.values().stream().noneMatch(e -> e.getKey().isEmpty()))
.filter(p -> p.entityType2InOutEvents.values().stream().noneMatch(e -> e.getValue().isEmpty()))
.collect(Collectors.toList());
-
- @SafeVarargs
- private BTFEntityState(final Entry<List<Enum<?>>, List<Enum<?>>>... inOutEvents) {
- this.entityType2InOutEvents = new LinkedHashMap<>();
+
+ @SafeVarargs BTFEntityState(final Entry<List<Enum<?>>, List<Enum<?>>>... inOutEvents) {
+ entityType2InOutEvents = new LinkedHashMap<>();
Stream.of(inOutEvents).forEach(e -> {
String entityTypeName = e.getKey().stream().findFirst().orElseGet(e.getValue().stream().findFirst()::get).getClass().getSimpleName();
entityTypeName = entityTypeName.substring(0, entityTypeName.indexOf("EventType")).toLowerCase();
- this.entityType2InOutEvents.put(BTFEntityType.getForName(entityTypeName), e);
+ entityType2InOutEvents.put(BTFEntityType.getForName(entityTypeName), e);
});
}
-
+
public static List<String> getValidityConstraints(final BTFEntityType entityType) {
final List<String> validityConstraints = new ArrayList<>();
// events for initial and final states must occur exactly once
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFEntityType.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFEntityType.java
index 4c9d2c0..adc4b8f 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFEntityType.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFEntityType.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020-2021 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -36,30 +36,30 @@
private final List<String> traceAliases;
private final String entityTypeName;
- private BTFEntityType(final Class<? extends Enum<?>> eventTypeClass, final String... traceAlias) {
- this.traceAliases = Collections.unmodifiableList(Arrays.asList(traceAlias));
+ BTFEntityType(final Class<? extends Enum<?>> eventTypeClass, final String... traceAlias) {
+ traceAliases = Collections.unmodifiableList(Arrays.asList(traceAlias));
String className = eventTypeClass.getSimpleName();
- this.entityTypeName = className.substring(0, className.indexOf("EventType")).toLowerCase();
+ entityTypeName = className.substring(0, className.indexOf("EventType")).toLowerCase();
}
@Override
public String getName() {
- return this.entityTypeName;
+ return entityTypeName;
}
-
+
public boolean isTraceAlias(final String traceAlias) {
- return this.traceAliases.stream().anyMatch(traceAlias::equals);
+ return traceAliases.stream().anyMatch(traceAlias::equals);
}
-
+
@Override
public List<String> getTraceAliases() {
- return this.traceAliases;
+ return traceAliases;
}
-
+
public static BTFEntityType getForName(final String name) {
return name2Literal.get(name);
}
-
+
@Override
public Set<Enum<?>> getPossibleEvents() {
return BTFEntityState.getPossibleEventsFor(this);
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFInterInstanceMetric.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFInterInstanceMetric.java
index 54afb75..b802e4f 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFInterInstanceMetric.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/model/BTFInterInstanceMetric.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
@@ -33,13 +33,12 @@
public final Map<BTFEntityType, Entry<Enumerator, Enumerator>> entityType2FirstAndSecond;
- private BTFInterInstanceMetric(final Enumerator firstInstEvent, final Enumerator secondInstEvent) {
+ BTFInterInstanceMetric(final Enumerator firstInstEvent, final Enumerator secondInstEvent) {
this(new SimpleEntry<>(firstInstEvent, secondInstEvent));
}
-
- @SafeVarargs
- private BTFInterInstanceMetric(final Entry<Enumerator, Enumerator>...firstAndSecondInstEvent) {
- this.entityType2FirstAndSecond = new LinkedHashMap<>();
+
+ @SafeVarargs BTFInterInstanceMetric(final Entry<Enumerator, Enumerator>...firstAndSecondInstEvent) {
+ entityType2FirstAndSecond = new LinkedHashMap<>();
Stream.of(firstAndSecondInstEvent).forEach(entry -> {
String entityTypeName = entry.getKey().getClass().getSimpleName();
entityTypeName = entityTypeName.substring(0, entityTypeName.indexOf("EventType")).toLowerCase();
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/wizard/ImportPage.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/wizard/ImportPage.java
index 1b98fdb..b6f6b57 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/wizard/ImportPage.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/wizard/ImportPage.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Timing-Architects Embedded Systems GmbH - initial API and implementation
********************************************************************************
@@ -67,11 +67,11 @@
groupLabel.setFont(parent.getFont());
// source name entry field
- this.sourceNameField = new Text(sourceContainerGroup, SWT.READ_ONLY | SWT.BORDER);
+ sourceNameField = new Text(sourceContainerGroup, SWT.READ_ONLY | SWT.BORDER);
final GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- this.sourceNameField.setLayoutData(data);
- this.sourceNameField.setFont(parent.getFont());
+ sourceNameField.setLayoutData(data);
+ sourceNameField.setFont(parent.getFont());
// source browse button
final Button sourceBrowseButton = new Button(sourceContainerGroup, SWT.PUSH);
@@ -87,23 +87,23 @@
sourceBrowseButton.setFont(parent.getFont());
setButtonLayoutData(sourceBrowseButton);
}
-
+
@Override
protected void createOptionsGroupButtons(Group optionsGroup) {
- this.calculateMetrics = new Button(optionsGroup, SWT.CHECK);
- this.calculateMetrics.setFont(optionsGroup.getFont());
- this.calculateMetrics.setText(Messages.ImportPage_optionCalculateMetrics);
- this.calculateMetrics.setSelection(true);
-
- this.persistTraceEvents = new Button(optionsGroup, SWT.CHECK);
- this.persistTraceEvents.setFont(optionsGroup.getFont());
- this.persistTraceEvents.setText(Messages.ImportPage_optionPersistTraceEvents);
- this.persistTraceEvents.setSelection(true);
-
- this.doInMemoryDBImport = new Button(optionsGroup, SWT.CHECK);
- this.doInMemoryDBImport.setFont(optionsGroup.getFont());
- this.doInMemoryDBImport.setText(Messages.ImportPage_optionDoInMemoryDBImport);
- this.doInMemoryDBImport.setSelection(true);
+ calculateMetrics = new Button(optionsGroup, SWT.CHECK);
+ calculateMetrics.setFont(optionsGroup.getFont());
+ calculateMetrics.setText(Messages.ImportPage_optionCalculateMetrics);
+ calculateMetrics.setSelection(true);
+
+ persistTraceEvents = new Button(optionsGroup, SWT.CHECK);
+ persistTraceEvents.setFont(optionsGroup.getFont());
+ persistTraceEvents.setText(Messages.ImportPage_optionPersistTraceEvents);
+ persistTraceEvents.setSelection(true);
+
+ doInMemoryDBImport = new Button(optionsGroup, SWT.CHECK);
+ doInMemoryDBImport.setFont(optionsGroup.getFont());
+ doInMemoryDBImport.setText(Messages.ImportPage_optionDoInMemoryDBImport);
+ doInMemoryDBImport.setSelection(true);
}
@Override
@@ -120,7 +120,7 @@
protected boolean determinePageCompletion() {
boolean result = super.determinePageCompletion();
- final String path = this.sourceNameField.getText();
+ final String path = sourceNameField.getText();
final File file = new File(path);
result &= file.exists();
@@ -133,7 +133,7 @@
fileDialog.setFilterExtensions(new String[] { "*.btf" }); //$NON-NLS-1$
final String open = fileDialog.open();
if (open != null) {
- this.sourceNameField.setText(open);
+ sourceNameField.setText(open);
update();
}
}
@@ -143,23 +143,23 @@
}
String getSource() {
- return this.sourceNameField.getText();
+ return sourceNameField.getText();
}
IContainer getTargetContainer() {
return getSpecifiedContainer();
}
-
+
boolean isCalculateMetrics() {
- return this.calculateMetrics.getSelection();
+ return calculateMetrics.getSelection();
}
-
+
boolean isPersistTraceEvents() {
- return this.persistTraceEvents.getSelection();
+ return persistTraceEvents.getSelection();
}
-
+
boolean isDoInMemoryDBImport() {
- return this.doInMemoryDBImport.getSelection();
+ return doInMemoryDBImport.getSelection();
}
}
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/wizard/ImportWizard.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/wizard/ImportWizard.java
index 04a6115..3c8de10 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/wizard/ImportWizard.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/wizard/ImportWizard.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2021 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Timing-Architects Embedded Systems GmbH - initial API and implementation
********************************************************************************
@@ -48,8 +48,8 @@
@Override
public void addPages() {
super.addPages();
- this.mainPage = new ImportPage(this.selection);
- addPage(this.mainPage);
+ mainPage = new ImportPage(selection);
+ addPage(mainPage);
}
@Override
@@ -67,17 +67,17 @@
@Override
public boolean performFinish() {
- final String source = this.mainPage.getSource();
- final IContainer target = this.mainPage.getTargetContainer();
+ final String source = mainPage.getSource();
+ final IContainer target = mainPage.getTargetContainer();
// get the file name of the btf
final int from = Math.max(source.lastIndexOf('/'), source.lastIndexOf('\\'));
final int to = source.lastIndexOf(".btf"); //$NON-NLS-1$
final String name = source.substring(from + 1, to);
final String atdbFile = target.getLocation() + "/" + name + ".atdb"; //$NON-NLS-1$
-
- final boolean calculateMetrics = this.mainPage.isCalculateMetrics();
- final boolean persistTraceEvents = this.mainPage.isPersistTraceEvents();
- final boolean doInMemoryDBImport = this.mainPage.isDoInMemoryDBImport();
+
+ final boolean calculateMetrics = mainPage.isCalculateMetrics();
+ final boolean persistTraceEvents = mainPage.isPersistTraceEvents();
+ final boolean doInMemoryDBImport = mainPage.isDoInMemoryDBImport();
final WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
diff --git a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/wizard/Messages.java b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/wizard/Messages.java
index 0141c0e..26c7015 100644
--- a/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/wizard/Messages.java
+++ b/plugins/org.eclipse.app4mc.atdb.import.btf/src/org/eclipse/app4mc/atdb/_import/btf/wizard/Messages.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Eclipse APP4MC contributors.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
********************************************************************************
*/
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/Profile.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/Profile.java
index 48c4756..24e3ac4 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/Profile.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/Profile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -22,7 +22,7 @@
/**
* Annotation for validation profiles.
- *
+ *
* Classes annotated as Profile can provide information like name and description.
* They are used at runtime to characterize the contained group of validations.
*/
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ProfileGroup.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ProfileGroup.java
index dd808c7..b9fc913 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ProfileGroup.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ProfileGroup.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -25,7 +25,7 @@
/**
* Annotation for validation profiles.
- *
+ *
* Can be used multiple times per class (repeatable).
*/
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ProfileGroupList.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ProfileGroupList.java
index 35a19f7..61b50c4 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ProfileGroupList.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ProfileGroupList.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/Validation.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/Validation.java
index 8845735..0e22215 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/Validation.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/Validation.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -22,7 +22,7 @@
/**
* Annotation for validation classes.
- *
+ *
* Classes annotated as Validation can be run through a profile annotated with {@link ValidationGroup}.
* Requires the specification of a target type on which the validation shall be executed.
*/
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ValidationGroup.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ValidationGroup.java
index 1f5412f..f0837b1 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ValidationGroup.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ValidationGroup.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -26,7 +26,7 @@
/**
* Annotation for validation profiles.
- *
+ *
* Optionally mapping from {@link Validation} to {@link Severity}.
* Can be used multiple times per class (repeatable).
*/
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ValidationGroupList.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ValidationGroupList.java
index 0847548..d751486 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ValidationGroupList.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/annotation/ValidationGroupList.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/IProfile.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/IProfile.java
index ee0b794..5fb5592 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/IProfile.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/IProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/IProfileConfiguration.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/IProfileConfiguration.java
index fcecfc8..7b29758 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/IProfileConfiguration.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/IProfileConfiguration.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/IValidation.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/IValidation.java
index 05dd093..e373d5a 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/IValidation.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/IValidation.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -25,15 +25,15 @@
public interface IValidation {
- public EPackage getEPackage();
-
- public EClassifier getEClassifier();
+ EPackage getEPackage();
+
+ EClassifier getEClassifier();
/**
* @param eObject the Ecore object to validate
* @param results the list of validation results
*/
- public void validate(final EObject eObject, final List<ValidationDiagnostic> results);
+ void validate(final EObject eObject, final List<ValidationDiagnostic> results);
default String typeInfo(final EObject object) {
if (object == null) return "?";
@@ -41,10 +41,10 @@
final String type = object.eClass().getName();
return StringUtils.join(StringUtils.splitByCharacterTypeCamelCase(type), ' '); // type with blanks
}
-
+
default String objectInfo(final EObject object) {
if (object == null) return "?";
-
+
String s1 = typeInfo(object);
Object name = attributeValue(object, "name");
String s2;
@@ -55,13 +55,13 @@
} else {
s2 = " \"" + name + "\"";
}
-
+
return s1 + s2;
}
-
+
default Object attributeValue(final EObject object, final String attribName) {
if (object == null || attribName == null) return null;
-
+
EStructuralFeature feature = object.eClass().getEStructuralFeature(attribName);
if (feature == null) return null;
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/Severity.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/Severity.java
index 7a5912f..52b29a3 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/Severity.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/Severity.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -16,7 +16,7 @@
package org.eclipse.app4mc.validation.core;
/**
- *
+ *
*/
public enum Severity
{
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/ValidationDiagnostic.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/ValidationDiagnostic.java
index 44a65d8..43d4fd0 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/ValidationDiagnostic.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/core/ValidationDiagnostic.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -31,10 +31,10 @@
private static final String SOURCE = "org.eclipse.app4mc.validation";
private static final int NO_INDEX = -1;
-
+
private Severity severity = Severity.UNDEFINED;
private String validationID;
-
+
private final String message;
private final EObject targetObject;
private final EStructuralFeature targetFeature;
@@ -63,13 +63,13 @@
}
this.message = message;
- this.targetObject = object;
- this.targetFeature = feature;
+ targetObject = object;
+ targetFeature = feature;
}
public EObject getTargetObject() {
- return this.targetObject;
+ return targetObject;
}
public EStructuralFeature getTargetFeature() {
@@ -77,7 +77,7 @@
}
public String getValidationID() {
- return this.validationID;
+ return validationID;
}
public void setValidationID(String validationID) {
@@ -85,7 +85,7 @@
}
public Severity getSeverityLevel() {
- return this.severity;
+ return severity;
}
public void setSeverityLevel(final Severity severity) {
@@ -94,12 +94,12 @@
@Override
public String toString() {
- return this.validationID + ": " + this.message + " (" + this.targetObject + ")";
+ return validationID + ": " + message + " (" + targetObject + ")";
}
@Override
public int getSeverity() {
- switch (this.severity) {
+ switch (severity) {
case INFO:
return INFO;
case WARNING:
@@ -113,7 +113,7 @@
@Override
public String getMessage() {
- return this.message;
+ return message;
}
@Override
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/util/CachedProfile.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/util/CachedProfile.java
index 3c10f77..3d32603 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/util/CachedProfile.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/util/CachedProfile.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019, 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -34,12 +34,12 @@
private final Class<? extends IProfile> profileClass;
private final CachedProfile parentProfile;
-
+
private final String name;
private final String description;
private final Map<Class<? extends IProfile>, CachedProfile> profiles = new HashMap<>();
private final Map<Class<? extends IValidation>, CachedValidator> validations = new HashMap<>();
-
+
public CachedProfile(final Class<? extends IProfile> profileClass) {
this(profileClass, null);
@@ -47,20 +47,20 @@
public CachedProfile(final Class<? extends IProfile> profileClass, final CachedProfile parent) {
super();
-
+
if (profileClass == null) {
throw new IllegalArgumentException("Loading aborted - Undefined profile class (null)");
}
-
+
this.profileClass = profileClass;
- this.parentProfile = parent;
-
+ parentProfile = parent;
+
Profile profile = profileClass.getAnnotation(Profile.class);
name = (profile != null) ? profile.name() : profileClass.getSimpleName();
description = (profile != null) ? profile.description() : "";
-
+
List<Class<? extends IProfile>> forbiddenClasses = forbiddenSubProfileClasses();
-
+
ProfileGroup[] profileGroupList = profileClass.getAnnotationsByType(ProfileGroup.class);
for (ProfileGroup pGroup : profileGroupList) {
for (Class<? extends IProfile> pClass : pGroup.profiles()) {
@@ -90,16 +90,16 @@
private List<Class<? extends IProfile>> forbiddenSubProfileClasses() {
List<Class<? extends IProfile>> classes = new ArrayList<>();
-
+
for (CachedProfile profile = this; profile != null; profile = profile.getParentProfile()) {
Class<? extends IProfile> pc = profile.getProfileClass();
if (pc != null) classes.add(pc);
}
- return classes;
+ return classes;
}
// *** public getters ***
-
+
public CachedProfile getParentProfile() {
return parentProfile;
}
@@ -129,20 +129,20 @@
addAllValidations(this, resultMap);
return resultMap;
}
-
+
private void addAllValidations(final CachedProfile profile, final Map<Class<? extends IValidation>, Severity> resultMap) {
// add contained validations
for (CachedValidator cachedValidator : profile.getCachedValidations().values()) {
Class<? extends IValidation> validatorClass = cachedValidator.getValidatorClass();
Severity validatorSeverity = cachedValidator.getSeverity();
-
+
Severity oldSeverity = resultMap.get(validatorClass);
if (oldSeverity == null || oldSeverity.ordinal() < validatorSeverity.ordinal()) {
// insert: class -> higher severity
resultMap.put(validatorClass, validatorSeverity);
}
}
-
+
// add validations of contained profiles (recursive)
for (CachedProfile subProfile : profile.getCachedProfiles().values()) {
addAllValidations(subProfile, resultMap);
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/util/ProfileManager.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/util/ProfileManager.java
index f647bfb..e7a5d94 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/util/ProfileManager.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/util/ProfileManager.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -31,28 +31,28 @@
@Component(service=ProfileManager.class)
public class ProfileManager {
-
+
private final HashMap<Class<? extends IProfile>, CachedProfile> profileMap = new HashMap<>();
@Reference(
- cardinality = ReferenceCardinality.MULTIPLE,
- policy = ReferencePolicy.DYNAMIC,
+ cardinality = ReferenceCardinality.MULTIPLE,
+ policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
public void bindProfileConfiguration(IProfileConfiguration config) {
- synchronized (this.profileMap) {
+ synchronized (profileMap) {
Class<? extends IProfile> profileClass = config.getClass();
- this.profileMap.put(profileClass, getCachedProfile(profileClass));
+ profileMap.put(profileClass, getCachedProfile(profileClass));
}
}
-
+
public void unbindProfileConfiguration(IProfileConfiguration config) {
- synchronized (this.profileMap) {
- this.profileMap.remove(config.getClass());
+ synchronized (profileMap) {
+ profileMap.remove(config.getClass());
}
}
-
+
public Map<Class<? extends IProfile>, CachedProfile> getRegisteredValidationProfiles() {
- return Collections.unmodifiableMap(this.profileMap);
+ return Collections.unmodifiableMap(profileMap);
}
protected void loadProfile(Class<? extends IProfile> profileClass) {
@@ -60,7 +60,7 @@
return;
}
- this.profileMap.put(profileClass, new CachedProfile(profileClass));
+ profileMap.put(profileClass, new CachedProfile(profileClass));
}
public CachedProfile getCachedProfile(Class<? extends IProfile> profileClass) {
@@ -68,11 +68,11 @@
return null;
}
- if (!this.profileMap.containsKey(profileClass)) {
+ if (!profileMap.containsKey(profileClass)) {
loadProfile(profileClass);
}
- return this.profileMap.get(profileClass);
+ return profileMap.get(profileClass);
}
// *** Some helper methods
diff --git a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/util/ValidationAggregator.java b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/util/ValidationAggregator.java
index 1632d0d..eab4a56 100644
--- a/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/util/ValidationAggregator.java
+++ b/plugins/org.eclipse.app4mc.validation.core/src/org/eclipse/app4mc/validation/util/ValidationAggregator.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -49,14 +49,14 @@
private final Map<EClassifier, Set<CachedValidator>> validationMap2 = new HashMap<>();
private boolean rebuildValidationMaps = false;
-
+
public ValidationAggregator() {
super();
}
-
+
public void addProfiles(final Collection<Class<? extends IProfile>> profileClasses) {
if (profileClasses == null || profileClasses.isEmpty()) return;
-
+
// store profiles in cache
for (Class<? extends IProfile> pClass : profileClasses) {
addProfile(pClass);
@@ -66,11 +66,11 @@
public void addProfile(final Class<? extends IProfile> profileClass) {
if (profileClass == null) return;
- if (!this.profileCache.containsKey(profileClass)) {
+ if (!profileCache.containsKey(profileClass)) {
// create new profile and add to cache
CachedProfile profile = new CachedProfile(profileClass);
- this.profileCache.put(profileClass, profile);
-
+ profileCache.put(profileClass, profile);
+
// add validations of profile to cache
addValidations(profile.getAllValidations());
}
@@ -78,26 +78,26 @@
public void addValidations(final Map<Class<? extends IValidation>, Severity> map) {
if (map == null || map.isEmpty()) return;
-
+
for (Entry<Class<? extends IValidation>, Severity> entry : map.entrySet()) {
addValidation(entry.getKey(), entry.getValue());
}
}
-
+
public void addValidation(final Class<? extends IValidation> validatorClass, Severity validatorSeverity) {
if (validatorClass == null) return;
-
- CachedValidator cachedValidator = this.validatorCache.get(validatorClass);
+
+ CachedValidator cachedValidator = validatorCache.get(validatorClass);
if (cachedValidator == null) {
// create new validator and add to cache
CachedValidator newValidator = new CachedValidator(validatorClass, validatorSeverity);
- this.validatorCache.put(validatorClass, newValidator);
- this.rebuildValidationMaps = true;
-
+ validatorCache.put(validatorClass, newValidator);
+ rebuildValidationMaps = true;
+
// store affected Ecore package and classes
EPackage ePackage = newValidator.getValidatorInstance().getEPackage();
- if (ePackage != null && !this.ePackageSet.contains(ePackage)) {
- this.ePackageSet.add(ePackage);
+ if (ePackage != null && !ePackageSet.contains(ePackage)) {
+ ePackageSet.add(ePackage);
extendClassSet(ePackage);
}
} else {
@@ -114,50 +114,50 @@
if (classifier instanceof EClass) {
EClass eClass = (EClass) classifier;
if (!eClass.isAbstract() && !eClass.isInterface())
- this.eClassSet.add(eClass);
+ eClassSet.add(eClass);
}
}
}
private void rebuildValidationMaps() {
-
+
// Collect validations in Map 1
-
- this.validationMap1.clear();
-
- for (CachedValidator validator : this.validatorCache.values()) {
+
+ validationMap1.clear();
+
+ for (CachedValidator validator : validatorCache.values()) {
EClassifier eClassifier = validator.getTargetEClassifier();
-
- this.validationMap1
- .computeIfAbsent(eClassifier, k -> new ArrayList<CachedValidator>())
+
+ validationMap1
+ .computeIfAbsent(eClassifier, k -> new ArrayList<>())
.add(validator);
}
-
+
// Reuse validations of Map1 in Map2
-
- this.validationMap2.clear();
-
+
+ validationMap2.clear();
+
for (Entry<EClassifier, List<CachedValidator>> entry : validationMap1.entrySet()) {
addValidationsToMap2(entry.getKey(), entry.getValue());
}
-
- this.rebuildValidationMaps = false;
+
+ rebuildValidationMaps = false;
}
-
+
private void addValidationsToMap2(final EClassifier eClassifier, final List<CachedValidator> validatorList) {
if (eClassifier instanceof EDataType) {
// Add entry for data type
basicAddValidationsToMap2(eClassifier, validatorList);
-
+
} else if (eClassifier instanceof EClass) {
// Add entry for concrete target class
EClass eClass = (EClass) eClassifier;
if (!eClass.isAbstract() && !eClass.isInterface()) {
basicAddValidationsToMap2(eClass, validatorList);
}
-
+
// Add entries for sub classes of target class
- for (EClass potentialSubclass : this.eClassSet) {
+ for (EClass potentialSubclass : eClassSet) {
// Hint: special check for EObject is required
if (eClass.equals(EcorePackage.eINSTANCE.getEObject()) || eClass.isSuperTypeOf(potentialSubclass)) {
basicAddValidationsToMap2(potentialSubclass, validatorList);
@@ -168,9 +168,9 @@
private void basicAddValidationsToMap2(final EClassifier eClassifier, final List<CachedValidator> validatorList) {
// only add entries for elements of the concerned packages
- if (this.ePackageSet.contains(eClassifier.eContainer())) {
- this.validationMap2
- .computeIfAbsent(eClassifier, k -> new HashSet<CachedValidator>())
+ if (ePackageSet.contains(eClassifier.eContainer())) {
+ validationMap2
+ .computeIfAbsent(eClassifier, k -> new HashSet<>())
.addAll(validatorList);
}
}
@@ -179,7 +179,7 @@
// *** public getters ***
public List<Class<? extends IProfile>> getProfiles() {
- return this.profileCache.values().stream().map(CachedProfile::getProfileClass).collect(Collectors.toList());
+ return profileCache.values().stream().map(CachedProfile::getProfileClass).collect(Collectors.toList());
}
public Set<EPackage> getEPackages() {
@@ -187,8 +187,8 @@
}
public Set<CachedValidator> getValidations(final EClass targetClass) {
- if (this.rebuildValidationMaps) rebuildValidationMaps();
-
+ if (rebuildValidationMaps) rebuildValidationMaps();
+
Set<CachedValidator> result = validationMap2.get(targetClass);
if (result == null) {
return Collections.emptySet();
@@ -198,10 +198,10 @@
}
public ConcurrentMap<EClassifier, CopyOnWriteArraySet<CachedValidator>> getConcurrentValidationMap() {
- if (this.rebuildValidationMaps) rebuildValidationMaps();
-
+ if (rebuildValidationMaps) rebuildValidationMaps();
+
ConcurrentHashMap<EClassifier, CopyOnWriteArraySet<CachedValidator>> map = new ConcurrentHashMap<>();
-
+
for (Entry<EClassifier, Set<CachedValidator>> entry : validationMap2.entrySet()) {
map.put(entry.getKey(), new CopyOnWriteArraySet<>(entry.getValue()));
}
@@ -213,8 +213,8 @@
public void dumpValidationMap1(PrintStream out) {
if (out == null) return;
-
- if (this.rebuildValidationMaps) rebuildValidationMaps();
+
+ if (rebuildValidationMaps) rebuildValidationMaps();
List<EClassifier> classifiers = validationMap1.keySet().stream()
.sorted(Comparator.comparing(EClassifier::getName))
@@ -231,7 +231,7 @@
public void dumpValidationMap2(PrintStream out) {
if (out == null) return;
- if (this.rebuildValidationMaps) rebuildValidationMaps();
+ if (rebuildValidationMaps) rebuildValidationMaps();
List<EClassifier> classifiers = validationMap2.keySet().stream()
.sorted(Comparator.comparing(EClassifier::getName))
diff --git a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/ProfileDialog.java b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/ProfileDialog.java
index b1751aa..c2c21e2 100644
--- a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/ProfileDialog.java
+++ b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/ProfileDialog.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -55,7 +55,7 @@
public ProfileDialog(Shell parentShell, ILabelProvider labelProvider, ITreeContentProvider contentProvider, ProfileDialogSettings set) {
super(parentShell, labelProvider, contentProvider);
- this.settings = (set != null) ? set : new ProfileDialogSettings();
+ settings = (set != null) ? set : new ProfileDialogSettings();
initializeDialog();
}
@@ -118,13 +118,13 @@
}
private void initializeDialog() {
- this.setContainerMode(true);
- this.setMessage("Choose profiles");
- this.setTitle("Validations");
- this.setInput(settings);
+ setContainerMode(true);
+ setMessage("Choose profiles");
+ setTitle("Validations");
+ setInput(settings);
// set initial selection
- List<CachedProfile> initialSelection = this.settings.getInitialSelection();
+ List<CachedProfile> initialSelection = settings.getInitialSelection();
setInitialElementSelections(initialSelection);
setExpandedElements(initialSelection.stream().flatMap(cached -> getParents(cached).stream()).toArray());
@@ -143,7 +143,7 @@
// scope
if (btnScopeFile.getSelection()) {
- settings.setScope(ProfileDialogSettings.SCOPE_FILE);
+ settings.setScope(ProfileDialogSettings.SCOPE_FILE);
} else if (btnScopeFolder.getSelection()) {
settings.setScope(ProfileDialogSettings.SCOPE_FOLDER);
}
diff --git a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/ProfileDialogSettings.java b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/ProfileDialogSettings.java
index e778db3..da311e3 100644
--- a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/ProfileDialogSettings.java
+++ b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/ProfileDialogSettings.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -17,6 +17,7 @@
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -56,7 +57,7 @@
@Inject
@Optional
public void setProfileManager(@Service ProfileManager manager) {
- this.profileManager = manager;
+ profileManager = manager;
}
// getters and setters
@@ -64,7 +65,7 @@
public String getScope() {
return scope;
}
-
+
public void setScope(String scope) {
this.scope = scope;
}
@@ -88,8 +89,8 @@
// methods required by tree view
public Object[] getProfiles() {
- return this.profileManager.getRegisteredValidationProfiles().values().stream()
- .sorted((p1, p2) -> p1.getName().compareTo(p2.getName()))
+ return profileManager.getRegisteredValidationProfiles().values().stream()
+ .sorted(Comparator.comparing(CachedProfile::getName))
.toArray();
}
@@ -97,14 +98,14 @@
List<CachedProfile> allNodes = new ArrayList<>();
// get all profiles
- for (CachedProfile rootNode : this.profileManager.getRegisteredValidationProfiles().values()) {
+ for (CachedProfile rootNode : profileManager.getRegisteredValidationProfiles().values()) {
allNodes.add(rootNode);
collectSubNodes(rootNode, allNodes);
}
// keep only selected profiles and group them
Map<Object, List<CachedProfile>> filteredNodesMap = allNodes.stream()
- .filter( cache -> this.selectedProfileClassNames.contains(cache.getProfileClass().getName()) )
+ .filter( cache -> selectedProfileClassNames.contains(cache.getProfileClass().getName()) )
.collect(Collectors.groupingBy( cache -> cache.getProfileClass().getName() ));
// select one representative per group (the one that is highest in the tree)
@@ -112,7 +113,7 @@
for (List<CachedProfile> list : filteredNodesMap.values()) {
result.add(getRepresentative(list));
}
-
+
return result;
}
@@ -140,7 +141,7 @@
selectedLevel = tmpLevel;
}
}
-
+
return selectedProfile;
}
@@ -158,32 +159,31 @@
}
public void setSelectedProfileClassNames(List<String> classNames) {
- this.selectedProfileClassNames.clear();
- this.selectedProfileClassNames.addAll(classNames);
+ selectedProfileClassNames.clear();
+ selectedProfileClassNames.addAll(classNames);
}
// dialog settings store
-
+
public void loadFrom(IDialogSettings store) {
if (store == null) return;
-
+
// KEY_SELECTED_PROFILE_CLASSES
String[] classNames = store.getArray(KEY_SELECTED_PROFILE_CLASSES);
if (classNames != null) {
- setSelectedProfileClassNames(Arrays.asList(classNames));
+ setSelectedProfileClassNames(Arrays.asList(classNames));
}
// KEY_SELECTED_SCOPE
String selectedScope = store.get(KEY_SELECTED_SCOPE);
if (selectedScope != null) {
- setScope(selectedScope);
+ setScope(selectedScope);
}
}
public void saveTo(IDialogSettings store) {
- if (store == null) return;
- if (!dialogSuccess || dialogResults == null) return;
-
+ if ((store == null) || !dialogSuccess || dialogResults == null) return;
+
// KEY_SELECTED_PROFILE_CLASSES
String[] classNames = dialogResults.stream().map(Class::getName).toArray(String[]::new);
store.put(KEY_SELECTED_PROFILE_CLASSES, classNames);
diff --git a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/ValidationUIPlugin.java b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/ValidationUIPlugin.java
index ee65541..0fad070 100644
--- a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/ValidationUIPlugin.java
+++ b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/ValidationUIPlugin.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/provider/ProfileContentProvider.java b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/provider/ProfileContentProvider.java
index 2c3abac..a3031ba 100644
--- a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/provider/ProfileContentProvider.java
+++ b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/provider/ProfileContentProvider.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -15,6 +15,8 @@
package org.eclipse.app4mc.validation.ui.provider;
+import java.util.Comparator;
+
import org.eclipse.app4mc.validation.ui.ProfileDialogSettings;
import org.eclipse.app4mc.validation.util.CachedProfile;
import org.eclipse.jface.viewers.ITreeContentProvider;
@@ -30,7 +32,7 @@
public Object[] getChildren(Object parentElement) {
CachedProfile profile = (CachedProfile) parentElement;
return profile.getCachedProfiles().values().stream()
- .sorted((p1, p2) -> p1.getName().compareTo(p2.getName()))
+ .sorted(Comparator.comparing(CachedProfile::getName))
.toArray();
}
diff --git a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/provider/ProfileLabelProvider.java b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/provider/ProfileLabelProvider.java
index 78dc0b9..4e8be33 100644
--- a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/provider/ProfileLabelProvider.java
+++ b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/provider/ProfileLabelProvider.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -40,9 +40,9 @@
StringBuilder sb = new StringBuilder();
if (node.getDescription().isEmpty()) {
- sb.append(node.getName());
+ sb.append(node.getName());
} else {
- sb.append(node.getDescription());
+ sb.append(node.getDescription());
}
for (CachedValidator validator : node.getCachedValidations().values()) {
sb.append("\n " + validator.getValidationID());
@@ -51,12 +51,12 @@
}
}
if (sb.length() > 0) {
- return sb.toString();
+ return sb.toString();
}
}
return null;
}
-
+
@Override
public void update(ViewerCell cell) {
Object element = cell.getElement();
diff --git a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/util/ValidationExecutorWithMonitor.java b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/util/ValidationExecutorWithMonitor.java
index b66e645..fe6fa19 100644
--- a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/util/ValidationExecutorWithMonitor.java
+++ b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/util/ValidationExecutorWithMonitor.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -55,7 +55,7 @@
/**
* Validates the model object (and all contained objects)
- *
+ *
* @param model the model object to validate
* @return the status
*/
@@ -65,7 +65,7 @@
/**
* Validates the model objects (and all contained objects)
- *
+ *
* @param models the list of model objects to validate
* @return the status
*/
@@ -75,7 +75,7 @@
/**
* Validates the model object (and all contained objects)
- *
+ *
* @param model the model object to validate
* @param monitor the progress monitor
* @return the status
@@ -86,14 +86,14 @@
/**
* Validates the model objects (and all contained objects)
- *
+ *
* @param models the list of model objects to validate
* @param monitor the progress monitor
* @return the status
*/
public IStatus validateWithMonitor(final List<EObject> models, final IProgressMonitor monitor) {
- this.results.clear();
-
+ results.clear();
+
try {
// count overall number of objects
int count = 0;
diff --git a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/util/ValidationMarkerHelper.java b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/util/ValidationMarkerHelper.java
index 602ecbb..84e2a8b 100644
--- a/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/util/ValidationMarkerHelper.java
+++ b/plugins/org.eclipse.app4mc.validation.ui/src/org/eclipse/app4mc/validation/ui/util/ValidationMarkerHelper.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -26,16 +26,16 @@
import org.eclipse.emf.edit.ui.action.ValidateAction.EclipseResourcesUtil;
public class ValidationMarkerHelper extends EclipseResourcesUtil {
-
+
@Override
protected boolean adjustMarker(IMarker marker, Diagnostic genericDiagnostic) throws CoreException
{
if (genericDiagnostic instanceof ValidationDiagnostic) {
ValidationDiagnostic diagnostic = (ValidationDiagnostic) genericDiagnostic;
-
+
EObject affectedObject = diagnostic.getTargetObject();
EStructuralFeature affectedFeature = diagnostic.getTargetFeature();
-
+
// LOCATION attribute
String location;
if (affectedObject == null) {
@@ -47,7 +47,7 @@
}
}
marker.setAttribute(IMarker.LOCATION, location);
-
+
// URI attribute
if (affectedObject != null) {
marker.setAttribute(EValidator.URI_ATTRIBUTE, EcoreUtil.getURI(affectedObject).toString());
@@ -55,10 +55,10 @@
// SOURCE attribute
marker.setAttribute(IMarker.SOURCE_ID, diagnostic.getValidationID());
-
+
return true;
}
-
+
return false;
}
diff --git a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/VisualizationPart.java b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/VisualizationPart.java
index 1fce1b3..91f0f6f 100644
--- a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/VisualizationPart.java
+++ b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/VisualizationPart.java
@@ -132,17 +132,17 @@
@PostConstruct
public void postConstruct(Composite parent, MPart part,
@Optional @Named(IServiceConstants.ACTIVE_SELECTION) ISelection selection) {
- this.parentComposite = parent;
- this.parentComposite.setLayout(new FillLayout());
- this.parentComposite.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ parentComposite = parent;
+ parentComposite.setLayout(new FillLayout());
+ parentComposite.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
- if (this.visualizationComposite == null) {
- this.visualizationComposite = new Composite(parent, SWT.NONE);
- this.visualizationComposite.setLayout(new FillLayout());
+ if (visualizationComposite == null) {
+ visualizationComposite = new Composite(parent, SWT.NONE);
+ visualizationComposite.setLayout(new FillLayout());
if (selection != null) {
handleSelection(selection);
} else {
- showEmpty(this.visualizationComposite);
+ showEmpty(visualizationComposite);
}
}
@@ -156,7 +156,7 @@
for (String entry : keyValues) {
String[] keyValue = entry.split("=");
if (keyValue.length == 2) {
- this.lastSelected.put(keyValue[0], keyValue[1]);
+ lastSelected.put(keyValue[0], keyValue[1]);
}
}
}
@@ -173,7 +173,7 @@
/**
* Disposes a current visualization and renders the visualization for the
* current active model element.
- *
+ *
* @param visualizationId The ID of the visualization to show. Can be
* <code>null</code> which results in showing the first
* available visualization.
@@ -185,7 +185,7 @@
/**
* Disposes a current visualization and renders the visualization for the
* current active model element.
- *
+ *
* @param visualizationId The ID of the visualization to show. Can be
* <code>null</code> which results in showing the first
* available visualization.
@@ -194,98 +194,98 @@
* visualization should be opened.
*/
public void showVisualization(String visualizationId, boolean reload) {
- if (this.parentComposite == null || (!reload && isPinned())) {
+ if (parentComposite == null || (!reload && isPinned())) {
return;
}
// clear any current active visualization
- if (this.visualizationComposite != null) {
- if (this.activeContext != null && this.activeVisualization != null) {
+ if (visualizationComposite != null) {
+ if (activeContext != null && activeVisualization != null) {
ContextInjectionFactory.invoke(activeVisualization, PreDestroy.class, activeContext, null);
- this.activeContext.dispose();
+ activeContext.dispose();
}
- this.visualizationComposite.dispose();
+ visualizationComposite.dispose();
}
// create a new Composite as parent for the visualization
- this.visualizationComposite = new Composite(this.parentComposite, SWT.NONE);
- this.visualizationComposite.setLayout(new FillLayout());
+ visualizationComposite = new Composite(parentComposite, SWT.NONE);
+ visualizationComposite.setLayout(new FillLayout());
// find the visualization for the current active model type and the given id
- this.availableModelVisualizations = this.registry.getVisualizations(this.activeTypes);
- if (!this.availableModelVisualizations.isEmpty()) {
+ availableModelVisualizations = registry.getVisualizations(activeTypes);
+ if (!availableModelVisualizations.isEmpty()) {
if (visualizationId != null) {
- this.activeVisualization = this.availableModelVisualizations.stream()
+ activeVisualization = availableModelVisualizations.stream()
.filter(mv -> mv.getId().equals(visualizationId))
.findFirst()
.orElse(null);
// only handle if there is a visualization for the given id
- if (this.activeVisualization != null) {
- this.lastSelected.put(this.activeTypes.get(0).getName(), visualizationId); // ???
+ if (activeVisualization != null) {
+ lastSelected.put(activeTypes.get(0).getName(), visualizationId); // ???
} else {
// take the first returned available visualization
- this.activeVisualization = this.availableModelVisualizations.get(0);
+ activeVisualization = availableModelVisualizations.get(0);
}
} else {
// take the first returned available visualization
- this.activeVisualization = this.availableModelVisualizations.get(0);
+ activeVisualization = availableModelVisualizations.get(0);
}
- if (this.activeVisualization != null) {
- this.activeContext = this.partContext.createChild(this.activeTypes.get(0) + " Visualization"); // ???
- this.activeContext.set(Composite.class, this.visualizationComposite);
+ if (activeVisualization != null) {
+ activeContext = partContext.createChild(activeTypes.get(0) + " Visualization"); // ???
+ activeContext.set(Composite.class, visualizationComposite);
- this.activeContext.set(this.activeVisualization.getType(), this.activeModelElements.get(0));
- this.activeContext.set(List.class, this.activeModelElements);
+ activeContext.set(activeVisualization.getType(), activeModelElements.get(0));
+ activeContext.set(List.class, activeModelElements);
- ContextInjectionFactory.invoke(this.activeVisualization.getVisualization(), PostConstruct.class, this.activeContext);
- this.parentComposite.layout(true);
+ ContextInjectionFactory.invoke(activeVisualization.getVisualization(), PostConstruct.class, activeContext);
+ parentComposite.layout(true);
} else {
- showEmpty(this.visualizationComposite);
+ showEmpty(visualizationComposite);
}
} else {
- showEmpty(this.visualizationComposite);
+ showEmpty(visualizationComposite);
}
}
@Inject
@Optional
void handleSelection(@Named(IServiceConstants.ACTIVE_SELECTION) ISelection selection) {
- if (!this.pinned) {
+ if (!pinned) {
// ensure that we are able to remove the adapter from a previous selection
EObject previous = null;
- if (this.activeModelElements != null
- && this.activeModelElements.size() == 1
- && this.activeModelElements.get(0) instanceof EObject) {
- previous = (EObject) this.activeModelElements.get(0);
+ if (activeModelElements != null
+ && activeModelElements.size() == 1
+ && activeModelElements.get(0) instanceof EObject) {
+ previous = (EObject) activeModelElements.get(0);
}
if (selection instanceof TreeSelection && !selection.isEmpty()) {
TreeSelection s = (TreeSelection) selection;
- this.activeModelElements = s.toList();
+ activeModelElements = s.toList();
- this.activeTypes = getNearestCommonTypes(this.activeModelElements);
+ activeTypes = getNearestCommonTypes(activeModelElements);
- this.availableModelVisualizations = null;
+ availableModelVisualizations = null;
// remove the adapter from a previous selection
if (previous != null) {
adapterEnabled = false;
- previous.eAdapters().remove(this.updateViewAdapter);
+ previous.eAdapters().remove(updateViewAdapter);
}
- if (!this.activeTypes.isEmpty() && this.activeModelElements.size() == 1
- && this.activeModelElements.get(0) instanceof EObject) {
- ((EObject) this.activeModelElements.get(0)).eAdapters().add(this.updateViewAdapter);
+ if (!activeTypes.isEmpty() && activeModelElements.size() == 1
+ && activeModelElements.get(0) instanceof EObject) {
+ ((EObject) activeModelElements.get(0)).eAdapters().add(updateViewAdapter);
adapterEnabled = true;
}
// check if there is a default visualization already configured
- showVisualization(!this.activeTypes.isEmpty() ? lastSelected.get(this.activeTypes.get(0).getName()) : null); // ???
+ showVisualization(!activeTypes.isEmpty() ? lastSelected.get(activeTypes.get(0).getName()) : null); // ???
}
}
}
@@ -347,7 +347,7 @@
}
/**
- *
+ *
* @param parent The parent {@link Composite}, should be the {@link #visualizationComposite}.
*/
private void showEmpty(Composite parent) {
@@ -371,58 +371,58 @@
@PreDestroy
public void preDestroy() {
- if (this.visualizationComposite != null) {
- this.visualizationComposite.dispose();
+ if (visualizationComposite != null) {
+ visualizationComposite.dispose();
}
- if (this.activeContext != null) {
- this.activeContext.dispose();
+ if (activeContext != null) {
+ activeContext.dispose();
}
}
/**
- *
+ *
* @return The model type that should be visualized.
*/
public List<Class<?>> getActiveModelTypes() {
- return this.activeTypes;
+ return activeTypes;
}
/**
- *
+ *
* @return The model elements that are used for the visualization.
*/
public List<?> getActiveModelElements() {
- return this.activeModelElements;
+ return activeModelElements;
}
/**
- *
+ *
* @return <code>true</code> if an active model element is set,
* <code>false</code> if no active model element is available.
*/
public boolean hasActiveModelElement() {
- return this.activeModelElements != null && !this.activeModelElements.isEmpty();
+ return activeModelElements != null && !activeModelElements.isEmpty();
}
/**
- *
+ *
* @return The current active rendered visualization.
*/
public ModelVisualization getActiveVisualization() {
- return this.activeVisualization;
+ return activeVisualization;
}
/**
- *
+ *
* @return The list of all available visualizations available for the current
* {@link #activeType}.
*/
public List<ModelVisualization> getAvailableModelVisualizations() {
- return this.availableModelVisualizations != null ? this.availableModelVisualizations : Collections.emptyList();
+ return availableModelVisualizations != null ? availableModelVisualizations : Collections.emptyList();
}
/**
- *
+ *
* @return <code>true</code> if the selection listener is disabled,
* <code>false</code> if the visualization is updated on
* selection changes.
@@ -432,7 +432,7 @@
}
/**
- *
+ *
* @param pinned <code>true</code> if the selection listener should be disabled,
* <code>false</code> if the visualization should be updated on
* selection changes.
@@ -443,13 +443,13 @@
/**
* Persist the local state.
- *
+ *
* @param part The part to which this instance is connected.
*/
@PersistState
public void persistState(MPart part) {
Map<String, String> state = part.getPersistedState();
- state.put(LAST_SELECTED_STATE, this.lastSelected.toString());
+ state.put(LAST_SELECTED_STATE, lastSelected.toString());
}
}
diff --git a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/AmaltheaModelElementExpression.java b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/AmaltheaModelElementExpression.java
index 936aa91..0ddc0d9 100644
--- a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/AmaltheaModelElementExpression.java
+++ b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/AmaltheaModelElementExpression.java
@@ -10,7 +10,7 @@
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
- */
+ */
package org.eclipse.app4mc.visualization.ui.handler;
import javax.inject.Named;
@@ -26,10 +26,10 @@
* Imperative expression implementation that checks if the current active selection is an Amalthea model element.
*/
public class AmaltheaModelElementExpression {
-
+
@Evaluate
public boolean evaluate(@Optional @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection) {
- if (selection != null && !selection.isEmpty()
+ if (selection != null && !selection.isEmpty()
&& selection.getFirstElement() instanceof EObject
&& ((EObject)selection.getFirstElement()).eClass().getEPackage().equals(AmaltheaPackage.eINSTANCE)) {
return true;
diff --git a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/OpenVisualizationHandler.java b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/OpenVisualizationHandler.java
index df72992..a0ad667 100644
--- a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/OpenVisualizationHandler.java
+++ b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/OpenVisualizationHandler.java
@@ -29,5 +29,5 @@
MPart part = partService.createPart(VisualizationPart.ID);
partService.showPart(part, PartState.ACTIVATE);
}
-
+
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/PinVisualizationHandler.java b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/PinVisualizationHandler.java
index b6a9015..46ba5f6 100644
--- a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/PinVisualizationHandler.java
+++ b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/PinVisualizationHandler.java
@@ -32,11 +32,11 @@
public void execute(@Active MPart activePart) {
if (activePart.getObject() instanceof VisualizationPart) {
VisualizationPart part = (VisualizationPart) activePart.getObject();
-
+
for (MToolBarElement element : activePart.getToolbar().getChildren()) {
if (element.getElementId().equals("org.eclipse.app4mc.visualization.ui.directtoolitem.pin")) {
MDirectToolItem toolItem = (MDirectToolItem) element;
-
+
boolean pinned = part.isPinned();
part.setPinned(!pinned);
toolItem.setSelected(!pinned);
@@ -44,7 +44,7 @@
}
}
}
-
+
@CanExecute
public boolean canExecute(@Active MPart activePart) {
if (activePart.getObject() instanceof VisualizationPart) {
diff --git a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/ReloadVisualizationHandler.java b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/ReloadVisualizationHandler.java
index 31fbe8a..6c71ef4 100644
--- a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/ReloadVisualizationHandler.java
+++ b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/ReloadVisualizationHandler.java
@@ -38,7 +38,7 @@
}
}
}
-
+
@CanExecute
public boolean canExecute(@Active MPart activePart) {
diff --git a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/SelectInModelHandler.java b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/SelectInModelHandler.java
index ace78b2..3bb1b5f 100644
--- a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/SelectInModelHandler.java
+++ b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/SelectInModelHandler.java
@@ -26,7 +26,7 @@
* Handler that triggers selection on the model editor.
*/
public class SelectInModelHandler {
-
+
@Execute
public void execute(@Active MPart activePart, IEventBroker broker) {
if (activePart.getObject() instanceof VisualizationPart) {
@@ -38,7 +38,7 @@
}
}
}
-
+
@CanExecute
public boolean canExecute(@Active MPart activePart) {
if (activePart.getObject() instanceof VisualizationPart) {
diff --git a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/ShowVisualizationHandler.java b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/ShowVisualizationHandler.java
index 0014316..1e03374 100644
--- a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/ShowVisualizationHandler.java
+++ b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/ShowVisualizationHandler.java
@@ -32,7 +32,7 @@
public void execute(
@Named("app4mc.visualization.id") String visualizationId,
@Active MPart part) {
-
+
VisualizationPart visualizationPart = (VisualizationPart) part.getObject();
visualizationPart.showVisualization(visualizationId);
}
diff --git a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/VisualizationMenuContribution.java b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/VisualizationMenuContribution.java
index ebb249a..e3de3b5 100644
--- a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/VisualizationMenuContribution.java
+++ b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/handler/VisualizationMenuContribution.java
@@ -39,7 +39,7 @@
@AboutToShow
public void aboutToShow(
- List<MMenuElement> items,
+ List<MMenuElement> items,
@Active MPart activePart,
EModelService modelService,
MApplication app) {
@@ -53,13 +53,13 @@
menuItem.setTooltip(modelVisualization.getDescription());
menuItem.setElementId(modelVisualization.getId());
menuItem.setContributorURI("platform:/plugin/org.eclipse.app4mc.visualization.ui");
-
+
menuItem.setType(ItemType.CHECK);
menuItem.setSelected(modelVisualization.getId().equals(part.getActiveVisualization().getId()));
List<MCommand> command = modelService.findElements(
- app,
- "org.eclipse.app4mc.visualization.ui.command.showapp4mcvisualization",
+ app,
+ "org.eclipse.app4mc.visualization.ui.command.showapp4mcvisualization",
MCommand.class);
menuItem.setCommand(command.get(0));
@@ -68,7 +68,7 @@
parameter.setValue(modelVisualization.getId());
menuItem.getParameters().add(parameter);
- items.add(menuItem);
+ items.add(menuItem);
}
}
}
diff --git a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/registry/ModelVisualization.java b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/registry/ModelVisualization.java
index 62d3f05..afed84f 100644
--- a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/registry/ModelVisualization.java
+++ b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/registry/ModelVisualization.java
@@ -24,7 +24,7 @@
* The unique id of the {@link Visualization}.
*/
private final String id;
-
+
/**
* The {@link Visualization} instance.
*/
@@ -34,12 +34,12 @@
* The name of the {@link Visualization}.
*/
private final String name;
-
+
/**
* The description of the {@link Visualization}.
*/
private final String description;
-
+
/**
* The model type under which the visualization is registered and the should be
* injected to the {@link PostConstruct} method.
@@ -47,7 +47,7 @@
private final String type;
/**
- *
+ *
* @param id The unique id of the {@link Visualization}.
* @param visualizationImpl The {@link Visualization} instance.
* @param name The name of the {@link Visualization}.
@@ -63,41 +63,41 @@
this.description = description;
this.type = type;
}
-
+
/**
- *
+ *
* @return The unique id of the {@link Visualization}.
*/
public String getId() {
- return this.id;
+ return id;
}
-
+
/**
- *
+ *
* @return The {@link Visualization} instance.
*/
public Visualization getVisualization() {
return visualizationImpl;
}
-
+
/**
- *
+ *
* @return The name of the {@link Visualization}.
*/
public String getName() {
return name;
}
-
+
/**
- *
+ *
* @return The description of the {@link Visualization}.
*/
public String getDescription() {
return description;
}
-
+
/**
- *
+ *
* @return The model type under which the visualization is registered and the
* should be injected to the {@link PostConstruct} method.
*/
diff --git a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/registry/ModelVisualizationRegistry.java b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/registry/ModelVisualizationRegistry.java
index 02c14e5..8e49a34 100644
--- a/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/registry/ModelVisualizationRegistry.java
+++ b/plugins/org.eclipse.app4mc.visualization.ui/src/org/eclipse/app4mc/visualization/ui/registry/ModelVisualizationRegistry.java
@@ -46,26 +46,26 @@
public class ModelVisualizationRegistry {
private static final Logger LOGGER = LoggerFactory.getLogger(ModelVisualizationRegistry.class);
-
+
private ConcurrentHashMap<String, List<ModelVisualization>> visualizationRegistry = new ConcurrentHashMap<>();
-
+
@Reference(
cardinality = ReferenceCardinality.MULTIPLE,
policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
void bindModelVisualization(Visualization visualization, Map<String, Object> properties) {
-
+
String modelClassName = getModelClassName(visualization, properties);
if (modelClassName != null) {
- List<ModelVisualization> visualizations =
- this.visualizationRegistry.computeIfAbsent(modelClassName, key -> new CopyOnWriteArrayList<ModelVisualization>());
-
+ List<ModelVisualization> visualizations =
+ visualizationRegistry.computeIfAbsent(modelClassName, key -> new CopyOnWriteArrayList<>());
+
String id = (String) properties.getOrDefault("id", visualization.getClass().getName());
if (visualizations.stream().noneMatch(v -> v.getId().equals(id))) {
visualizations.add(new ModelVisualization(
- id,
- visualization,
- (String) properties.getOrDefault("name", visualization.getClass().getSimpleName()),
+ id,
+ visualization,
+ (String) properties.getOrDefault("name", visualization.getClass().getSimpleName()),
(String) properties.getOrDefault("description", null),
modelClassName));
} else {
@@ -79,13 +79,13 @@
void unbindModelVisualization(Visualization visualization, Map<String, Object> properties) {
String modelClassName = getModelClassName(visualization, properties);
if (modelClassName != null) {
- this.visualizationRegistry.remove(modelClassName);
+ visualizationRegistry.remove(modelClassName);
}
}
-
+
/**
* Get all {@link ModelVisualization} objects that are registered for the given classes.
- *
+ *
* @param classes The classes for which the {@link ModelVisualization}s are requested.
* @return All {@link ModelVisualization} objects that are registered for the
* given classes.
@@ -100,10 +100,10 @@
classNames.addAll(allInterfaces.stream().map(Class::getName).collect(Collectors.toList()));
}
}
-
+
return classNames.stream()
.filter(Objects::nonNull)
- .flatMap(name -> this.visualizationRegistry.getOrDefault(name, new ArrayList<>()).stream())
+ .flatMap(name -> visualizationRegistry.getOrDefault(name, new ArrayList<>()).stream())
.collect(Collectors.toList());
}
@@ -112,7 +112,7 @@
* registered. First checks the <i>modelClass</i> component property. If it is
* not set the type of the first parameter of the method annotated with
* {@link PostConstruct} will be returned.
- *
+ *
* @param visualization The {@link Visualization} for which the model class name
* should be returned.
* @param properties The component properties map of the
@@ -123,7 +123,7 @@
private String getModelClassName(Visualization visualization, Map<String, Object> properties) {
// check if property for modelClass is set
String modelClassName = (String) properties.getOrDefault("modelClass", null);
-
+
if (modelClassName == null) {
// else find method annotated with @PostConstruct
Class<? extends Visualization> visuClass = visualization.getClass();
diff --git a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/io/tests/AmaltheaFileHelperTest.java b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/io/tests/AmaltheaFileHelperTest.java
index 4b1face..aafab30 100644
--- a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/io/tests/AmaltheaFileHelperTest.java
+++ b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/io/tests/AmaltheaFileHelperTest.java
@@ -37,35 +37,35 @@
assertNotNull(namespace);
assertEquals("http://app4mc.eclipse.org/amalthea/0.9.9", namespace);
}
-
+
@Test
public void shouldGetNamespaceFromZIPFile() {
String namespace = AmaltheaFileHelper.getNamespace(ZIP_FILE);
assertNotNull(namespace);
assertEquals("http://app4mc.eclipse.org/amalthea/0.9.6", namespace);
}
-
+
@Test
public void shouldGetInvalidNamespaceFromNull() {
String namespace = AmaltheaFileHelper.getNamespace(null);
assertNotNull(namespace);
assertEquals(AmaltheaFileHelper.INVALID, namespace);
}
-
+
@Test
public void shouldGetVersionFromModelFile() {
String version = AmaltheaFileHelper.getModelVersion(MODEL_FILE);
assertNotNull(version);
assertEquals("0.9.9", version);
}
-
+
@Test
public void shouldGetVersionFromZIPFile() {
String version = AmaltheaFileHelper.getModelVersion(ZIP_FILE);
assertNotNull(version);
assertEquals("0.9.6", version);
}
-
+
@Test
public void shouldGetInvalidVersionFromNull() {
String version = AmaltheaFileHelper.getModelVersion(null);
@@ -78,7 +78,7 @@
assertFalse(AmaltheaFileHelper.isModelVersionValid(MODEL_FILE));
assertFalse(AmaltheaFileHelper.isModelVersionValid(ZIP_FILE));
}
-
+
@Test
public void shouldFindValidModelVersion() {
assertTrue(AmaltheaFileHelper.isModelVersionValid(new File("./test-data/HwUtilTestModel-gen.amxmi")));
diff --git a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/AllTests.java b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/AllTests.java
index 28fd2ed..d8689a1 100644
--- a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/AllTests.java
+++ b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/AllTests.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -34,7 +34,7 @@
NameTest.class,
TimeComparisonTest.class,
StandardSchedulerTests.class,
-
+
CustomPropertyUtilsTest.class,
DeploymentUtilsTest.class,
HardwareUtilsTest.class,
diff --git a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/DeviationsTest.java b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/DeviationsTest.java
index 3db9faa..f910516 100644
--- a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/DeviationsTest.java
+++ b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/DeviationsTest.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -35,7 +35,7 @@
public class DeviationsTest {
private static final String MS = "ms";
-
+
AmaltheaFactory fac = AmaltheaFactory.eINSTANCE;
/**
diff --git a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/MetamodelStructureTest.java b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/MetamodelStructureTest.java
index a29a3c1..aea78bf 100644
--- a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/MetamodelStructureTest.java
+++ b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/MetamodelStructureTest.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -46,15 +46,15 @@
@Before
public void setUp() {
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.model.tests");
- this.logger.addAppender(new ConsoleAppender(new PatternLayout("%d{ISO8601} %-5p [%c]: %m%n")));
- this.logger.setLevel(Level.INFO);
+ logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.model.tests");
+ logger.addAppender(new ConsoleAppender(new PatternLayout("%d{ISO8601} %-5p [%c]: %m%n")));
+ logger.setLevel(Level.INFO);
}
@After
public void tearDown() {
- final Enumeration<?> allAppenders = this.logger.getAllAppenders();
+ final Enumeration<?> allAppenders = logger.getAllAppenders();
if (allAppenders != null) {
final Object nextElement = allAppenders.nextElement();
@@ -75,7 +75,7 @@
final AmaltheaPackage amPackage = AmaltheaPackage.eINSTANCE;
- this.logger.info("++++ Metamodel check startet at " + dateFormat.format(new Date()));
+ logger.info("++++ Metamodel check startet at " + dateFormat.format(new Date()));
// Get all classes
@@ -133,7 +133,7 @@
"Illegal references exists in the AMALTHEA metamodel. For detailed info of illegal references -> check the console log ",
!illegalReferencesFound);
- this.logger.info("++++ Metamodel check finished at " + dateFormat.format(new Date()));
+ logger.info("++++ Metamodel check finished at " + dateFormat.format(new Date()));
} // main
@@ -149,9 +149,9 @@
sb.append(target.getName());
if (Level.INFO == level) {
- this.logger.info(sb.toString());
+ logger.info(sb.toString());
} else if (Level.ERROR == level) {
- this.logger.error(sb.toString());
+ logger.error(sb.toString());
}
}
diff --git a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/NameTest.java b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/NameTest.java
index ee2cce1..3d650ec 100644
--- a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/NameTest.java
+++ b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/NameTest.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -53,7 +53,7 @@
AmaltheaExtensions.toPlainString(null, DOT);
}
-
+
@Test
public void testArguments2() {
thrown.expect(IllegalArgumentException.class);
@@ -67,32 +67,32 @@
@Test
public void testStringOperationsPlain() {
- EList<String> segments = new BasicEList<>();
-
+ EList<String> segments = new BasicEList<>();
+
assertEquals(AMALTHEA_EXTENSIONS_TO_PLAIN_STRING, "", AmaltheaExtensions.toPlainString(segments, DOT));
-
+
segments.add("one");
assertEquals(AMALTHEA_EXTENSIONS_TO_PLAIN_STRING, "one", AmaltheaExtensions.toPlainString(segments, DOT));
-
+
segments.add("two");
assertEquals(AMALTHEA_EXTENSIONS_TO_PLAIN_STRING, "one.two", AmaltheaExtensions.toPlainString(segments, DOT));
-
+
segments.add("three");
assertEquals(AMALTHEA_EXTENSIONS_TO_PLAIN_STRING, "one.two.three", AmaltheaExtensions.toPlainString(segments, DOT));
}
@Test
public void testStringOperationsEncoded() {
- EList<String> segments = new BasicEList<>();
-
+ EList<String> segments = new BasicEList<>();
+
assertEquals(AMALTHEA_EXTENSIONS_TO_PLAIN_STRING, "", AmaltheaExtensions.toPlainString(segments, DOT));
-
+
segments.add("one");
assertEquals(AMALTHEA_EXTENSIONS_TO_PLAIN_STRING, "one", AmaltheaExtensions.toPlainString(segments, DOT));
-
+
segments.add("two");
assertEquals(AMALTHEA_EXTENSIONS_TO_PLAIN_STRING, "one.two", AmaltheaExtensions.toPlainString(segments, DOT));
-
+
segments.add("three");
assertEquals(AMALTHEA_EXTENSIONS_TO_PLAIN_STRING, "one.two.three", AmaltheaExtensions.toPlainString(segments, DOT));
}
diff --git a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/TimeComparisonTest.java b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/TimeComparisonTest.java
index 93ff939..34f3de5 100644
--- a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/TimeComparisonTest.java
+++ b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/tests/TimeComparisonTest.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/CustomPropertyUtilsTest.java b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/CustomPropertyUtilsTest.java
index 0422010..27ae1a4 100644
--- a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/CustomPropertyUtilsTest.java
+++ b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/CustomPropertyUtilsTest.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/DeploymentUtilsTest.java b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/DeploymentUtilsTest.java
index e78636b..ed07257 100644
--- a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/DeploymentUtilsTest.java
+++ b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/DeploymentUtilsTest.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019-2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -58,82 +58,82 @@
TaskAllocation taT5 = null;
TaskAllocation taT6 = null;
TaskAllocation taT7 = null;
-
+
@Before
public void initalizeModel() {
amaltheaModel = DeploymentModels.createModel1();
-
+
Set<ProcessingUnit> coreCollector = AmaltheaIndex.getElements(amaltheaModel.getHwModel(), "core1", ProcessingUnit.class);
assertNotNull("Core1 not found ", coreCollector.iterator().next());
core1 = coreCollector.iterator().next();
-
+
coreCollector = AmaltheaIndex.getElements(amaltheaModel.getHwModel(), "core2", ProcessingUnit.class);
assertNotNull("Core2 not found ", coreCollector.iterator().next());
core2 = coreCollector.iterator().next();
-
+
coreCollector = AmaltheaIndex.getElements(amaltheaModel.getHwModel(), "core3", ProcessingUnit.class);
assertNotNull("Core3 not found ", coreCollector.iterator().next());
core3 = coreCollector.iterator().next();
-
+
Set<Task> taskCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "t1", Task.class);
t1 = taskCollector.iterator().next();
assertNotNull("T1 not found", taskCollector.iterator().next());
-
+
taskCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "t2", Task.class);
t2 = taskCollector.iterator().next();
assertNotNull("T2 not found", taskCollector.iterator().next());
-
+
taskCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "t3", Task.class);
t3 = taskCollector.iterator().next();
assertNotNull("T3 not found", taskCollector.iterator().next());
-
+
taskCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "t4", Task.class);
t4 = taskCollector.iterator().next();
assertNotNull("T4 not found", taskCollector.iterator().next());
-
+
taskCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "t5", Task.class);
t5 = taskCollector.iterator().next();
assertNotNull("T5 not found", taskCollector.iterator().next());
-
+
taskCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "t6", Task.class);
t6 = taskCollector.iterator().next();
assertNotNull("T6 not found", taskCollector.iterator().next());
-
+
taskCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "t7", Task.class);
t7 = taskCollector.iterator().next();
assertNotNull("T7 not found", taskCollector.iterator().next());
-
+
Set<ISR> isrCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "isr1", ISR.class);
isr1 = isrCollector.iterator().next();
assertNotNull("ISR1 not found", isrCollector.iterator().next());
-
+
isrCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "isr2", ISR.class);
isr2 = isrCollector.iterator().next();
assertNotNull("ISR2 not found", isrCollector.iterator().next());
-
+
isrCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "isr3", ISR.class);
isr3 = isrCollector.iterator().next();
assertNotNull("ISR3 not found", isrCollector.iterator().next());
-
+
}
-
+
@Test
public void testModelExistance() {
SWModel swModel = amaltheaModel.getSwModel();
assertNotNull("SW model is not loaded", swModel);
-
+
HWModel hwModel = amaltheaModel.getHwModel();
assertNotNull("HW model is not loaded", hwModel);
-
+
OSModel osModel = amaltheaModel.getOsModel();
assertNotNull("OS model is not loaded", osModel);
-
+
MappingModel MappingModel = amaltheaModel.getMappingModel();
assertNotNull("Mapping model is not loaded", MappingModel);
}
-
+
@Test
public void testTaskMapping() {
@@ -141,20 +141,20 @@
assert(tmp.size() == 2);
assert(tmp.contains(t1));
assert(tmp.contains(t3));
-
+
tmp = DeploymentUtil.getTasksMappedToCore(core2, amaltheaModel);
assert(tmp.size() == 3);
assert(tmp.contains(t2));
// assert(tmp.contains(t4));
assert(tmp.contains(t5));
assert(tmp.contains(t6));
-
+
tmp = DeploymentUtil.getTasksMappedToCore(core3, amaltheaModel);
assertNotNull("Empty mapping list is null", tmp);
assert(tmp.size()==0);
}
-
-
+
+
@Test
public void testProcessesMappedToCore() {
Set<Process> tmp = DeploymentUtil.getProcessesMappedToCore(core1, amaltheaModel);
@@ -163,7 +163,7 @@
assert(tmp.contains(t3));
assert(tmp.contains(isr1));
assert(tmp.contains(isr3));
-
+
tmp = DeploymentUtil.getProcessesMappedToCore(core2, amaltheaModel);
assert(tmp.size() == 4);
assert(tmp.contains(t2));
@@ -171,46 +171,46 @@
assert(tmp.contains(t5));
assert(tmp.contains(t6));
assert(tmp.contains(isr2));
-
+
tmp = DeploymentUtil.getProcessesMappedToCore(core3, amaltheaModel);
assertNotNull("Empty mapping list is null", tmp);
assert(tmp.isEmpty());
}
-
+
@Test
public void testISRsMappedToCore() {
Set<ISR> tmp = DeploymentUtil.getISRsMappedToCore(core1, amaltheaModel);
assert(tmp.size() == 2);
assert(tmp.contains(isr1));
assert(tmp.contains(isr3));
-
+
tmp = DeploymentUtil.getISRsMappedToCore(core2, amaltheaModel);
assert(tmp.size() == 1);
assert(tmp.contains(isr2));
-
+
tmp = DeploymentUtil.getISRsMappedToCore(core3, amaltheaModel);
assertNotNull("Empty mapping list is null", tmp);
assert(tmp.isEmpty());
}
-
-
+
+
@Test
public void testAssignedCoreForProcess() {
Set<ProcessingUnit> tmp = DeploymentUtil.getAssignedCoreForProcess(t1);
assert(tmp.size() == 1);
assert(tmp.contains(core1));
-
+
tmp = DeploymentUtil.getAssignedCoreForProcess(t3);
assert(tmp.size() == 1);
assert(tmp.contains(core1));
-
-
+
+
tmp = DeploymentUtil.getAssignedCoreForProcess(isr1);
assert(tmp.size() == 1);
assert(tmp.contains(core1));
-
+
tmp = DeploymentUtil.getAssignedCoreForProcess(isr3);
assert(tmp.size() == 1);
assert(tmp.contains(core1));
@@ -222,25 +222,25 @@
tmp = DeploymentUtil.getAssignedCoreForProcess(t4);
assertNotNull("Nullpointer instead of empty list", tmp);
assert(tmp.isEmpty());
-
+
tmp = DeploymentUtil.getAssignedCoreForProcess(t5);
assert(tmp.size() == 1);
assert(tmp.contains(core2));
-
+
tmp = DeploymentUtil.getAssignedCoreForProcess(t6);
assert(tmp.size() == 1);
assert(tmp.contains(core2));
-
+
tmp = DeploymentUtil.getAssignedCoreForProcess(isr2);
assert(tmp.size() == 1);
assert(tmp.contains(core2));
-
+
tmp = DeploymentUtil.getAssignedCoreForProcess(t7);
assertNotNull("Nullpointer instead of empty list", tmp);
assert(tmp.isEmpty());
}
}
-
-
-
+
+
+
diff --git a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/HardwareUtilsTest.java b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/HardwareUtilsTest.java
index 469ecaf..14dfd46 100644
--- a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/HardwareUtilsTest.java
+++ b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/HardwareUtilsTest.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/RuntimeUtilsTest.java b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/RuntimeUtilsTest.java
index 4f75b34..e563f66 100644
--- a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/RuntimeUtilsTest.java
+++ b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/RuntimeUtilsTest.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -50,71 +50,71 @@
import org.junit.Test;
public class RuntimeUtilsTest {
-
+
Amalthea amaltheaModel;
List<ExecutionNeed> executionNeedsR1;
List<ExecutionNeed> executionNeedsR2;
List<ExecutionNeed> executionNeedsR3;
-
+
DiscreteValueConstant r1_instrConstant = null;
DiscreteValueGaussDistribution r1_instrDeviation = null;
DiscreteValueConstant r2_MAC_Operations = null;
DiscreteValueConstant r1_MAC_Operations = null;
DiscreteValueGaussDistribution r3_MAC_Operations = null;
-
+
Runnable r1 = null;
Runnable r2 = null;
Runnable r3 = null;
-
+
Task t1 = null;
Task t2 = null;
-
+
ProcessingUnitDefinition Pu1_def = null;
ProcessingUnitDefinition Pu2_def = null;
-
+
HwFeature featureIPC_12 = null;
HwFeature featureIPC_08 = null;
HwFeature featureMAC_Operations = null;
-
+
HwFeatureCategory instructions = null;
HwFeatureCategory mac_operations = null;
-
+
ProcessingUnit core1 = null;
ProcessingUnit core2 = null;
-
-
+
+
@Before
public void initalizeModel() {
amaltheaModel = RuntimeModels.createModel1();
Set<Runnable> runnableCollector = AmaltheaIndex.getElements(amaltheaModel, "r1", Runnable.class);
assertNotNull("R1 not found", runnableCollector.iterator().next());
r1 = runnableCollector.iterator().next();
-
+
runnableCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "r2", Runnable.class);
assertNotNull("R2 not found", runnableCollector.iterator().next());
r2 = runnableCollector.iterator().next();
-
+
runnableCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "r3", Runnable.class);
assertNotNull("R3 not found", runnableCollector.iterator().next());
r3 = runnableCollector.iterator().next();
-
+
Set<Task> taskCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "t1", Task.class);
t1 = taskCollector.iterator().next();
assertNotNull("T1 not found", taskCollector.iterator().next());
-
+
taskCollector = AmaltheaIndex.getElements(amaltheaModel.getSwModel(), "t2", Task.class);
t2 = taskCollector.iterator().next();
assertNotNull("T2 not found", taskCollector.iterator().next());
-
+
executionNeedsR1 = new ArrayList<>();
executionNeedsR2 = new ArrayList<>();
executionNeedsR3 = new ArrayList<>();
-
+
for (ActivityGraphItem rItem : r1.getActivityGraph().getItems()) {
if (rItem instanceof ExecutionNeed) {
executionNeedsR1.add((ExecutionNeed)rItem);
-
+
EMap<String, IDiscreteValueDeviation> needs = ((ExecutionNeed)rItem).getNeeds();//.get("Instructions");
for (String key : needs.keySet()) {
if (key.equals("Instructions")) {
@@ -130,13 +130,13 @@
r1_MAC_Operations = (DiscreteValueConstant)needs.get(key);
}
}
- }
+ }
}
}
for (ActivityGraphItem rItem : r2.getActivityGraph().getItems()) {
if (rItem instanceof ExecutionNeed) {
executionNeedsR2.add((ExecutionNeed)rItem);
-
+
EMap<String, IDiscreteValueDeviation> needs = ((ExecutionNeed)rItem).getNeeds();//.get("Instructions");
for (String key : needs.keySet()) {
if (key.equals("MAC_Operations")) {
@@ -144,7 +144,7 @@
r2_MAC_Operations = (DiscreteValueConstant)needs.get(key);
}
}
- }
+ }
}
}
for (ActivityGraphItem rItem : r3.getActivityGraph().getItems()) {
@@ -157,29 +157,29 @@
r3_MAC_Operations = (DiscreteValueGaussDistribution)needs.get(key);
}
}
- }
+ }
}
// executionNeedsR3.addAll(executionNeedsR2);
}
-
+
Set<ProcessingUnitDefinition> puCollector = AmaltheaIndex.getElements(amaltheaModel.getHwModel(), "Pu1_def", ProcessingUnitDefinition.class );
assertNotNull("Pu1 not found", puCollector.iterator().next());
Pu1_def = puCollector.iterator().next();
-
+
puCollector = AmaltheaIndex.getElements(amaltheaModel.getHwModel(), "Pu2_def", ProcessingUnitDefinition.class );
assertNotNull("Pu2 not found", puCollector.iterator().next());
Pu2_def = puCollector.iterator().next();
-
-
+
+
Set<HwFeature> featureCollector = AmaltheaIndex.getElements(amaltheaModel, "IPC_1.2", HwFeature.class);
assertNotNull("Feature IPC_1.2 not found ", featureCollector.iterator().next());
featureIPC_12 = featureCollector.iterator().next();
-
+
featureCollector = AmaltheaIndex.getElements(amaltheaModel, "IPC_0.8", HwFeature.class);
assertNotNull("Feature IPC_0.8 not found ", featureCollector.iterator().next());
featureIPC_08 = featureCollector.iterator().next();
-
+
featureCollector = AmaltheaIndex.getElements(amaltheaModel, "MacUnit_factor", HwFeature.class);
assertNotNull("Feature MacUnit_factor not found ", featureCollector.iterator().next());
featureMAC_Operations = featureCollector.iterator().next();
@@ -187,15 +187,15 @@
Set<ProcessingUnit> coreCollector = AmaltheaIndex.getElements(amaltheaModel.getHwModel(), "core1", ProcessingUnit.class);
assertNotNull("Core1 not found ", coreCollector.iterator().next());
core1 = coreCollector.iterator().next();
-
+
coreCollector = AmaltheaIndex.getElements(amaltheaModel.getHwModel(), "core2", ProcessingUnit.class);
assertNotNull("Core2 not found ", coreCollector.iterator().next());
core2 = coreCollector.iterator().next();
-
+
Set<HwFeatureCategory> catCollector = AmaltheaIndex.getElements(amaltheaModel.getHwModel(), "Instructions", HwFeatureCategory.class);
assertNotNull("Instruction Catogory not found ", catCollector.iterator().next());
instructions = catCollector.iterator().next();
-//
+//
// catCollector = AmaltheaIndex.getElements(amaltheaModel.getHwModel(), "MAC_Operations", HwFeatureCategory.class);
// assertNotNull("MAC_Operations Catogory not found ", catCollector.iterator().next());
// mac_operations = catCollector.iterator().next();
@@ -206,17 +206,17 @@
SWModel swModel = amaltheaModel.getSwModel();
assertNotNull("SW model is not loaded", swModel);
-
+
HWModel hwModel = amaltheaModel.getHwModel();
assertNotNull("HW model is not loaded", hwModel);
-
+
OSModel osModel = amaltheaModel.getOsModel();
assertNotNull("OS model is not loaded", osModel);
-
+
MappingModel MappingModel = amaltheaModel.getMappingModel();
assertNotNull("Mapping model is not loaded", MappingModel);
-
+
}
@Test
@@ -234,21 +234,21 @@
Time r1Bcet = FactoryUtil.createTime(22200000, "PS");
Time r1Acet = FactoryUtil.createTime(22800000, "PS");
Time r1Wcet = FactoryUtil.createTime(23400000, "PS");
-
+
Time r2Time = FactoryUtil.createTime(20000000, "PS");
Time r3Bcet = FactoryUtil.createTime(2700000, "PS");
Time r3Acet = FactoryUtil.createTime(5600000, "PS");
Time r3Wcet = FactoryUtil.createTime(8500000, "PS");
-
+
assertEquals(0, RuntimeUtil.getExecutionTimeForRunnable(r1, core1, null, RuntimeUtil.TimeType.BCET).compareTo((r1Bcet)));
assertEquals(0, RuntimeUtil.getExecutionTimeForRunnable(r1, core1, null, RuntimeUtil.TimeType.ACET).compareTo((r1Acet)));
assertEquals(0, RuntimeUtil.getExecutionTimeForRunnable(r1, core1, null, RuntimeUtil.TimeType.WCET).compareTo((r1Wcet)));
-
+
assertEquals(0, RuntimeUtil.getExecutionTimeForRunnable(r2, core2, null, RuntimeUtil.TimeType.BCET).compareTo((r2Time)));
assertEquals(0, RuntimeUtil.getExecutionTimeForRunnable(r2, core2, null, RuntimeUtil.TimeType.ACET).compareTo((r2Time)));
assertEquals(0, RuntimeUtil.getExecutionTimeForRunnable(r2, core2, null, RuntimeUtil.TimeType.WCET).compareTo((r2Time)));
-
+
assertEquals(0, RuntimeUtil.getExecutionTimeForRunnable(r3, core2, null, RuntimeUtil.TimeType.BCET).compareTo((r3Bcet)));
assertEquals(0, RuntimeUtil.getExecutionTimeForRunnable(r3, core2, null, RuntimeUtil.TimeType.ACET).compareTo((r3Acet)));
assertEquals(0, RuntimeUtil.getExecutionTimeForRunnable(r3, core2, null, RuntimeUtil.TimeType.WCET).compareTo((r3Wcet)));
diff --git a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/WeibullUtilsTest.java b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/WeibullUtilsTest.java
index 31a22fc..abbd5fe 100644
--- a/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/WeibullUtilsTest.java
+++ b/tests/org.eclipse.app4mc.amalthea.model.tests/src/org/eclipse/app4mc/amalthea/model/util/tests/WeibullUtilsTest.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -150,7 +150,7 @@
assertTrue(Math.abs(avg2 - avg1) < 0.01);
}
}
-
+
@Test
public void computeMedian() {
List<List<Double>> testData;
@@ -202,7 +202,7 @@
double cdfMax = mathFunction.cumulativeProbability(max - min);
double rem2 = (1.0 - cdfMax) * 1000.0;
System.out.println(" check: pRemainPromille = " + rem2);
-
+
assertTrue(Math.abs(rem2 - rem1) < 0.01);
}
}
diff --git a/tests/org.eclipse.app4mc.amalthea.validations.sim.tests/src/org/eclipse/app4mc/amalthea/validations/sim/tests/AllTests.java b/tests/org.eclipse.app4mc.amalthea.validations.sim.tests/src/org/eclipse/app4mc/amalthea/validations/sim/tests/AllTests.java
index fb51a97..7b8ab39 100644
--- a/tests/org.eclipse.app4mc.amalthea.validations.sim.tests/src/org/eclipse/app4mc/amalthea/validations/sim/tests/AllTests.java
+++ b/tests/org.eclipse.app4mc.amalthea.validations.sim.tests/src/org/eclipse/app4mc/amalthea/validations/sim/tests/AllTests.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2021 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/tests/org.eclipse.app4mc.amalthea.validations.standard.tests/src/org/eclipse/app4mc/amalthea/validations/standard/tests/AllTests.java b/tests/org.eclipse.app4mc.amalthea.validations.standard.tests/src/org/eclipse/app4mc/amalthea/validations/standard/tests/AllTests.java
index fcbf0d4..a414f7a 100644
--- a/tests/org.eclipse.app4mc.amalthea.validations.standard.tests/src/org/eclipse/app4mc/amalthea/validations/standard/tests/AllTests.java
+++ b/tests/org.eclipse.app4mc.amalthea.validations.standard.tests/src/org/eclipse/app4mc/amalthea/validations/standard/tests/AllTests.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/tests/org.eclipse.app4mc.amalthea.validations.ta.tests/src/org/eclipse/app4mc/amalthea/validations/ta/tests/AllTests.java b/tests/org.eclipse.app4mc.amalthea.validations.ta.tests/src/org/eclipse/app4mc/amalthea/validations/ta/tests/AllTests.java
index 35828c1..2c6e4e9 100644
--- a/tests/org.eclipse.app4mc.amalthea.validations.ta.tests/src/org/eclipse/app4mc/amalthea/validations/ta/tests/AllTests.java
+++ b/tests/org.eclipse.app4mc.amalthea.validations.ta.tests/src/org/eclipse/app4mc/amalthea/validations/ta/tests/AllTests.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2016 Timing-Architects Embedded Systems GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Timing-Architects Embedded Systems GmbH - initial API and implementation
********************************************************************************
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/BaseObject.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/BaseObject.java
index f80fb5d..e7adf58 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/BaseObject.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/BaseObject.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementB1.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementB1.java
index ebf978b..8d3a998 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementB1.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementB1.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementN1.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementN1.java
index 76490b8..fcddaa2 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementN1.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementN1.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementN2.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementN2.java
index cd00279..eda7670 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementN2.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementN2.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementN3.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementN3.java
index e984001..2e26625 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementN3.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementN3.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementS1.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementS1.java
index c7d78b7..2d8e594 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementS1.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementS1.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementS2.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementS2.java
index 1848102..b884010 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementS2.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementS2.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementS3.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementS3.java
index c18ae47..b9230be 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementS3.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/ElementS3.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/NormalObject.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/NormalObject.java
index d6baaa5..bd093c6 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/NormalObject.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/NormalObject.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/Root.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/Root.java
index db9181f..3d2ea35 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/Root.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/Root.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/SpecialObject.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/SpecialObject.java
index b4a2b23..a0e29a2 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/SpecialObject.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/SpecialObject.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/TestmodelFactory.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/TestmodelFactory.java
index ccef92d..487f08b 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/TestmodelFactory.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/TestmodelFactory.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/TestmodelPackage.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/TestmodelPackage.java
index 39b8847..c9914ab 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/TestmodelPackage.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/TestmodelPackage.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/BaseObjectImpl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/BaseObjectImpl.java
index cbbab5f..c5ba854 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/BaseObjectImpl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/BaseObjectImpl.java
@@ -1,26 +1,23 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
import org.eclipse.app4mc.validation.core.test.model.BaseObject;
import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
-
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.MinimalEObjectImpl;
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementB1Impl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementB1Impl.java
index 1efba52..b57b65c 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementB1Impl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementB1Impl.java
@@ -1,22 +1,21 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
import org.eclipse.app4mc.validation.core.test.model.ElementB1;
import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
-
import org.eclipse.emf.ecore.EClass;
/**
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementN1Impl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementN1Impl.java
index f26c147..9311203 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementN1Impl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementN1Impl.java
@@ -1,22 +1,21 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
import org.eclipse.app4mc.validation.core.test.model.ElementN1;
import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
-
import org.eclipse.emf.ecore.EClass;
/**
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementN2Impl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementN2Impl.java
index 86a949e..a929ead 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementN2Impl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementN2Impl.java
@@ -1,22 +1,21 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
import org.eclipse.app4mc.validation.core.test.model.ElementN2;
import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
-
import org.eclipse.emf.ecore.EClass;
/**
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementN3Impl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementN3Impl.java
index 310d114..4cd938e 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementN3Impl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementN3Impl.java
@@ -1,22 +1,21 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
import org.eclipse.app4mc.validation.core.test.model.ElementN3;
import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
-
import org.eclipse.emf.ecore.EClass;
/**
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementS1Impl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementS1Impl.java
index 44bbeaf..f55255c 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementS1Impl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementS1Impl.java
@@ -1,22 +1,21 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
import org.eclipse.app4mc.validation.core.test.model.ElementS1;
import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
-
import org.eclipse.emf.ecore.EClass;
/**
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementS2Impl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementS2Impl.java
index 4f6a8a7..9f2a32e 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementS2Impl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementS2Impl.java
@@ -1,22 +1,21 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
import org.eclipse.app4mc.validation.core.test.model.ElementS2;
import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
-
import org.eclipse.emf.ecore.EClass;
/**
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementS3Impl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementS3Impl.java
index c392e79..3603ed5 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementS3Impl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/ElementS3Impl.java
@@ -1,22 +1,21 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
import org.eclipse.app4mc.validation.core.test.model.ElementS3;
import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
-
import org.eclipse.emf.ecore.EClass;
/**
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/NormalObjectImpl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/NormalObjectImpl.java
index bd48b0e..96b0c72 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/NormalObjectImpl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/NormalObjectImpl.java
@@ -1,26 +1,23 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
import org.eclipse.app4mc.validation.core.test.model.NormalObject;
import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
-
import org.eclipse.emf.common.notify.Notification;
-
import org.eclipse.emf.ecore.EClass;
-
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/RootImpl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/RootImpl.java
index 92f1396..bd63a81 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/RootImpl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/RootImpl.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
@@ -21,14 +21,10 @@
import org.eclipse.app4mc.validation.core.test.model.Root;
import org.eclipse.app4mc.validation.core.test.model.SpecialObject;
import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
-
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.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
@@ -112,7 +108,7 @@
@Override
public EList<BaseObject> getBaseObjects() {
if (baseObjects == null) {
- baseObjects = new EObjectContainmentEList<BaseObject>(BaseObject.class, this, TestmodelPackage.ROOT__BASE_OBJECTS);
+ baseObjects = new EObjectContainmentEList<>(BaseObject.class, this, TestmodelPackage.ROOT__BASE_OBJECTS);
}
return baseObjects;
}
@@ -125,7 +121,7 @@
@Override
public EList<NormalObject> getNormalObjects() {
if (normalObjects == null) {
- normalObjects = new EObjectContainmentEList<NormalObject>(NormalObject.class, this, TestmodelPackage.ROOT__NORMAL_OBJECTS);
+ normalObjects = new EObjectContainmentEList<>(NormalObject.class, this, TestmodelPackage.ROOT__NORMAL_OBJECTS);
}
return normalObjects;
}
@@ -138,7 +134,7 @@
@Override
public EList<SpecialObject> getSpecialObjects() {
if (specialObjects == null) {
- specialObjects = new EObjectContainmentEList<SpecialObject>(SpecialObject.class, this, TestmodelPackage.ROOT__SPECIAL_OBJECTS);
+ specialObjects = new EObjectContainmentEList<>(SpecialObject.class, this, TestmodelPackage.ROOT__SPECIAL_OBJECTS);
}
return specialObjects;
}
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/SpecialObjectImpl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/SpecialObjectImpl.java
index 3a25b18..050f92d 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/SpecialObjectImpl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/SpecialObjectImpl.java
@@ -1,26 +1,23 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
import org.eclipse.app4mc.validation.core.test.model.SpecialObject;
import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
-
import org.eclipse.emf.common.notify.Notification;
-
import org.eclipse.emf.ecore.EClass;
-
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/TestmodelFactoryImpl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/TestmodelFactoryImpl.java
index bd9f981..da23267 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/TestmodelFactoryImpl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/TestmodelFactoryImpl.java
@@ -1,27 +1,33 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
-import org.eclipse.app4mc.validation.core.test.model.*;
-
+import org.eclipse.app4mc.validation.core.test.model.ElementB1;
+import org.eclipse.app4mc.validation.core.test.model.ElementN1;
+import org.eclipse.app4mc.validation.core.test.model.ElementN2;
+import org.eclipse.app4mc.validation.core.test.model.ElementN3;
+import org.eclipse.app4mc.validation.core.test.model.ElementS1;
+import org.eclipse.app4mc.validation.core.test.model.ElementS2;
+import org.eclipse.app4mc.validation.core.test.model.ElementS3;
+import org.eclipse.app4mc.validation.core.test.model.Root;
+import org.eclipse.app4mc.validation.core.test.model.TestmodelFactory;
+import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
-
import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
import org.eclipse.emf.ecore.plugin.EcorePlugin;
/**
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/TestmodelPackageImpl.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/TestmodelPackageImpl.java
index bdd4ccd..d531902 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/TestmodelPackageImpl.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/impl/TestmodelPackageImpl.java
@@ -1,15 +1,15 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.impl;
@@ -27,12 +27,10 @@
import org.eclipse.app4mc.validation.core.test.model.SpecialObject;
import org.eclipse.app4mc.validation.core.test.model.TestmodelFactory;
import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
-
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
-
import org.eclipse.emf.ecore.impl.EPackageImpl;
/**
@@ -465,16 +463,16 @@
// Set bounds for type parameters
// Add supertypes to classes
- normalObjectEClass.getESuperTypes().add(this.getBaseObject());
- specialObjectEClass.getESuperTypes().add(this.getBaseObject());
- rootEClass.getESuperTypes().add(this.getBaseObject());
- elementB1EClass.getESuperTypes().add(this.getBaseObject());
- elementN1EClass.getESuperTypes().add(this.getNormalObject());
- elementN2EClass.getESuperTypes().add(this.getNormalObject());
- elementN3EClass.getESuperTypes().add(this.getNormalObject());
- elementS1EClass.getESuperTypes().add(this.getSpecialObject());
- elementS2EClass.getESuperTypes().add(this.getSpecialObject());
- elementS3EClass.getESuperTypes().add(this.getSpecialObject());
+ normalObjectEClass.getESuperTypes().add(getBaseObject());
+ specialObjectEClass.getESuperTypes().add(getBaseObject());
+ rootEClass.getESuperTypes().add(getBaseObject());
+ elementB1EClass.getESuperTypes().add(getBaseObject());
+ elementN1EClass.getESuperTypes().add(getNormalObject());
+ elementN2EClass.getESuperTypes().add(getNormalObject());
+ elementN3EClass.getESuperTypes().add(getNormalObject());
+ elementS1EClass.getESuperTypes().add(getSpecialObject());
+ elementS2EClass.getESuperTypes().add(getSpecialObject());
+ elementS3EClass.getESuperTypes().add(getSpecialObject());
// Initialize classes, features, and operations; add parameters
initEClass(baseObjectEClass, BaseObject.class, "BaseObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -489,9 +487,9 @@
initEAttribute(getSpecialObject_SpecialCount(), ecorePackage.getEInt(), "specialCount", null, 0, 1, SpecialObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(rootEClass, Root.class, "Root", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getRoot_BaseObjects(), this.getBaseObject(), null, "baseObjects", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getRoot_NormalObjects(), this.getNormalObject(), null, "normalObjects", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getRoot_SpecialObjects(), this.getSpecialObject(), null, "specialObjects", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getRoot_BaseObjects(), getBaseObject(), null, "baseObjects", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getRoot_NormalObjects(), getNormalObject(), null, "normalObjects", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getRoot_SpecialObjects(), getSpecialObject(), null, "specialObjects", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(elementB1EClass, ElementB1.class, "ElementB1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/util/TestmodelAdapterFactory.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/util/TestmodelAdapterFactory.java
index 0df4c12..f57e376 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/util/TestmodelAdapterFactory.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/util/TestmodelAdapterFactory.java
@@ -1,26 +1,34 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.util;
-import org.eclipse.app4mc.validation.core.test.model.*;
-
+import org.eclipse.app4mc.validation.core.test.model.BaseObject;
+import org.eclipse.app4mc.validation.core.test.model.ElementB1;
+import org.eclipse.app4mc.validation.core.test.model.ElementN1;
+import org.eclipse.app4mc.validation.core.test.model.ElementN2;
+import org.eclipse.app4mc.validation.core.test.model.ElementN3;
+import org.eclipse.app4mc.validation.core.test.model.ElementS1;
+import org.eclipse.app4mc.validation.core.test.model.ElementS2;
+import org.eclipse.app4mc.validation.core.test.model.ElementS3;
+import org.eclipse.app4mc.validation.core.test.model.NormalObject;
+import org.eclipse.app4mc.validation.core.test.model.Root;
+import org.eclipse.app4mc.validation.core.test.model.SpecialObject;
+import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
-
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-
import org.eclipse.emf.ecore.EObject;
/**
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/util/TestmodelSwitch.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/util/TestmodelSwitch.java
index 4650ca2..6fe7e8b 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/util/TestmodelSwitch.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/model/util/TestmodelSwitch.java
@@ -1,24 +1,33 @@
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Generated using Eclipse EMF
- *
+ *
* *******************************************************************************
*/
package org.eclipse.app4mc.validation.core.test.model.util;
-import org.eclipse.app4mc.validation.core.test.model.*;
-
+import org.eclipse.app4mc.validation.core.test.model.BaseObject;
+import org.eclipse.app4mc.validation.core.test.model.ElementB1;
+import org.eclipse.app4mc.validation.core.test.model.ElementN1;
+import org.eclipse.app4mc.validation.core.test.model.ElementN2;
+import org.eclipse.app4mc.validation.core.test.model.ElementN3;
+import org.eclipse.app4mc.validation.core.test.model.ElementS1;
+import org.eclipse.app4mc.validation.core.test.model.ElementS2;
+import org.eclipse.app4mc.validation.core.test.model.ElementS3;
+import org.eclipse.app4mc.validation.core.test.model.NormalObject;
+import org.eclipse.app4mc.validation.core.test.model.Root;
+import org.eclipse.app4mc.validation.core.test.model.SpecialObject;
+import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
-
import org.eclipse.emf.ecore.util.Switch;
/**
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TestmodelValidation.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TestmodelValidation.java
index c534fa0..d78f20e 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TestmodelValidation.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TestmodelValidation.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -36,7 +36,7 @@
}
// helper methods
-
+
protected void addIssue(final List<ValidationDiagnostic> results, final EObject object, final EStructuralFeature feature, final String message) {
results.add(new ValidationDiagnostic(message, object, feature));
}
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TmBase.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TmBase.java
index 6e20d55..4b3ad30 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TmBase.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TmBase.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -33,7 +33,7 @@
public EClassifier getEClassifier() {
return ePackage.getBaseObject();
}
-
+
@Override
public void validate(EObject eObject, List<ValidationDiagnostic> results) {
if (eObject instanceof BaseObject) {
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TmNormal.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TmNormal.java
index 0b97cc1..98f8e09 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TmNormal.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TmNormal.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TmSpecial.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TmSpecial.java
index a59a69d..4c69088 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TmSpecial.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/test/validations/TmSpecial.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2019 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -51,7 +51,7 @@
private long countChar(final String input, final Character c) {
if (input == null) return 0;
-
+
return input.chars().filter(ch -> ch == c).count();
}
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/tests/ExecutorTest.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/tests/ExecutorTest.java
index f86de1a..99df7e0 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/tests/ExecutorTest.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/tests/ExecutorTest.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/tests/ProfileTest.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/tests/ProfileTest.java
index 779f12f..4afb13d 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/tests/ProfileTest.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/tests/ProfileTest.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
@@ -67,7 +67,7 @@
// TM-BaseObject(WARNING - BaseObject)
// * Name must not be null or empty
//------------------------------------------------------------------------------
-
+
CachedProfile cp2 = man.getCachedProfile(NormalProfile.class);
assertEquals(1, cp2.getCachedProfiles().size()); // one profile
diff --git a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/tests/TestModels.java b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/tests/TestModels.java
index 4008554..e5fb33a 100644
--- a/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/tests/TestModels.java
+++ b/tests/org.eclipse.app4mc.validation.core.tests/src/org/eclipse/app4mc/validation/core/tests/TestModels.java
@@ -1,13 +1,13 @@
/**
********************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
- *
+ *
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************