]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.mapping/src/org/simantics/mapping/constraint/instructions/PrintStateInstruction.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.mapping / src / org / simantics / mapping / constraint / instructions / PrintStateInstruction.java
index 04e10771acacb7cdffff1105c76ab24d863cb6cb..5341a3975f45262a555d20a5e1c6c7d665a3d909 100644 (file)
@@ -1,89 +1,89 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.mapping.constraint.instructions;\r
-\r
-import gnu.trove.map.hash.TIntIntHashMap;\r
-import gnu.trove.set.hash.TIntHashSet;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.WriteGraph;\r
-import org.simantics.mapping.IContextualModification;\r
-\r
-public class PrintStateInstruction implements IInstruction {\r
-       String position;\r
-\r
-       public PrintStateInstruction(String position) {\r
-               this.position = position;\r
-       }\r
-       \r
-       private void print(ReadGraph g, Object[] bindings) {\r
-               System.out.print(position + ": ");\r
-               boolean first = true;\r
-               for(Object obj : bindings) {\r
-                       if(first)\r
-                               first = false;\r
-                       else\r
-                               System.out.print(", ");\r
-                       System.out.print(obj);\r
-               }\r
-               System.out.println();\r
-       }\r
-       \r
-       @Override\r
-       public Object query(ReadGraph g, Object[] bindings) {\r
-               print(g, bindings);\r
-               return null;\r
-       }\r
-       \r
-       @Override\r
-       public Object next(ReadGraph g, Object[] bindings, Object continuation) {               \r
-               return IInstruction.FAILURE;\r
-       }       \r
-\r
-       @Override\r
-       public IContextualModification claim(ReadGraph g, Object[] bindings) {\r
-               print(g, bindings);\r
-               return null;\r
-       }\r
-\r
-       @Override\r
-       public IContextualModification deny(ReadGraph g, Object[] bindings) {\r
-               print(g, bindings);\r
-               return null;\r
-       }\r
-\r
-       @Override\r
-       public void doClaim(WriteGraph g, Object[] bindings) {\r
-               print(g, bindings);\r
-       }\r
-\r
-       @Override\r
-       public void doDeny(WriteGraph g, Object[] bindings) {\r
-               print(g, bindings);\r
-       }\r
-\r
-       @Override\r
-       public void collectVariables(TIntHashSet reads, TIntHashSet writes) {\r
-               /* Because this instruction is for debugging, it doesn't affect\r
-                  to the set of read variables. */\r
-       }\r
-\r
-       @Override\r
-       public void mapVariables(TIntIntHashMap map) {\r
-       }       \r
-       \r
-       @Override\r
-       public void toString(StringBuilder b, int indent) {\r
-               \r
-       }\r
-       \r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.mapping.constraint.instructions;
+
+import gnu.trove.map.hash.TIntIntHashMap;
+import gnu.trove.set.hash.TIntHashSet;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.WriteGraph;
+import org.simantics.mapping.IContextualModification;
+
+public class PrintStateInstruction implements IInstruction {
+       String position;
+
+       public PrintStateInstruction(String position) {
+               this.position = position;
+       }
+       
+       private void print(ReadGraph g, Object[] bindings) {
+               System.out.print(position + ": ");
+               boolean first = true;
+               for(Object obj : bindings) {
+                       if(first)
+                               first = false;
+                       else
+                               System.out.print(", ");
+                       System.out.print(obj);
+               }
+               System.out.println();
+       }
+       
+       @Override
+       public Object query(ReadGraph g, Object[] bindings) {
+               print(g, bindings);
+               return null;
+       }
+       
+       @Override
+       public Object next(ReadGraph g, Object[] bindings, Object continuation) {               
+               return IInstruction.FAILURE;
+       }       
+
+       @Override
+       public IContextualModification claim(ReadGraph g, Object[] bindings) {
+               print(g, bindings);
+               return null;
+       }
+
+       @Override
+       public IContextualModification deny(ReadGraph g, Object[] bindings) {
+               print(g, bindings);
+               return null;
+       }
+
+       @Override
+       public void doClaim(WriteGraph g, Object[] bindings) {
+               print(g, bindings);
+       }
+
+       @Override
+       public void doDeny(WriteGraph g, Object[] bindings) {
+               print(g, bindings);
+       }
+
+       @Override
+       public void collectVariables(TIntHashSet reads, TIntHashSet writes) {
+               /* Because this instruction is for debugging, it doesn't affect
+                  to the set of read variables. */
+       }
+
+       @Override
+       public void mapVariables(TIntIntHashMap map) {
+       }       
+       
+       @Override
+       public void toString(StringBuilder b, int indent) {
+               
+       }
+       
+}