]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/procedures/PropagateNewMarks.java
Migrated source code from Simantics SVN
[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;\r
2 \r
3 import org.simantics.graph.store.GraphStore;\r
4 import org.simantics.graph.store.IdentityStore;\r
5 \r
6 public class PropagateNewMarks implements Runnable {\r
7         IdentityStore identities;\r
8 \r
9         public PropagateNewMarks(GraphStore store) {\r
10                 this.identities = store.identities;\r
11         }\r
12 \r
13         private void propagateNewMarks(int resource) {\r
14                 for(int child : identities.getChildren(resource))\r
15                         if(identities.markNew(child))\r
16                                 propagateNewMarks(child);\r
17         }\r
18         \r
19         @Override\r
20         public void run() {\r
21                 for(int resource : identities.getNewResources())\r
22                         propagateNewMarks(resource);    \r
23         }\r
24 }\r