diff options
3 files changed, 10 insertions, 15 deletions
diff --git a/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java b/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java index d9abf12d..19eb1a03 100644 --- a/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java +++ b/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java | |||
@@ -96,20 +96,14 @@ public class ProblemSemanticHighlightingCalculator extends DefaultSemanticHighli | |||
96 | return new String[] { BUILTIN_CLASS }; | 96 | return new String[] { BUILTIN_CLASS }; |
97 | } | 97 | } |
98 | ImmutableList.Builder<String> classesBuilder = ImmutableList.builder(); | 98 | ImmutableList.Builder<String> classesBuilder = ImmutableList.builder(); |
99 | if (eObject instanceof ClassDeclaration classDeclaration) { | 99 | if (eObject instanceof ClassDeclaration classDeclaration && classDeclaration.isAbstract()) { |
100 | if (classDeclaration.isAbstract()) { | 100 | classesBuilder.add(ABSTRACT_CLASS); |
101 | classesBuilder.add(ABSTRACT_CLASS); | ||
102 | } | ||
103 | } | 101 | } |
104 | if (eObject instanceof ReferenceDeclaration referenceDeclaration) { | 102 | if (eObject instanceof ReferenceDeclaration referenceDeclaration && referenceDeclaration.isContainment()) { |
105 | if (referenceDeclaration.isContainment()) { | 103 | classesBuilder.add(CONTAINMENT_CLASS); |
106 | classesBuilder.add(CONTAINMENT_CLASS); | ||
107 | } | ||
108 | } | 104 | } |
109 | if (eObject instanceof PredicateDefinition predicateDefinition) { | 105 | if (eObject instanceof PredicateDefinition predicateDefinition && predicateDefinition.isError()) { |
110 | if (predicateDefinition.isError()) { | 106 | classesBuilder.add(ERROR_CLASS); |
111 | classesBuilder.add(ERROR_CLASS); | ||
112 | } | ||
113 | } | 107 | } |
114 | if (eObject instanceof Node node) { | 108 | if (eObject instanceof Node node) { |
115 | if (reference == ProblemPackage.Literals.VARIABLE_OR_NODE_ARGUMENT__VARIABLE_OR_NODE) { | 109 | if (reference == ProblemPackage.Literals.VARIABLE_OR_NODE_ARGUMENT__VARIABLE_OR_NODE) { |
diff --git a/language-web/src/main/js/editor/EditorArea.tsx b/language-web/src/main/js/editor/EditorArea.tsx index 678a632d..dba20f6e 100644 --- a/language-web/src/main/js/editor/EditorArea.tsx +++ b/language-web/src/main/js/editor/EditorArea.tsx | |||
@@ -95,8 +95,9 @@ export const EditorArea = observer(() => { | |||
95 | 95 | ||
96 | useEffect(() => { | 96 | useEffect(() => { |
97 | if (editorParentRef.current === null) { | 97 | if (editorParentRef.current === null) { |
98 | // Nothing to clean up. | 98 | return () => { |
99 | return () => {}; | 99 | // Nothing to clean up. |
100 | }; | ||
100 | } | 101 | } |
101 | 102 | ||
102 | const editorView = new EditorView({ | 103 | const editorView = new EditorView({ |
diff --git a/language-web/src/main/js/language/indentation.ts b/language-web/src/main/js/language/indentation.ts index 78f0a750..6d36ed3b 100644 --- a/language-web/src/main/js/language/indentation.ts +++ b/language-web/src/main/js/language/indentation.ts | |||
@@ -77,7 +77,7 @@ export function indentDeclaration(context: TreeIndentContext): number { | |||
77 | 77 | ||
78 | export function indentPredicateOrRule(context: TreeIndentContext): number { | 78 | export function indentPredicateOrRule(context: TreeIndentContext): number { |
79 | const clauseIndent = indentDeclarationStrategy(context, 1); | 79 | const clauseIndent = indentDeclarationStrategy(context, 1); |
80 | if (/^\s+(;|\.)/.exec(context.textAfter) !== null) { | 80 | if (/^\s+[;.]/.exec(context.textAfter) !== null) { |
81 | return clauseIndent - 2; | 81 | return clauseIndent - 2; |
82 | } | 82 | } |
83 | if (/^\s+(~>)/.exec(context.textAfter) !== null) { | 83 | if (/^\s+(~>)/.exec(context.textAfter) !== null) { |