]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/procedures/PropagateNewMarks.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.graph.compiler / src / org / simantics / graph / compiler / internal / procedures / PropagateNewMarks.java
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 }