first commit
diff --git a/org.eclipse.emf.refactor.smells.uml24.metricbased/.classpath b/org.eclipse.emf.refactor.smells.uml24.metricbased/.classpath
new file mode 100644
index 0000000..8a8f166
--- /dev/null
+++ b/org.eclipse.emf.refactor.smells.uml24.metricbased/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<classpath>

+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>

+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

+	<classpathentry kind="src" path="src"/>

+	<classpathentry kind="output" path="bin"/>

+</classpath>

diff --git a/org.eclipse.emf.refactor.smells.uml24.metricbased/.project b/org.eclipse.emf.refactor.smells.uml24.metricbased/.project
new file mode 100644
index 0000000..b8d7484
--- /dev/null
+++ b/org.eclipse.emf.refactor.smells.uml24.metricbased/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<projectDescription>

+	<name>org.eclipse.emf.refactor.smells.uml24.metricbased</name>

+	<comment></comment>

+	<projects>

+	</projects>

+	<buildSpec>

+		<buildCommand>

+			<name>org.eclipse.jdt.core.javabuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.ManifestBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.SchemaBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+	</buildSpec>

+	<natures>

+		<nature>org.eclipse.pde.PluginNature</nature>

+		<nature>org.eclipse.jdt.core.javanature</nature>

+	</natures>

+</projectDescription>

diff --git a/org.eclipse.emf.refactor.smells.uml24.metricbased/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.emf.refactor.smells.uml24.metricbased/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..f287d53
--- /dev/null
+++ b/org.eclipse.emf.refactor.smells.uml24.metricbased/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1

+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled

+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6

+org.eclipse.jdt.core.compiler.compliance=1.6

+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error

+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error

+org.eclipse.jdt.core.compiler.source=1.6

diff --git a/org.eclipse.emf.refactor.smells.uml24.metricbased/META-INF/MANIFEST.MF b/org.eclipse.emf.refactor.smells.uml24.metricbased/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..e422685
--- /dev/null
+++ b/org.eclipse.emf.refactor.smells.uml24.metricbased/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: SmellsUML24Metricbased
+Bundle-SymbolicName: org.eclipse.emf.refactor.smells.uml24.metricbased;singleton:=true
+Bundle-Version: 0.7.0
+Bundle-Activator: org.eclipse.emf.refactor.smells.uml24.metricbased.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;bundle-version="2.8.1",
+ org.eclipse.emf.refactor.smells;bundle-version="0.7.0",
+ org.eclipse.emf.refactor.metrics;bundle-version="0.7.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/org.eclipse.emf.refactor.smells.uml24.metricbased/bin/org/eclipse/emf/refactor/smells/uml24/metricbased/AbstractPackage.class b/org.eclipse.emf.refactor.smells.uml24.metricbased/bin/org/eclipse/emf/refactor/smells/uml24/metricbased/AbstractPackage.class
new file mode 100644
index 0000000..27b8cae
--- /dev/null
+++ b/org.eclipse.emf.refactor.smells.uml24.metricbased/bin/org/eclipse/emf/refactor/smells/uml24/metricbased/AbstractPackage.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.smells.uml24.metricbased/bin/org/eclipse/emf/refactor/smells/uml24/metricbased/Activator.class b/org.eclipse.emf.refactor.smells.uml24.metricbased/bin/org/eclipse/emf/refactor/smells/uml24/metricbased/Activator.class
new file mode 100644
index 0000000..d759f6b
--- /dev/null
+++ b/org.eclipse.emf.refactor.smells.uml24.metricbased/bin/org/eclipse/emf/refactor/smells/uml24/metricbased/Activator.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.smells.uml24.metricbased/build.properties b/org.eclipse.emf.refactor.smells.uml24.metricbased/build.properties
new file mode 100644
index 0000000..6f20375
--- /dev/null
+++ b/org.eclipse.emf.refactor.smells.uml24.metricbased/build.properties
@@ -0,0 +1,5 @@
+source.. = src/

+output.. = bin/

+bin.includes = META-INF/,\

+               .,\

+               plugin.xml

diff --git a/org.eclipse.emf.refactor.smells.uml24.metricbased/plugin.xml b/org.eclipse.emf.refactor.smells.uml24.metricbased/plugin.xml
new file mode 100644
index 0000000..fc937c7
--- /dev/null
+++ b/org.eclipse.emf.refactor.smells.uml24.metricbased/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<?eclipse version="3.4"?>

+<plugin>

+   <extension

+         point="org.eclipse.emf.refactor.smells">

+      <modelsmell

+            id="org.eclipse.emf.refactor.smells.uml24.abstractpackage"

+            modelsmell_description="The model contains a Package with a qouta of abstract Classes higher than the specified limit."

+            modelsmell_finderclass="org.eclipse.emf.refactor.smells.uml24.metricbased.AbstractPackage"

+            modelsmell_metamodel="http://www.eclipse.org/uml2/4.0.0/UML"

+            modelsmell_name="Abstract Package">

+      </modelsmell>

+   </extension>

+

+</plugin>

diff --git a/org.eclipse.emf.refactor.smells.uml24.metricbased/src/org/eclipse/emf/refactor/smells/uml24/metricbased/AbstractPackage.java b/org.eclipse.emf.refactor.smells.uml24.metricbased/src/org/eclipse/emf/refactor/smells/uml24/metricbased/AbstractPackage.java
new file mode 100644
index 0000000..82a2edc
--- /dev/null
+++ b/org.eclipse.emf.refactor.smells.uml24.metricbased/src/org/eclipse/emf/refactor/smells/uml24/metricbased/AbstractPackage.java
@@ -0,0 +1,52 @@
+package org.eclipse.emf.refactor.smells.uml24.metricbased;

+

+import java.util.LinkedList;

+import java.util.List;

+

+import org.eclipse.emf.ecore.EObject;

+import org.eclipse.emf.refactor.metrics.core.Metric;

+import org.eclipse.emf.refactor.metrics.interfaces.IMetricCalculator;

+import org.eclipse.emf.refactor.smells.core.MetricBasedModelSmellFinderClass;

+

+public class AbstractPackage extends MetricBasedModelSmellFinderClass {

+	

+	private String metricId = "org.eclipse.emf.refactor.metrics.uml24.qacp";

+	private Metric localMetric = Metric.getMetricInstanceFromId(metricId);

+

+	@Override

+	public LinkedList<LinkedList<EObject>> findSmell(EObject root) {

+		LinkedList<EObject> rootList = new LinkedList<EObject>();

+		rootList.add(root);

+		IMetricCalculator localCalculateClass = localMetric.getCalculateClass();

+		double globalLimit = this.getLimit();

+		return findSmellyObjectGroups(root, globalLimit, localCalculateClass);

+	}

+	

+	private LinkedList<LinkedList<EObject>> findSmellyObjectGroups(EObject root, double globalLimit, 

+			IMetricCalculator localCalculateClass) {

+		String context = localMetric.getContext();

+		LinkedList<LinkedList<EObject>> smellyEObjects = new LinkedList<LinkedList<EObject>>();

+		List<EObject> containedEObjects = root.eContents();

+		for(EObject object : containedEObjects){

+			String objectType = object.eClass().getInstanceClass().getSimpleName();

+			if(objectType.equals(context)){

+				LinkedList<EObject> rootList = new LinkedList<EObject>();

+				rootList.add(object);

+				localCalculateClass.setContext(rootList);

+				double localValue = localCalculateClass.calculate();				

+				if(limitReached(localValue, globalLimit)) {

+					LinkedList<EObject> currentObjects = new LinkedList<EObject>();

+					currentObjects.add(object);

+					smellyEObjects.add((currentObjects));

+				}				

+			} else {

+				smellyEObjects.addAll(findSmellyObjectGroups(object, globalLimit, localCalculateClass));

+			}

+		}

+		return smellyEObjects;

+	}

+

+	private boolean limitReached(double localValue, double globalLimit) {

+		return (localValue > globalLimit);

+	}

+}

diff --git a/org.eclipse.emf.refactor.smells.uml24.metricbased/src/org/eclipse/emf/refactor/smells/uml24/metricbased/Activator.java b/org.eclipse.emf.refactor.smells.uml24.metricbased/src/org/eclipse/emf/refactor/smells/uml24/metricbased/Activator.java
new file mode 100644
index 0000000..626da7d
--- /dev/null
+++ b/org.eclipse.emf.refactor.smells.uml24.metricbased/src/org/eclipse/emf/refactor/smells/uml24/metricbased/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.emf.refactor.smells.uml24.metricbased;

+

+import org.eclipse.ui.plugin.AbstractUIPlugin;

+import org.osgi.framework.BundleContext;

+

+/**

+ * The activator class controls the plug-in life cycle

+ */

+public class Activator extends AbstractUIPlugin {

+

+	// The plug-in ID

+	public static final String PLUGIN_ID = "org.eclipse.emf.refactor.smells.uml24.metricbased"; //$NON-NLS-1$

+

+	// The shared instance

+	private static Activator plugin;

+	

+	/**

+	 * The constructor

+	 */

+	public Activator() {

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)

+	 */

+	public void start(BundleContext context) throws Exception {

+		super.start(context);

+		plugin = this;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)

+	 */

+	public void stop(BundleContext context) throws Exception {

+		plugin = null;

+		super.stop(context);

+	}

+

+	/**

+	 * Returns the shared instance

+	 *

+	 * @return the shared instance

+	 */

+	public static Activator getDefault() {

+		return plugin;

+	}

+

+}