]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.graph/src/org/simantics/graph/matching/DebugMatchingStrategy.java
Merge "Small improvements to statement collision reporting."
[simantics/platform.git] / bundles / org.simantics.graph / src / org / simantics / graph / matching / DebugMatchingStrategy.java
1 package org.simantics.graph.matching;\r
2 \r
3 \r
4 public enum DebugMatchingStrategy implements GraphMatchingStrategy {\r
5 \r
6         INSTANCE;\r
7         \r
8         @Override\r
9         public void applyTo(GraphMatching matching) {\r
10                 int[] aToB = matching.aToB;\r
11                 String[] names = matching.aGraph.names;\r
12                 for(int s=0;s<aToB.length;++s)\r
13                         if(aToB[s] < 0) {\r
14                                 System.out.println(names[s]);\r
15                                 for(Stat stat : matching.aGraph.statements[s]) {\r
16                                         System.out.println("    " + stat.toString(names));\r
17                                 }\r
18                         }\r
19         }\r
20 }\r