class HenshinManager added
diff --git a/org.eclipse.emf.refactor.metrics.henshin/META-INF/MANIFEST.MF b/org.eclipse.emf.refactor.metrics.henshin/META-INF/MANIFEST.MF
index bb48cf3..9576c2a 100644
--- a/org.eclipse.emf.refactor.metrics.henshin/META-INF/MANIFEST.MF
+++ b/org.eclipse.emf.refactor.metrics.henshin/META-INF/MANIFEST.MF
@@ -6,7 +6,9 @@
 Bundle-Activator: org.eclipse.emf.refactor.metrics.henshin.Activator
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;bundle-version="2.8.1",
  org.eclipse.emf.refactor.metrics;bundle-version="0.7.0",
- org.eclipse.emf.refactor.metrics.generator;bundle-version="0.7.0"
+ org.eclipse.emf.refactor.metrics.generator;bundle-version="0.7.0",
+ org.eclipse.emf.henshin.interpreter;bundle-version="0.9.2"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/org.eclipse.emf.refactor.metrics.henshin/src/org/eclipse/emf/refactor/metrics/henshin/HenshinManager.java b/org.eclipse.emf.refactor.metrics.henshin/src/org/eclipse/emf/refactor/metrics/henshin/HenshinManager.java
new file mode 100644
index 0000000..610be8f
--- /dev/null
+++ b/org.eclipse.emf.refactor.metrics.henshin/src/org/eclipse/emf/refactor/metrics/henshin/HenshinManager.java
@@ -0,0 +1,47 @@
+package org.eclipse.emf.refactor.metrics.henshin;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.henshin.interpreter.EGraph;
+import org.eclipse.emf.henshin.interpreter.Engine;
+import org.eclipse.emf.henshin.interpreter.Match;
+import org.eclipse.emf.henshin.interpreter.RuleApplication;
+import org.eclipse.emf.henshin.interpreter.impl.EGraphImpl;
+import org.eclipse.emf.henshin.interpreter.impl.EngineImpl;
+import org.eclipse.emf.henshin.interpreter.impl.MatchImpl;
+import org.eclipse.emf.henshin.interpreter.impl.RuleApplicationImpl;
+import org.eclipse.emf.henshin.interpreter.util.InterpreterUtil;
+import org.eclipse.emf.henshin.interpreter.util.ModelHelper;
+import org.eclipse.emf.henshin.model.Rule;
+import org.eclipse.emf.henshin.model.Parameter;
+import org.eclipse.emf.henshin.model.TransformationSystem;
+
+@SuppressWarnings("deprecation")
+public class HenshinManager {
+
+	private final static String MAIN_RULE = "mainRule";
+	private final static String CONTEXT = "context";
+
+	public static double run(String transformationPath, EObject context) {
+		EObject root = EcoreUtil.getRootContainer(context);		
+		EGraph graph = new EGraphImpl();
+		graph.addTree(root);
+		Engine engine = new EngineImpl();
+		TransformationSystem transformationSystem = 
+				(TransformationSystem) ModelHelper.loadFile(transformationPath);
+		Rule rule = (Rule) transformationSystem.findRuleByName(MAIN_RULE);
+		Match prematch = new MatchImpl(rule);
+		for (Parameter par : rule.getParameters()) {
+			if (par.getName().equals(CONTEXT)) {
+				prematch.setParameterValue(par, context);
+			}
+		}
+		RuleApplication application = new RuleApplicationImpl(engine, graph, rule, prematch); 
+		List<Match> matches = InterpreterUtil.findAllMatches(engine,
+				application.getRule(), application.getEGraph(),
+				application.getPartialMatch());
+		return matches.size();
+	}
+}