X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.mapping%2Fsrc%2Forg%2Fsimantics%2Fmapping%2Frule%2Finstructions%2FPrintRuleInstruction.java;h=d2f33ed99d0592b7d67617a48c7fa21c9216acdb;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=6af4042920c0c5f81072ec0d4e6866e9fb6365d7;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.mapping/src/org/simantics/mapping/rule/instructions/PrintRuleInstruction.java b/bundles/org.simantics.mapping/src/org/simantics/mapping/rule/instructions/PrintRuleInstruction.java index 6af404292..d2f33ed99 100644 --- a/bundles/org.simantics.mapping/src/org/simantics/mapping/rule/instructions/PrintRuleInstruction.java +++ b/bundles/org.simantics.mapping/src/org/simantics/mapping/rule/instructions/PrintRuleInstruction.java @@ -1,54 +1,54 @@ -/******************************************************************************* - * 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.rule.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.db.exception.DatabaseException; -import org.simantics.layer0.utils.triggers.IModification; - -public class PrintRuleInstruction implements IRuleInstruction { - - String text; - - public PrintRuleInstruction(String text) { - this.text = text; - } - - @Override - public void collectVariables(TIntHashSet reads, TIntHashSet writes) { - } - - @Override - public IModification execute(ReadGraph g, Object[] bindings) throws DatabaseException { - System.out.println("execute " + text); - return null; - } - - @Override - public void doExecute(WriteGraph g, Object[] bindings) throws DatabaseException { - System.out.println("doExecute " + text); - } - - @Override - public void mapVariables(TIntIntHashMap map) { - } - - @Override - public void toString(StringBuilder b, int indent) { - b.append("print(" + text + ")"); - } - -} +/******************************************************************************* + * 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.rule.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.db.exception.DatabaseException; +import org.simantics.layer0.utils.triggers.IModification; + +public class PrintRuleInstruction implements IRuleInstruction { + + String text; + + public PrintRuleInstruction(String text) { + this.text = text; + } + + @Override + public void collectVariables(TIntHashSet reads, TIntHashSet writes) { + } + + @Override + public IModification execute(ReadGraph g, Object[] bindings) throws DatabaseException { + System.out.println("execute " + text); + return null; + } + + @Override + public void doExecute(WriteGraph g, Object[] bindings) throws DatabaseException { + System.out.println("doExecute " + text); + } + + @Override + public void mapVariables(TIntIntHashMap map) { + } + + @Override + public void toString(StringBuilder b, int indent) { + b.append("print(" + text + ")"); + } + +}