]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fix to OrderedSetTemplate, preference for autocompletion 63/2263/1
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Mon, 1 Oct 2018 10:30:17 +0000 (13:30 +0300)
committerHannu Niemistö <hannu.niemisto@semantum.fi>
Mon, 1 Oct 2018 10:30:17 +0000 (13:30 +0300)
gitlab #139

Change-Id: Ib7b811533cb16d59896f385b964d67b03909364a

bundles/org.simantics.graph.compiler/META-INF/MANIFEST.MF
bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/GraphCompilerPreferences.java
bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/templates/OrderedSetTemplate.java

index 400bdceeaf26021649e2c104d6cf76adfadbfd7e..b6f9a94428dcb669e15e0e7c35eaa05173a59160 100644 (file)
@@ -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",
index 6487d8e91db22cd61a8b84d06918b8d8f5666737..ca81b6974b5d848620493988d36a98e3caddef05 100644 (file)
@@ -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();
        }
 }
index 22679d626908bd446f9825cbfbd94340249c2219..b83d6a9449f6201db8a1e0be442d80ebb551fa6d 100644 (file)
@@ -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<parameters.length;++i)
                        store.statements.add(parameters[i-1], relation, parameters[i]);