]> gerrit.simantics Code Review - simantics/platform.git/blob
58eae257f3dfc094fe41dd27b291d0589177890f
[simantics/platform.git] /
1 package org.simantics.graph.compiler.internal.procedures;
2
3 import org.simantics.graph.store.GraphStore;
4 import org.simantics.graph.store.IdentityStore;
5
6 public class PropagateNewMarks implements Runnable {
7         IdentityStore identities;
8
9         public PropagateNewMarks(GraphStore store) {
10                 this.identities = store.identities;
11         }
12
13         private void propagateNewMarks(int resource) {
14                 for(int child : identities.getChildren(resource))
15                         if(identities.markNew(child))
16                                 propagateNewMarks(child);
17         }
18         
19         @Override
20         public void run() {
21                 for(int resource : identities.getNewResources())
22                         propagateNewMarks(resource);    
23         }
24 }