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%2Fprocedures%2FMergeEqualResources.java;fp=bundles%2Forg.simantics.graph.compiler%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fcompiler%2Finternal%2Fprocedures%2FMergeEqualResources.java;h=61658b1a855d1213f10347c865d350e1e79ff5dc;hp=17ebec994908180caf0f0f8468745b45ff4f98bd;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/procedures/MergeEqualResources.java b/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/procedures/MergeEqualResources.java index 17ebec994..61658b1a8 100644 --- a/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/procedures/MergeEqualResources.java +++ b/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/procedures/MergeEqualResources.java @@ -1,38 +1,38 @@ -package org.simantics.graph.compiler.internal.procedures; - -import gnu.trove.list.array.TIntArrayList; -import gnu.trove.map.hash.TIntIntHashMap; - -import org.simantics.graph.query.Paths; -import org.simantics.graph.store.GraphStore; -import org.simantics.graph.store.IdentityStore; - -public class MergeEqualResources implements Runnable { - - GraphStore store; - Paths paths; - - public MergeEqualResources(Paths paths, GraphStore store) { - this.paths = paths; - this.store = store; - } - - @Override - public void run() { - IdentityStore identities = store.identities; - if(identities.contains(paths.Equals)) { - int equalsId = identities.pathToId(paths.Equals); - identities.removeIdentity(equalsId); - TIntArrayList rel = store.statements.extractRelation(equalsId); - for(int i=0;i