From 804e2db842bdda00bb28a1f599a5293644c8d55e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hannu=20Niemist=C3=B6?= Date: Mon, 1 Oct 2018 13:30:17 +0300 Subject: [PATCH] Fix to OrderedSetTemplate, preference for autocompletion gitlab #139 Change-Id: Ib7b811533cb16d59896f385b964d67b03909364a --- bundles/org.simantics.graph.compiler/META-INF/MANIFEST.MF | 2 +- .../org/simantics/graph/compiler/GraphCompilerPreferences.java | 2 ++ .../graph/compiler/internal/templates/OrderedSetTemplate.java | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.graph.compiler/META-INF/MANIFEST.MF b/bundles/org.simantics.graph.compiler/META-INF/MANIFEST.MF index 400bdceea..b6f9a9442 100644 --- a/bundles/org.simantics.graph.compiler/META-INF/MANIFEST.MF +++ b/bundles/org.simantics.graph.compiler/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Compiler Bundle-SymbolicName: org.simantics.graph.compiler;singleton:=true -Bundle-Version: 1.1.16.qualifier +Bundle-Version: 1.1.18.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Require-Bundle: org.simantics.graph;bundle-version="1.1.15";visibility:=reexport, org.simantics.databoard;bundle-version="0.6.6", diff --git a/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/GraphCompilerPreferences.java b/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/GraphCompilerPreferences.java index 6487d8e91..ca81b6974 100644 --- a/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/GraphCompilerPreferences.java +++ b/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/GraphCompilerPreferences.java @@ -4,6 +4,7 @@ public class GraphCompilerPreferences { public boolean validate = false; public ValidationMode validateRelationRestrictions = ValidationMode.IGNORE; public ValidationMode validateResourceHasType = ValidationMode.IGNORE; + public boolean autoCompletion; @Override public String toString() { @@ -11,6 +12,7 @@ public class GraphCompilerPreferences { b.append("validate = " + validate + "\n"); b.append("validateRelationRestrictions = " + validateRelationRestrictions + "\n"); b.append("validateResourceHasType = " + validateResourceHasType + "\n"); + b.append("autoCompletion = " + autoCompletion + "\n"); return b.toString(); } } diff --git a/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/templates/OrderedSetTemplate.java b/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/templates/OrderedSetTemplate.java index 22679d626..b83d6a944 100644 --- a/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/templates/OrderedSetTemplate.java +++ b/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/templates/OrderedSetTemplate.java @@ -29,6 +29,7 @@ public enum OrderedSetTemplate implements ITemplate { int inverse = store.identities.newResource(); store.statements.add(inverse, SubrelationOf, HasPrevious); store.statements.add(relation, InverseOf, inverse); + store.identities.defineChild(relation, "Inverse", inverse); for(int i=1;i