X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.graph.compiler%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fcompiler%2Finternal%2Ftemplates%2FListTemplate.java;fp=bundles%2Forg.simantics.graph.compiler%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fcompiler%2Finternal%2Ftemplates%2FListTemplate.java;h=f9855ce712d87741a4dfa5066f9b8ebcceca126b;hp=e30b1a5f0fea9e9c8b2e38ad4fab79db5294fca3;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/templates/ListTemplate.java b/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/templates/ListTemplate.java index e30b1a5f0..f9855ce71 100644 --- a/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/templates/ListTemplate.java +++ b/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/templates/ListTemplate.java @@ -1,39 +1,39 @@ -package org.simantics.graph.compiler.internal.templates; - -import java.util.Collection; - -import org.simantics.graph.compiler.ExternalFileLoader; -import org.simantics.graph.query.IGraph; -import org.simantics.graph.query.Paths; -import org.simantics.graph.store.GraphStore; -import org.simantics.ltk.Problem; - -public enum ListTemplate implements ITemplate { - - INSTANCE; - - @Override - public void apply(IGraph graph, GraphStore store, - int[] parameters, ExternalFileLoader fileLoader, Collection problems) { - createList(graph.getPaths(), store, parameters); - } - - public static void createList(Paths paths, GraphStore store, int[] parameters) { - int InstanceOf = store.identities.createPathToId(paths.InstanceOf); - int Entry = store.identities.createPathToId(paths.List_Entry); - int Next = store.identities.createPathToId(paths.List_Next); - int Element = store.identities.createPathToId(paths.List_Element); - - int oldEntry = parameters[0]; - for(int i=1;i problems) { + createList(graph.getPaths(), store, parameters); + } + + public static void createList(Paths paths, GraphStore store, int[] parameters) { + int InstanceOf = store.identities.createPathToId(paths.InstanceOf); + int Entry = store.identities.createPathToId(paths.List_Entry); + int Next = store.identities.createPathToId(paths.List_Next); + int Element = store.identities.createPathToId(paths.List_Element); + + int oldEntry = parameters[0]; + for(int i=1;i