From 3fb26ddbd489f862bf8c28e78834c98bcc29382e Mon Sep 17 00:00:00 2001 From: Antti Villberg Date: Wed, 31 Jan 2018 14:58:37 +0200 Subject: [PATCH] Fix TG export regression caused by commit b9b77f42 refs #7728 Change-Id: I37bba678fbc756484b8b58514461f68f9b12e5f6 --- .../simantics/db/layer0/util/DomainProcessor3.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessor3.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessor3.java index c7bc380e5..07e419427 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessor3.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessor3.java @@ -30,6 +30,8 @@ import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.adapter.SubgraphExtent.ExtentStatus; import org.simantics.db.layer0.util.ConsistsOfProcess.ConsistsOfProcessEntry; import org.simantics.db.layer0.util.ModelTransferableGraphSourceRequest.Expansion3; +import org.simantics.db.layer0.util.TransferableGraphConfiguration2.SeedSpec; +import org.simantics.db.layer0.util.TransferableGraphConfiguration2.SeedSpec.SeedSpecType; import org.simantics.db.service.CollectionSupport; import org.simantics.db.service.SerialisationSupport; import org.simantics.db.service.TransferableGraphSupport; @@ -114,9 +116,19 @@ public class DomainProcessor3 { strongInverseSet = cs.createSet(); for(Map.Entry entry : conf.preStatus.entrySet()) { + // INTERNAL prestatus shall be ignored. Domain processor will initialize statuses based on seeds. + if (entry.getValue().equals(ExtentStatus.INTERNAL)) continue; status.put(entry.getKey(), entry.getValue()); } + for(SeedSpec ss : conf.seeds) { + if(SeedSpecType.INTERNAL.equals(ss.specType)) continue; + // Non-internal resources are not reported as internals by ConsistsOfProcess so they are manually entered into fringe + fringe.add(ss.resource); + // Roots are classified in status as INTERNAL + status.put(ss.resource, ExtentStatus.INTERNAL); + } + if(PROFILE) startupTime += System.nanoTime(); -- 2.47.1