Commit 13d1e659 authored by Dennis Hendriks's avatar Dennis Hendriks
Browse files

Merge branch 'develop' into 'master'

#265 develop to master for v0.5

See merge request !292
parents 04755f71 bf4aee9d
Pipeline #2834 passed with stage
in 0 seconds
......@@ -24,9 +24,7 @@ The release notes may refer to issues, the details for which can be found at the
See also the Eclipse ESCET link:https://eclipse.org/escet/release-notes.html[toolkit release notes] covering those aspects that are common to the various Eclipse ESCET tools.
=== Version 0.5
TBD
=== Version 0.5 (2022-03-29)
Improvements and fixes:
......
......@@ -18,7 +18,6 @@ Require-Bundle: org.eclipse.escet.common.app.framework;bundle-version="0.5.0",
org.eclipse.emf.ecore;bundle-version="2.20.0",
org.eclipse.escet.chi.codegen;bundle-version="0.5.0",
org.eclipse.escet.common.box;bundle-version="0.5.0",
org.apache.commons.lang;bundle-version="2.6.0",
org.eclipse.core.runtime;bundle-version="3.17.0",
org.eclipse.escet.setext.runtime;bundle-version="0.5.0",
org.eclipse.ui;bundle-version="3.115.0"
......
......@@ -25,7 +25,6 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature.Setting;
import org.eclipse.emf.ecore.util.EcoreUtil;
......@@ -100,7 +99,7 @@ public class RemoveRequirements implements CifToCifTransformation {
String msg = "Removing requirements from a CIF specification failed due to the remaining part of the "
+ "specification using declarations that are declared in the requirement automata that are to be "
+ "removed, or a location of a requirement automaton contains invariants that cannot be removed:\n "
+ "- " + StringUtils.join(sortedstrings(problemMessages), "\n - ");
+ "- " + String.join("\n - ", sortedstrings(problemMessages));
throw new CifToCifPreconditionException(msg);
}
}
......
......@@ -95,7 +95,7 @@ public class Cif2Mcrl2PreChecker {
Collections.sort(problems, Strings.SORTER);
if (!problems.isEmpty()) {
String msg = "CIF to mCRL2 transformation failed due to unsatisfied preconditions:\n - "
+ StringUtils.join(problems, "\n - ");
+ String.join("\n - ", problems);
throw new UnsupportedException(msg);
}
}
......
......@@ -24,7 +24,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.escet.cif.cif2mcrl2.storage.AutomatonData;
import org.eclipse.escet.cif.cif2mcrl2.storage.VariableData;
import org.eclipse.escet.cif.cif2mcrl2.tree.AutomatonProcessNode;
......@@ -91,7 +90,7 @@ public class InstanceTreeVerifier {
if (!problems.isEmpty()) {
Collections.sort(problems, Strings.SORTER);
String msg = "CIF to mCRL2 transformation failed due to missing automata or discrete variables:\n - "
+ StringUtils.join(problems, "\n - ");
+ String.join("\n - ", problems);
throw new UnsupportedException(msg);
}
......
......@@ -21,7 +21,6 @@ import static org.eclipse.escet.common.java.Strings.fmt;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.escet.cif.cif2mcrl2.NameMaps;
import org.eclipse.escet.cif.cif2mcrl2.storage.VariableData;
import org.eclipse.escet.common.box.VBox;
......@@ -104,7 +103,7 @@ public class VariableProcessNode extends ProcessNode {
actions.add(varSync);
actions.add(behRead);
actions.add(behWrite);
String actionsStr = StringUtils.join(actions, ", ");
String actionsStr = String.join(", ", actions);
code.add(fmt("act %s : %s;", actionsStr, varType));
code.add();
......
......@@ -19,9 +19,7 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="3.13.600",
org.eclipse.escet.common.typechecker;bundle-version="0.5.0",
org.eclipse.escet.cif.metamodel.java;bundle-version="0.5.0",
org.eclipse.escet.common.box;bundle-version="0.5.0",
org.apache.commons.lang;bundle-version="2.6.0",
org.eclipse.escet.common.emf;bundle-version="0.5.0",
org.apache.commons.io;bundle-version="2.6.0"
org.eclipse.escet.common.emf;bundle-version="0.5.0"
Export-Package: org.eclipse.escet.cif.cif2plc,
org.eclipse.escet.cif.cif2plc.options,
org.eclipse.escet.cif.cif2plc.plcdata,
......
......@@ -31,7 +31,6 @@ import static org.eclipse.escet.common.java.Strings.fmt;
import java.util.Collections;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.escet.cif.cif2plc.options.PlcOutputTypeOption;
......@@ -119,7 +118,7 @@ public class CifToPlcPreChecker extends CifWalker {
Collections.sort(problems, Strings.SORTER);
if (!problems.isEmpty()) {
String msg = "CIF PLC code generator failed due to unsatisfied preconditions:\n - "
+ StringUtils.join(problems, "\n - ");
+ String.join("\n - ", problems);
throw new UnsupportedException(msg);
}
}
......
......@@ -49,7 +49,6 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.escet.cif.cif2cif.AddDefaultInitialValues;
import org.eclipse.escet.cif.cif2cif.ElimComponentDefInst;
......@@ -1307,7 +1306,7 @@ public class CifToPlcTrans {
for (Expression pred: preds) {
txts.add(fmt("(%s)", transExpr(pred, state, init)));
}
return StringUtils.join(txts, " AND ");
return String.join(" AND ", txts);
}
/**
......@@ -1636,7 +1635,7 @@ public class CifToPlcTrans {
for (Expression param: params) {
paramTxts.add(transExpr(param, state, init));
}
String paramsTxt = StringUtils.join(paramTxts, ", ");
String paramsTxt = String.join(", ", paramTxts);
Expression fexpr = fcexpr.getFunction();
if (fexpr instanceof FunctionExpression) {
......@@ -1877,7 +1876,7 @@ public class CifToPlcTrans {
// case we can't use literals, so we generate a function per array
// type.
if (init) {
return fmt("[%s]", StringUtils.join(elemTxts, ", "));
return fmt("[%s]", String.join(", ", elemTxts));
} else {
ListType ltype = (ListType)normalizeType(lexpr.getType());
List<String> argTxts = listc(lexpr.getElements().size());
......@@ -1911,7 +1910,7 @@ public class CifToPlcTrans {
String fieldTxt = getPlcName(field);
fieldTxts.add(fmt("%s:=%s", fieldTxt, elemTxts.get(i)));
}
return fmt("(%s)", StringUtils.join(fieldTxts, ", "));
return fmt("(%s)", String.join(", ", fieldTxts));
} else {
TupleType ttype = (TupleType)normalizeType(texpr.getType());
List<String> argTxts = listc(texpr.getFields().size());
......@@ -2495,7 +2494,7 @@ public class CifToPlcTrans {
// Non-formal syntax.
if (!useFormal) {
return fmt("%s(%s)", funcName, StringUtils.join(valueTxts, ", "));
return fmt("%s(%s)", funcName, String.join(", ", valueTxts));
}
// Formal syntax.
......@@ -2504,6 +2503,6 @@ public class CifToPlcTrans {
for (int i = 0; i < argNames.size(); i++) {
argTxts.add(argNames.get(i) + ":=" + valueTxts.get(i));
}
return fmt("%s(%s)", funcName, StringUtils.join(argTxts, ", "));
return fmt("%s(%s)", funcName, String.join(", ", argTxts));
}
}
......@@ -15,7 +15,6 @@ package org.eclipse.escet.cif.cif2plc.plcdata;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.eclipse.escet.common.box.Box;
import org.eclipse.escet.common.box.TextBox;
......@@ -35,6 +34,6 @@ public class PlcEnumType extends PlcType {
@Override
public Box toBox() {
return new TextBox("(%s)", StringUtils.join(literals, ", "));
return new TextBox("(%s)", String.join(", ", literals));
}
}
......@@ -17,7 +17,6 @@ Require-Bundle: org.eclipse.escet.common.app.framework;bundle-version="0.5.0",
org.eclipse.escet.cif.typechecker;bundle-version="0.5.0",
org.eclipse.escet.common.typechecker;bundle-version="0.5.0",
org.eclipse.escet.cif.metamodel.java;bundle-version="0.5.0",
org.apache.commons.lang;bundle-version="2.6.0",
org.eclipse.escet.common.emf;bundle-version="0.5.0",
org.eclipse.escet.common.eclipse.ui;bundle-version="0.5.0",
org.eclipse.core.resources;bundle-version="3.13.600"
......
......@@ -32,7 +32,6 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.escet.cif.common.CifEvalException;
import org.eclipse.escet.cif.common.CifTextUtils;
......@@ -119,7 +118,7 @@ public class CifToSupremicaPreChecker extends CifWalker {
Collections.sort(problems, Strings.SORTER);
if (!problems.isEmpty()) {
String msg = "CIF to Supremica transformation failed due to unsatisfied preconditions:\n - "
+ StringUtils.join(problems, "\n - ");
+ String.join("\n - ", problems);
throw new UnsupportedException(msg);
}
}
......
......@@ -17,7 +17,6 @@ Require-Bundle: org.eclipse.escet.common.app.framework;bundle-version="0.5.0",
org.eclipse.escet.cif.typechecker;bundle-version="0.5.0",
org.eclipse.escet.common.typechecker;bundle-version="0.5.0",
org.eclipse.escet.cif.common;bundle-version="0.5.0",
org.apache.commons.lang;bundle-version="2.6.0",
org.eclipse.escet.cif.metamodel.java;bundle-version="0.5.0",
org.eclipse.escet.cif.cif2cif;bundle-version="0.5.0",
org.eclipse.escet.common.box;bundle-version="0.5.0"
......
......@@ -34,7 +34,6 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.lang.StringUtils;
import org.eclipse.escet.cif.cif2cif.ElimAlgVariables;
import org.eclipse.escet.cif.cif2cif.ElimComponentDefInst;
import org.eclipse.escet.cif.cif2cif.ElimMonitors;
......@@ -485,7 +484,7 @@ public class CifToUppaal {
assignmentTxts.add(asgn);
}
assignmentTxts.add(fmt("%s = %d", getUppaalName(aut, "LP_"), targetIdx));
String asgnTxt = StringUtils.join(assignmentTxts, ", ");
String asgnTxt = String.join(", ", assignmentTxts);
// Add assignment 'label' element.
Element asgnElem = doc.createElement("label");
......@@ -615,7 +614,7 @@ public class CifToUppaal {
for (Automaton aut: automata) {
txts.add(fmt("%s = %s", getUppaalName(aut, "OLDLP_"), getUppaalName(aut, "LP_")));
}
return StringUtils.join(txts, ", ");
return String.join(", ", txts);
}
/**
......@@ -636,7 +635,7 @@ public class CifToUppaal {
instantiations.add(getUppaalName(sendAut, null));
txt.add();
txt.add("system %s;", StringUtils.join(instantiations, ", "));
txt.add("system %s;", String.join(", ", instantiations));
// Add 'system' element.
Element systemElem = doc.createElement("system");
......@@ -690,7 +689,7 @@ public class CifToUppaal {
}
txts.add(txt);
}
return StringUtils.join(txts, " && ");
return String.join(" && ", txts);
}
/**
......
......@@ -28,7 +28,6 @@ import static org.eclipse.escet.common.java.Strings.fmt;
import java.util.Collections;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.escet.cif.common.CifEvalException;
import org.eclipse.escet.cif.common.CifEvalUtils;
......@@ -109,7 +108,7 @@ public class CifToUppaalPreChecker extends CifWalker {
Collections.sort(problems, Strings.SORTER);
if (!problems.isEmpty()) {
String msg = "CIF to UPPAAL transformation failed due to unsatisfied preconditions:\n - "
+ StringUtils.join(problems, "\n - ");
+ String.join("\n - ", problems);
throw new UnsupportedException(msg);
}
}
......
......@@ -31,7 +31,6 @@ import java.util.Collections;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.escet.cif.cif2yed.options.ModelFilter;
import org.eclipse.escet.cif.cif2yed.options.ModelFiltersOption;
import org.eclipse.escet.cif.common.CifEdgeUtils;
......@@ -862,7 +861,7 @@ public class CifToYedModelDiagram extends CifToYedDiagram {
}
// Get full label text.
String text = StringUtils.join(texts, "\n");
String text = String.join("\n", texts);
// Add edge label.
Element edgeLblElem = doc.createElement("y:EdgeLabel");
......
......@@ -1722,7 +1722,7 @@ public class CifToYedRelationsDiagram extends CifToYedDiagram {
List<String> commonPrefix = getCommonPrefix(srcId, tgtId);
for (int i = commonPrefix.size(); i > 0; i--) {
List<String> prefix = commonPrefix.subList(0, i);
String instId = StringUtils.join(prefix, ":");
String instId = String.join(":", prefix);
if (instIds.contains(instId)) {
elem.getParentNode().removeChild(elem);
return;
......@@ -1804,7 +1804,7 @@ public class CifToYedRelationsDiagram extends CifToYedDiagram {
String[] parts = StringUtils.split(id, ":");
for (int i = parts.length - 1; i > 0; i--) {
String[] prefix = (String[])ArrayUtils.subarray(parts, 0, i);
String instId = StringUtils.join(prefix, ":");
String instId = String.join(":", prefix);
if (instIds.contains(instId)) {
elem.getParentNode().removeChild(elem);
return;
......
......@@ -20,7 +20,6 @@ Require-Bundle: org.eclipse.escet.common.app.framework;bundle-version="0.5.0",
org.eclipse.escet.cif.metamodel.java;bundle-version="0.5.0",
org.apache.commons.io;bundle-version="2.6.0",
org.eclipse.escet.common.box;bundle-version="0.5.0",
org.apache.commons.lang;bundle-version="2.6.0",
org.eclipse.escet.common.emf;bundle-version="0.5.0"
Bundle-Vendor: Eclipse ESCET
Export-Package: org.eclipse.escet.cif.codegen,
......
......@@ -31,7 +31,6 @@ import static org.eclipse.escet.common.java.Strings.fmt;
import java.util.Collections;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.escet.cif.common.CifEvalException;
import org.eclipse.escet.cif.common.CifValueUtils;
......@@ -108,7 +107,7 @@ public class CodeGenPreChecker extends CifWalker {
Collections.sort(problems, Strings.SORTER);
if (!problems.isEmpty()) {
String msg = "CIF code generator failed due to unsatisfied preconditions:\n - "
+ StringUtils.join(problems, "\n - ");
+ String.join("\n - ", problems);
throw new UnsupportedException(msg);
}
}
......
......@@ -38,7 +38,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.escet.cif.codegen.CodeContext;
import org.eclipse.escet.cif.codegen.CodeGen;
import org.eclipse.escet.cif.codegen.CurlyBraceIfElseGenerator;
......@@ -803,7 +802,7 @@ public class C89CodeGen extends CodeGen {
if (conds.size() == 1) {
return conds.get(0);
}
return StringUtils.join(conds, " || ");
return String.join(" || ", conds);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment