From: Tuukka Lehtonen Date: Thu, 1 Sep 2016 11:05:42 +0000 (+0300) Subject: Sync git svn branch with SVN repository r33158. X-Git-Tag: v1.25.0~142^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=ad8333027322fda6b9a8a524c7a7e15a54c52f38;p=simantics%2Fplatform.git Sync git svn branch with SVN repository r33158. refs #6475 --- diff --git a/bundles/org.simantics.charts/src/org/simantics/charts/Charts.java b/bundles/org.simantics.charts/src/org/simantics/charts/Charts.java index 69aea11ee..dd7ae02a0 100644 --- a/bundles/org.simantics.charts/src/org/simantics/charts/Charts.java +++ b/bundles/org.simantics.charts/src/org/simantics/charts/Charts.java @@ -10,8 +10,8 @@ import org.simantics.databoard.binding.error.BindingException; import org.simantics.databoard.util.Bean; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; +import org.simantics.db.common.request.PossibleIndexRoot; import org.simantics.db.exception.DatabaseException; -import org.simantics.db.layer0.request.PossibleModel; import org.simantics.history.HistoryException; import org.simantics.history.HistorySamplerItem; import org.simantics.history.ItemManager; @@ -42,7 +42,7 @@ public final class Charts { try { - Resource model = graph.syncRequest(new PossibleModel(subscriptionItem)); + Resource model = graph.syncRequest(new PossibleIndexRoot(subscriptionItem)); if ( model == null ) { throw new DatabaseException("There is no model for " + subscriptionItem); } diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PossibleActiveExperiment.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PossibleActiveExperiment.java index 3db016d79..6caca12c5 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PossibleActiveExperiment.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PossibleActiveExperiment.java @@ -13,6 +13,7 @@ package org.simantics.db.layer0.request; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; +import org.simantics.db.common.request.PossibleIndexRoot; import org.simantics.db.common.request.ResourceRead; import org.simantics.db.exception.DatabaseException; import org.simantics.layer0.Layer0; @@ -27,7 +28,7 @@ public class PossibleActiveExperiment extends ResourceRead { @Override public Resource perform(ReadGraph graph) throws DatabaseException { - Resource model = graph.sync(new PossibleModel(resource)); + Resource model = graph.sync(new PossibleIndexRoot(resource)); if(model == null) return null; Layer0 b = Layer0.getInstance(graph); diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessorState.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessorState.java index d4f0dbe01..de8a17c78 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessorState.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessorState.java @@ -16,6 +16,7 @@ public class DomainProcessorState { public TIntIntHashMap inverses = new TIntIntHashMap(); public TIntHashSet externals = new TIntHashSet(); public TIntIntHashMap ids = new TIntIntHashMap(100, 0.6f, -1, -1); + public TIntHashSet pending = new TIntHashSet(); public int statementCount; public int valueCount; diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java index 2636bb0d7..79f093748 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java @@ -248,7 +248,9 @@ public class ModelTransferableGraphSource implements TransferableGraphSource { int p = state.otherStatementsInput.readInt(); int o = state.otherStatementsInput.readInt(); if(!exclude) { - if(state.excludedShared.contains(o)) { + if(state.pending.contains(o)) { + System.err.println("excluding garbage statement " + s + " " + p + " " + o + ", object resource is garbage"); + } else if(state.excludedShared.contains(o)) { System.err.println("excluding shared " + s + " " + p + " " + o); } else { diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSourceRequest.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSourceRequest.java index c61fdadcb..d7fe5c690 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSourceRequest.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSourceRequest.java @@ -440,8 +440,10 @@ public class ModelTransferableGraphSourceRequest extends UniqueReadinstance()); Variable configurationContext = contexts.getConfigurationContext(); diff --git a/bundles/org.simantics.structural2/src/org/simantics/structural2/Functions.java b/bundles/org.simantics.structural2/src/org/simantics/structural2/Functions.java index 70b9ab039..fd4012355 100644 --- a/bundles/org.simantics.structural2/src/org/simantics/structural2/Functions.java +++ b/bundles/org.simantics.structural2/src/org/simantics/structural2/Functions.java @@ -26,12 +26,12 @@ import org.simantics.db.common.issue.StandardIssue; import org.simantics.db.common.procedure.adapter.TransientCacheAsyncListener; import org.simantics.db.common.procedure.adapter.TransientCacheListener; import org.simantics.db.common.request.ObjectsWithType; +import org.simantics.db.common.request.PossibleIndexRoot; import org.simantics.db.common.request.ResourceRead; import org.simantics.db.common.uri.UnescapedChildMapOfResource; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.function.All; import org.simantics.db.layer0.function.StandardChildDomainChildren; -import org.simantics.db.layer0.request.PossibleModel; import org.simantics.db.layer0.request.PropertyInfo; import org.simantics.db.layer0.request.PropertyInfoRequest; import org.simantics.db.layer0.request.VariableRead; @@ -372,7 +372,7 @@ public class Functions { Layer0 L0 = Layer0.getInstance(graph); SimulationResource SIMU = SimulationResource.getInstance(graph); - Resource model = graph.sync(new PossibleModel(resource)); + Resource model = graph.sync(new PossibleIndexRoot(resource)); if(graph.isInstanceOf(model, L0.RVIContext)) { return fromContext(graph, model); }