Fail safe import fixes made by Antti
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / util / Subgraphs.java
index c7e697e6291773b58e44d8bd3a8c2afbf0952442..518efc882e45964dafb612ced7068636972a6f6b 100644 (file)
@@ -991,7 +991,8 @@ public class Subgraphs {
              * � All o are internal
              * � All stm are included
                         */
-                       List<InternalEntry> entries = ConsistsOfProcess.walk(graph, null, fringe, exclusions, true); 
+                       Pair<List<InternalEntry>,Set<Resource>> pair = ConsistsOfProcess.walk(graph, null, fringe, exclusions, true);
+                       List<InternalEntry> entries = pair.first;
                        for(InternalEntry entry : entries) {
                                Resource r = entry.resource;
                                if (status.put(r, ExtentStatus.INTERNAL) == null) {
@@ -1003,6 +1004,12 @@ public class Subgraphs {
                                }
                        }
                        
+                       for(Resource unnamedChild : pair.second) {
+                           if (status.put(unnamedChild, ExtentStatus.INTERNAL) == null) {
+                               fringe.add(unnamedChild);
+                           }
+                       }
+                       
                        /*
                         * This loop resolves the transitive closure of all p < IsRelatedTo such that p does not contain the SharedRange tag.
                         * Such resources are guaranteed to be internal.