metric NNIACP added
diff --git a/org.eclipse.emf.refactor.metrics.uml24.henshin/.settings/org.eclipse.core.resources.prefs b/org.eclipse.emf.refactor.metrics.uml24.henshin/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..a52f4a1
--- /dev/null
+++ b/org.eclipse.emf.refactor.metrics.uml24.henshin/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+encoding//transformations/NNIACP.henshin=UTF-8
+encoding//transformations/NNIACP.henshin_diagram=UTF-8
diff --git a/org.eclipse.emf.refactor.metrics.uml24.henshin/META-INF/MANIFEST.MF b/org.eclipse.emf.refactor.metrics.uml24.henshin/META-INF/MANIFEST.MF
index 6251706..90b7267 100644
--- a/org.eclipse.emf.refactor.metrics.uml24.henshin/META-INF/MANIFEST.MF
+++ b/org.eclipse.emf.refactor.metrics.uml24.henshin/META-INF/MANIFEST.MF
@@ -1,10 +1,14 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: MetricsUML24Henshin
-Bundle-SymbolicName: org.eclipse.emf.refactor.metrics.uml24.henshin;singleton:=true
-Bundle-Version: 0.7.0
-Bundle-Activator: org.eclipse.emf.refactor.metrics.uml24.henshin.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,org.eclipse.em
+ f.ecore,org.eclipse.emf.refactor.metrics,org.eclipse.emf.refactor.met
+ rics.henshin,org.eclipse.uml2.uml
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.7.0
+Bundle-Name: MetricsUML24Henshin
+Bundle-Activator: org.eclipse.emf.refactor.metrics.uml24.henshin.Activ
+ ator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.emf.refactor.metrics.uml24.henshin;si
+ ngleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+
diff --git a/org.eclipse.emf.refactor.metrics.uml24.henshin/bin/org/eclipse/emf/refactor/metrics/NNIACP.class b/org.eclipse.emf.refactor.metrics.uml24.henshin/bin/org/eclipse/emf/refactor/metrics/NNIACP.class
new file mode 100644
index 0000000..72fa6a8
--- /dev/null
+++ b/org.eclipse.emf.refactor.metrics.uml24.henshin/bin/org/eclipse/emf/refactor/metrics/NNIACP.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.metrics.uml24.henshin/build.properties b/org.eclipse.emf.refactor.metrics.uml24.henshin/build.properties
index 34d2e4d..e9863e2 100644
--- a/org.eclipse.emf.refactor.metrics.uml24.henshin/build.properties
+++ b/org.eclipse.emf.refactor.metrics.uml24.henshin/build.properties
@@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ plugin.xml
diff --git a/org.eclipse.emf.refactor.metrics.uml24.henshin/plugin.xml b/org.eclipse.emf.refactor.metrics.uml24.henshin/plugin.xml
new file mode 100644
index 0000000..7e168df
--- /dev/null
+++ b/org.eclipse.emf.refactor.metrics.uml24.henshin/plugin.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<plugin>
+<extension point="org.eclipse.emf.refactor.metrics">
+<metric id="org.eclipse.emf.refactor.metrics.uml24.nniacp" metric_calculate_class="org.eclipse.emf.refactor.metrics.NNIACP" metric_context="Package" metric_description="Number of non-inherited abstract Classes within the Package" metric_metamodel="http://www.eclipse.org/uml2/4.0.0/UML" metric_name="NNIACP"/>
+</extension>
+</plugin>
diff --git a/org.eclipse.emf.refactor.metrics.uml24.henshin/src/org/eclipse/emf/refactor/metrics/NNIACP.java b/org.eclipse.emf.refactor.metrics.uml24.henshin/src/org/eclipse/emf/refactor/metrics/NNIACP.java
new file mode 100644
index 0000000..94df690
--- /dev/null
+++ b/org.eclipse.emf.refactor.metrics.uml24.henshin/src/org/eclipse/emf/refactor/metrics/NNIACP.java
@@ -0,0 +1,43 @@
+package org.eclipse.emf.refactor.metrics;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.refactor.metrics.henshin.managers.HenshinManager;
+import org.eclipse.emf.refactor.metrics.interfaces.IMetricCalculator;
+
+
+public final class NNIACP implements IMetricCalculator {
+
+ private String transformationPath =
+ getFullPath("transformations/NNIACP.henshin");
+
+ private EObject context;
+
+ @Override
+ public void setContext(List<EObject> context) {
+ this.context = context.get(0);
+ }
+
+ @Override
+ public double calculate() {
+ return HenshinManager.run(transformationPath, this.context);
+ }
+
+ private String getFullPath(String transformationPath){
+ URL url = FileLocator.find(org.eclipse.emf.refactor.metrics.uml24.henshin.Activator.getDefault().getBundle(), new Path(transformationPath), Collections.EMPTY_MAP);
+ URL fileUrl = null;
+ try {
+ fileUrl = FileLocator.toFileURL(url);
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ return fileUrl.getPath();
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.emf.refactor.metrics.uml24.henshin/transformations/NNIACP.henshin b/org.eclipse.emf.refactor.metrics.uml24.henshin/transformations/NNIACP.henshin
new file mode 100644
index 0000000..96f9ffa
--- /dev/null
+++ b/org.eclipse.emf.refactor.metrics.uml24.henshin/transformations/NNIACP.henshin
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<henshin:Module xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin">
+ <imports href="http://www.eclipse.org/uml2/4.0.0/UML#/"/>
+ <units xsi:type="henshin:Rule" name="mainRule">
+ <parameters name="context"/>
+ <lhs name="Lhs">
+ <nodes incoming="//@units.0/@lhs/@edges.0">
+ <type href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ <attributes value="true">
+ <type href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isAbstract"/>
+ </attributes>
+ </nodes>
+ <nodes name="context" outgoing="//@units.0/@lhs/@edges.0">
+ <type href="http://www.eclipse.org/uml2/4.0.0/UML#//Package"/>
+ </nodes>
+ <edges source="//@units.0/@lhs/@nodes.1" target="//@units.0/@lhs/@nodes.0">
+ <type href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packagedElement"/>
+ </edges>
+ <formula xsi:type="henshin:Not">
+ <child xsi:type="henshin:NestedCondition">
+ <conclusion>
+ <nodes outgoing="//@units.0/@lhs/@formula/@child/@conclusion/@edges.0">
+ <type href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ <attributes value="true">
+ <type href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isAbstract"/>
+ </attributes>
+ </nodes>
+ <nodes incoming="//@units.0/@lhs/@formula/@child/@conclusion/@edges.0">
+ <type href="http://www.eclipse.org/uml2/4.0.0/UML#//Generalization"/>
+ </nodes>
+ <edges source="//@units.0/@lhs/@formula/@child/@conclusion/@nodes.0" target="//@units.0/@lhs/@formula/@child/@conclusion/@nodes.1">
+ <type href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/generalization"/>
+ </edges>
+ </conclusion>
+ <mappings origin="//@units.0/@lhs/@nodes.0" image="//@units.0/@lhs/@formula/@child/@conclusion/@nodes.0"/>
+ </child>
+ </formula>
+ </lhs>
+ <rhs name="Rhs">
+ <nodes incoming="//@units.0/@rhs/@edges.0">
+ <type href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ <attributes value="true">
+ <type href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isAbstract"/>
+ </attributes>
+ </nodes>
+ <nodes name="context" outgoing="//@units.0/@rhs/@edges.0">
+ <type href="http://www.eclipse.org/uml2/4.0.0/UML#//Package"/>
+ </nodes>
+ <edges source="//@units.0/@rhs/@nodes.1" target="//@units.0/@rhs/@nodes.0">
+ <type href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packagedElement"/>
+ </edges>
+ </rhs>
+ <mappings origin="//@units.0/@lhs/@nodes.0" image="//@units.0/@rhs/@nodes.0"/>
+ <mappings origin="//@units.0/@lhs/@nodes.1" image="//@units.0/@rhs/@nodes.1"/>
+ </units>
+</henshin:Module>
diff --git a/org.eclipse.emf.refactor.metrics.uml24.henshin/transformations/NNIACP.henshin_diagram b/org.eclipse.emf.refactor.metrics.uml24.henshin/transformations/NNIACP.henshin_diagram
new file mode 100644
index 0000000..e57cd32
--- /dev/null
+++ b/org.eclipse.emf.refactor.metrics.uml24.henshin/transformations/NNIACP.henshin_diagram
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_9UW0UFTrEeKbvKxYGXlUPw" type="Henshin" name="NNIACP.henshin_diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_GJNVIFTsEeKbvKxYGXlUPw" type="2001" fontName="Segoe UI" italic="true" fillColor="16114135" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_LXbtgFTsEeKbvKxYGXlUPw" source="defaultAction">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_LXbtgVTsEeKbvKxYGXlUPw" key="value" value="forbid"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_GJQYcFTsEeKbvKxYGXlUPw" type="5001"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_GJQYcVTsEeKbvKxYGXlUPw" type="7001">
+ <children xmi:type="notation:Shape" xmi:id="_LXeJwFTsEeKbvKxYGXlUPw" type="3001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_LXew0FTsEeKbvKxYGXlUPw" type="5002"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_LXew0VTsEeKbvKxYGXlUPw" type="5003"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_LYHC8FTsEeKbvKxYGXlUPw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LYHC8VTsEeKbvKxYGXlUPw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LYHC8lTsEeKbvKxYGXlUPw"/>
+ </children>
+ <element xmi:type="henshin:Node" href="NNIACP.henshin#//@units.0/@lhs/@nodes.0"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LXeJwVTsEeKbvKxYGXlUPw" x="31" y="161"/>
+ </children>
+ </children>
+ <element xmi:type="henshin:Rule" href="NNIACP.henshin#//@units.0"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GJNVIVTsEeKbvKxYGXlUPw" x="37" y="36" width="496" height="384"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_9UW0UVTrEeKbvKxYGXlUPw"/>
+ <element xmi:type="henshin:Module" href="NNIACP.henshin#/"/>
+</notation:Diagram>
diff --git a/org.eclipse.emf.refactor.metrics.uml24.ocl/build.properties b/org.eclipse.emf.refactor.metrics.uml24.ocl/build.properties
index 34d2e4d..e9863e2 100644
--- a/org.eclipse.emf.refactor.metrics.uml24.ocl/build.properties
+++ b/org.eclipse.emf.refactor.metrics.uml24.ocl/build.properties
@@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ plugin.xml