]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessor3.java
Fix TG export regression caused by commit b9b77f42
[simantics/platform.git] / 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();