]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fix TG export regression caused by commit b9b77f42 12/1412/5
authorAntti Villberg <antti.villberg@semantum.fi>
Wed, 31 Jan 2018 12:58:37 +0000 (14:58 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 31 Jan 2018 14:39:08 +0000 (16:39 +0200)
refs #7728

Change-Id: I37bba678fbc756484b8b58514461f68f9b12e5f6

bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessor3.java

index c7bc380e5435cbe5e359185448d006de8eda7a45..07e4194276113fe56e89f8d756152cb41f285578 100644 (file)
@@ -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<Resource, ExtentStatus> 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();