diff options
author | Kristóf Marussy <kristof@marussy.com> | 2023-08-26 21:44:58 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2023-08-26 22:01:33 +0200 |
commit | a49083f31679c47e1685e0cedbc9a40cc8f48fd8 (patch) | |
tree | d0702f26342297f54124900ecfc52e04c3e16d6f /subprojects/language/src | |
parent | feat(frontend): automatic fit zoom (diff) | |
download | refinery-a49083f31679c47e1685e0cedbc9a40cc8f48fd8.tar.gz refinery-a49083f31679c47e1685e0cedbc9a40cc8f48fd8.tar.zst refinery-a49083f31679c47e1685e0cedbc9a40cc8f48fd8.zip |
refactor(frontent): improve graph drawing
Diffstat (limited to 'subprojects/language/src')
-rw-r--r-- | subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java b/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java index 03b0c729..a9efc4bb 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java +++ b/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java | |||
@@ -7,7 +7,6 @@ package tools.refinery.language.utils; | |||
7 | 7 | ||
8 | import org.eclipse.emf.common.util.URI; | 8 | import org.eclipse.emf.common.util.URI; |
9 | import org.eclipse.emf.ecore.EObject; | 9 | import org.eclipse.emf.ecore.EObject; |
10 | |||
11 | import tools.refinery.language.model.problem.*; | 10 | import tools.refinery.language.model.problem.*; |
12 | 11 | ||
13 | public final class ProblemUtil { | 12 | public final class ProblemUtil { |
@@ -50,6 +49,10 @@ public final class ProblemUtil { | |||
50 | } | 49 | } |
51 | } | 50 | } |
52 | 51 | ||
52 | public static boolean isError(EObject eObject) { | ||
53 | return eObject instanceof PredicateDefinition predicateDefinition && predicateDefinition.isError(); | ||
54 | } | ||
55 | |||
53 | public static boolean isIndividualNode(Node node) { | 56 | public static boolean isIndividualNode(Node node) { |
54 | var containingFeature = node.eContainingFeature(); | 57 | var containingFeature = node.eContainingFeature(); |
55 | return containingFeature == ProblemPackage.Literals.INDIVIDUAL_DECLARATION__NODES | 58 | return containingFeature == ProblemPackage.Literals.INDIVIDUAL_DECLARATION__NODES |