diff --git a/.vscode/extensions.json b/.vscode/extensions.json
deleted file mode 100644
index c338990..0000000
--- a/.vscode/extensions.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "recommendations": [
- "runem.lit-plugin",
- "vscjava.vscode-java-pack",
- "pivotal.vscode-spring-boot",
- ],
- "unwantedRecommendations": []
-}
diff --git a/pom.xml b/pom.xml
index d53ccfb..886b267 100644
--- a/pom.xml
+++ b/pom.xml
@@ -206,21 +206,6 @@
org.jacoco
jacoco-maven-plugin
0.8.6
-
-
-
- prepare-agent
-
-
-
-
- report
- test
-
- report
-
-
-
diff --git a/src/main/java/edu/kit/typicalc/model/type/UnificationUtil.java b/src/main/java/edu/kit/typicalc/model/type/UnificationUtil.java
index 52092d4..bd43915 100644
--- a/src/main/java/edu/kit/typicalc/model/type/UnificationUtil.java
+++ b/src/main/java/edu/kit/typicalc/model/type/UnificationUtil.java
@@ -10,7 +10,7 @@ import java.util.List;
import java.util.Optional;
/**
- * Utility class to avoid unification logic duplication in type methods.
+ * Utility class to avoid unification logic duplication in type methods (constrainEqualTo*).
*
* @see Type
*/
@@ -50,7 +50,7 @@ final class UnificationUtil {
}
static Result namedNamed(NamedType a, NamedType b) {
- if (a != b) {
+ if (!a.equals(b)) {
return new Result<>(null, UnificationError.DIFFERENT_TYPES);
} else {
return new Result<>(new UnificationActions());
diff --git a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/LatexCreatorConstants.java b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/LatexCreatorConstants.java
index a5b6587..df7041a 100644
--- a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/LatexCreatorConstants.java
+++ b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/LatexCreatorConstants.java
@@ -9,7 +9,7 @@ public final class LatexCreatorConstants {
protected static final String IN = "in";
protected static final String CONSTRAINT_SET = "C";
- protected static final String NEW_LINE = System.lineSeparator();
+ protected static final String NEW_LINE = "\n";
protected static final String SPACE = " ";
protected static final String DOLLAR_SIGN = "$";
protected static final String EQUALS = "=";
diff --git a/src/main/java/edu/kit/typicalc/view/main/InputBar.java b/src/main/java/edu/kit/typicalc/view/main/InputBar.java
index 5565771..65ea20e 100644
--- a/src/main/java/edu/kit/typicalc/view/main/InputBar.java
+++ b/src/main/java/edu/kit/typicalc/view/main/InputBar.java
@@ -57,7 +57,6 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver {
inputField.setId(INPUT_FIELD_ID);
inputField.setClearButtonVisible(true);
inputField.setMaxLength(1000); // TODO: perhaps remove the error message? more than 1000 can't be entered now
- inputField.setValueChangeMode(ValueChangeMode.EAGER); // TODO: this causes a lot of network traffic
// attach a listener that replaces \ with λ
// JavaScript is used because Vaadin does not have APIs for selectionStart/selectionEnd
// and this will be much faster than a bunch of network round trips per character entered!
@@ -95,8 +94,7 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver {
*/
protected void inferTerm(String term) {
inputField.setValue(term);
- UI.getCurrent().getPage().executeJs(
- String.format("document.getElementById('%s').click()", INFER_BUTTON_ID));
+ UI.getCurrent().getPage().executeJs("document.getElementById($0).click()", INFER_BUTTON_ID);
}
private void onTypeInferButtonClick(Consumer>> callback) {
diff --git a/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionField.java b/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionField.java
index 5a0dd1d..8fe6e70 100644
--- a/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionField.java
+++ b/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionField.java
@@ -17,35 +17,34 @@ import com.vaadin.flow.i18n.LocaleChangeObserver;
public class TypeAssumptionField extends HorizontalLayout implements LocaleChangeObserver {
private static final long serialVersionUID = -81579298585584658L;
-
+
/*
* IDs for the imported .css-file
*/
private static final String MINUS_ICON_ID = "minusIcon";
private static final String ASS_DELETE_BUTTON_ID = "assDeleteButton";
private static final String ASSUMPTIONS_FIELD_ID = "typeAssumptionField";
-
- private final Button deleteButton;
+
private final TextField variableInputField;
private final TextField typeInputField;
-
- protected TypeAssumptionField(final Consumer deleteSelf) {
+
+ protected TypeAssumptionField(Consumer deleteSelf) {
variableInputField = new TextField();
variableInputField.setLabel(getTranslation("root.variable"));
typeInputField = new TextField();
typeInputField.setLabel(getTranslation("root.type"));
Icon minusIcon = new Icon(VaadinIcon.MINUS_CIRCLE);
minusIcon.setId(MINUS_ICON_ID);
- deleteButton = new Button(minusIcon, event -> deleteSelf.accept(this));
+ Button deleteButton = new Button(minusIcon, event -> deleteSelf.accept(this));
deleteButton.setId(ASS_DELETE_BUTTON_ID);
add(variableInputField, typeInputField, deleteButton);
setId(ASSUMPTIONS_FIELD_ID);
}
-
+
protected String getVariable() {
return variableInputField.getOptionalValue().orElse(StringUtils.EMPTY);
}
-
+
protected String getType() {
return typeInputField.getOptionalValue().orElse(StringUtils.EMPTY);
}
@@ -55,5 +54,5 @@ public class TypeAssumptionField extends HorizontalLayout implements LocaleChang
variableInputField.setLabel(getTranslation("root.variable"));
typeInputField.setLabel(getTranslation("root.type"));
}
-
+
}
diff --git a/src/main/resources/language/general.properties b/src/main/resources/language/general.properties
index f575342..6b75e4b 100644
--- a/src/main/resources/language/general.properties
+++ b/src/main/resources/language/general.properties
@@ -1,6 +1,5 @@
root.domain=http://localhost:8080/
root.lambda=\u03BB
-root.home=home
root.typicalc=Typicalc
root.examplebutton=\uD83D\uDCC2
root.termGrammar=\u2329Term\u232A ::= \u2329App\u232A | \u2329Abs\u232A | (\u2329Term\u232A) | \
diff --git a/src/main/resources/language/translation_de.properties b/src/main/resources/language/translation_de.properties
index 243aba1..5a7aeb8 100644
--- a/src/main/resources/language/translation_de.properties
+++ b/src/main/resources/language/translation_de.properties
@@ -19,8 +19,8 @@ root.selectLanguage=Sprache
root.termExplanation=Die folgende Grammatik beschreibt den Aufbau eines gültigen Terms:
root.assExplanation=Die folgende Grammatik beschreibt die Syntax eines gültigen Typs:
root.typeAssumptions=Typannahmen
-root.addAssumption=Typannahme hinzufügen
-root.deleteAll=Alle löschen
+root.addAssumption=Typannahme hinzufügen
+root.deleteAll=Alle löschen
root.variable=Variable
root.type=Typ