changed functionality of prev argument to metrics, the type is now the same as the result type of the function, also changed the typed for the used metric providers (also exactly the same type, except that singleton values are always wrapped in a set)

Jurgen J. Vinju Jurgen J. Vinju 2014-06-24

removed platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/historic
removed platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/historic/model
changed metric-providers/org.ossmeter.metricprovider.trans.rascal.activecommitters/src/ActiveCommitters.rsc
changed platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/trans/model/RascalMetrics.ecore
changed platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/trans/model/RascalMetrics.emf
changed platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/RascalManager.java
changed platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/RascalMetricProvider.java
changed platform-extensions/org.ossmeter.platform.metricmanager.rascal/plugin.xml
copied platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/historic/model/RascalHistoricMetrics.ecore -> platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/trans/model/TupleMeasurement.java
copied platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/historic/model/RascalHistoricMetrics.emf -> platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/trans/model/DatetimeMeasurement.java
metric-providers/org.ossmeter.metricprovider.trans.rascal.activecommitters/src/ActiveCommitters.rsc Diff Switch to side-by-side view
Loading...
platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/trans/model/RascalMetrics.ecore Diff Switch to side-by-side view
Loading...
platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/trans/model/RascalMetrics.emf Diff Switch to side-by-side view
Loading...
platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/RascalManager.java Diff Switch to side-by-side view
Loading...
platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/RascalMetricProvider.java Diff Switch to side-by-side view
Loading...
platform-extensions/org.ossmeter.platform.metricmanager.rascal/plugin.xml Diff Switch to side-by-side view
Loading...
platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/historic/model/RascalHistoricMetrics.ecore to platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/trans/model/TupleMeasurement.java
--- a/platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/historic/model/RascalHistoricMetrics.ecore
+++ b/platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/trans/model/TupleMeasurement.java
@@ -1,8 +1,35 @@
-<?xml version="1.0" encoding="ASCII"?>
-<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="org.ossmeter.metricprovider.rascal.historic.model">
-  <eClassifiers xsi:type="ecore:EClass" name="RascalHistoricMetrics">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="measurements" upperBound="-1" containment="true">
-      <eType xsi:type="ecore:EClass" href="platform:/resource/org.ossmeter.platform-extensions.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/trans/model/RascalMetrics.ecore#//Measurement"/>
-    </eStructuralFeatures>
-  </eClassifiers>
-</ecore:EPackage>
+package org.ossmeter.metricprovider.rascal.trans.model;
+
+import java.util.List;
+
+import com.googlecode.pongo.runtime.PongoList;
+import com.googlecode.pongo.runtime.querying.StringQueryProducer;
+import com.mongodb.BasicDBList;
+
+
+public class TupleMeasurement extends Measurement {
+	
+	protected List<Measurement> value = null;
+	
+	
+	public TupleMeasurement() { 
+		super();
+		dbObject.put("value", new BasicDBList());
+		super.setSuperTypes("org.ossmeter.metricprovider.rascal.trans.model.Measurement");
+		URI.setOwningType("org.ossmeter.metricprovider.rascal.trans.model.ListMeasurement");
+	}
+	
+	public static StringQueryProducer URI = new StringQueryProducer("uri"); 
+	
+	
+	
+	
+	public List<Measurement> getValue() {
+		if (value == null) {
+			value = new PongoList<Measurement>(this, "value", true);
+		}
+		return value;
+	}
+	
+	
+}
platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/historic/model/RascalHistoricMetrics.emf to platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/trans/model/DatetimeMeasurement.java
--- a/platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/historic/model/RascalHistoricMetrics.emf
+++ b/platform-extensions/org.ossmeter.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/trans/model/DatetimeMeasurement.java
@@ -1,9 +1,35 @@
-package org.ossmeter.metricprovider.rascal.historic.model;
+package org.ossmeter.metricprovider.rascal.trans.model;
 
-import "platform:/resource/org.ossmeter.platform-extensions.platform.metricmanager.rascal/src/org/ossmeter/metricprovider/rascal/trans/model/RascalMetrics.ecore";
+import com.googlecode.pongo.runtime.querying.NumericalQueryProducer;
+import com.googlecode.pongo.runtime.querying.StringQueryProducer;
 
-@db(qualifiedCollectionNames="true")
-@customize
-class RascalHistoricMetrics {
-    val org.ossmeter.metricprovider.rascal.trans.model.Measurement[*] measurements;
-}
+
+public class DatetimeMeasurement extends Measurement {
+	
+	
+	
+	public DatetimeMeasurement() { 
+		super();
+		super.setSuperTypes("org.ossmeter.metricprovider.rascal.trans.model.Measurement");
+		URI.setOwningType("org.ossmeter.metricprovider.rascal.trans.model.DatetimeMeasurement");
+		VALUE.setOwningType("org.ossmeter.metricprovider.rascal.trans.model.DatetimeMeasurement");
+	}
+	
+	public static StringQueryProducer URI = new StringQueryProducer("uri"); 
+	public static NumericalQueryProducer VALUE = new NumericalQueryProducer("value");
+	
+	
+	public long getValue() {
+		return parseLong(dbObject.get("value")+"", 0);
+	}
+	
+	public DatetimeMeasurement setValue(long value) {
+		dbObject.put("value", value);
+		notifyChanged();
+		return this;
+	}
+	
+	
+	
+	
+}