diff options
author | 2021-10-31 19:53:54 +0100 | |
---|---|---|
committer | 2021-10-31 19:53:54 +0100 | |
commit | 7ee5f7530e6d7120750811376834bdcacd9ca0d4 (patch) | |
tree | c1e0f0174203be5ef064b666f858b025fb25f0bf /language-ide | |
parent | Merge pull request #8 from kris7t/cm6 (diff) | |
download | refinery-7ee5f7530e6d7120750811376834bdcacd9ca0d4.tar.gz refinery-7ee5f7530e6d7120750811376834bdcacd9ca0d4.tar.zst refinery-7ee5f7530e6d7120750811376834bdcacd9ca0d4.zip |
chore: fix Sonar warnings
Diffstat (limited to 'language-ide')
-rw-r--r-- | language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java | 18 |
1 files changed, 6 insertions, 12 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) { |