Commit c118aee7 authored by Erwan Bousse's avatar Erwan Bousse

Single benchmarking tool product

parent 437ad46f
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Université de Rennes 1.
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:
Erwan Bousse - initial API and implementation
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
......
/*******************************************************************************
* Copyright (c) 2014 Université de Rennes 1.
* 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:
* Erwan Bousse - initial API and implementation
******************************************************************************/
package fr.inria.diverse.cloning.benchmark.common;
import java.util.List;
......
/*******************************************************************************
* Copyright (c) 2014 Université de Rennes 1.
* 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:
* Erwan Bousse - initial API and implementation
******************************************************************************/
package fr.inria.diverse.cloning.benchmark.common;
public class MetamodelMetrics {
......
/*******************************************************************************
* Copyright (c) 2014 Université de Rennes 1.
* 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:
* Erwan Bousse - initial API and implementation
******************************************************************************/
package fr.inria.diverse.cloning.benchmark.common;
import org.eclipse.emf.ecore.resource.ResourceSet;
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Université de Rennes 1.
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:
Erwan Bousse - initial API and implementation
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
......
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/commons-io-1.4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.6.6.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jopt-simple-4.6.jar"/>
<classpathentry exported="true" kind="lib" path="lib/zt-zip-1.7.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
......
......@@ -10,11 +10,9 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0",
org.eclipse.jdt.core;bundle-version="3.9.1",
fr.inria.diverse.cloning.runtime;bundle-version="0.1.0",
fr.inria.diverse.cloning.materialgenerator;bundle-version="0.1.0",
fr.inria.diverse.cloning.benchmark.common;bundle-version="0.1.0"
fr.inria.diverse.cloning.benchmark.common;bundle-version="0.1.0",
fr.inria.diverse.cloning.external-libs;bundle-version="0.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: fr.inria.diverse.cloning.benchmark.materialgenerator.generator
Bundle-ClassPath: .,
lib/zt-zip-1.7.jar,
lib/jopt-simple-4.6.jar,
lib/commons-io-1.4.jar,
lib/slf4j-api-1.6.6.jar
Export-Package: fr.inria.diverse.cloning.benchmark.materialgenerator.generator,
fr.inria.diverse.cloning.benchmark.materialgenerator.main
Bundle-ClassPath: .
......@@ -2,8 +2,5 @@ source.. = src/
output.. = target/classes
bin.includes = plugin.xml,\
META-INF/,\
.,\
lib/jopt-simple-4.6.jar,\
lib/commons-io-1.4.jar,\
lib/slf4j-api-1.6.6.jar,\
lib/zt-zip-1.7.jar
.
jars.compile.order = .
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Université de Rennes 1.
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:
Erwan Bousse - initial API and implementation
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
......
/*******************************************************************************
* Copyright (c) 2014 Université de Rennes 1.
* 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:
* Erwan Bousse - initial API and implementation
******************************************************************************/
package fr.inria.diverse.cloning.benchmark.materialgenerator.generator;
import java.io.File;
......
/*******************************************************************************
* Copyright (c) 2014 Université de Rennes 1.
* 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:
* Erwan Bousse - initial API and implementation
******************************************************************************/
package fr.inria.diverse.cloning.benchmark.materialgenerator.generator;
import java.io.File;
......
/*******************************************************************************
* Copyright (c) 2014 Université de Rennes 1.
* 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:
* Erwan Bousse - initial API and implementation
******************************************************************************/
package fr.inria.diverse.cloning.benchmark.materialgenerator.generator;
import java.io.File;
......
/*******************************************************************************
* Copyright (c) 2014 Université de Rennes 1.
* 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:
* Erwan Bousse - initial API and implementation
******************************************************************************/
package fr.inria.diverse.cloning.benchmark.materialgenerator.main;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
......@@ -18,6 +29,7 @@ import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.equinox.app.IApplication;
......@@ -32,6 +44,7 @@ import fr.inria.diverse.cloning.benchmark.materialgenerator.generator.BenchmarkM
import fr.inria.diverse.cloning.benchmark.materialgenerator.generator.ModelCreatorGenerator;
import fr.inria.diverse.cloning.benchmark.materialgenerator.generator.OsgiBundleGenerator;
import fr.inria.diverse.cloning.materialgenerator.generators.EMFCodeGenerator;
import fr.inria.diverse.cloning.materialgenerator.generators.EMFCodeGenerator.EMFGenerationException;
import fr.inria.diverse.cloning.materialgenerator.generators.PImplGenerator;
import fr.inria.diverse.cloning.materialgenerator.tagger.Tagger;
import fr.inria.diverse.cloning.materialgenerator.tagger.impl.DeepCloningTagger;
......@@ -46,17 +59,10 @@ import fr.inria.diverse.cloning.runtime.util.Log;
@SuppressWarnings("restriction")
public class Application implements IApplication {
/*
* (non-Javadoc)
*
* @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
*/
public Object start(IApplicationContext context) throws Exception {
public static void realMain(String[] args) throws IOException, CoreException {
Log.info("Starting cloning benchmark material generator.");
String[] args = (String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS);
// Specifying arguments
OptionParser parser = new OptionParser();
OptionSpec<File> metamodelsFolderOption = parser
......@@ -189,7 +195,20 @@ public class Application implements IApplication {
} catch (OptionException e) {
Log.error("Invalid options: " + e.getMessage());
parser.printHelpOn(System.out);
} catch (EMFGenerationException e) {
System.err.println("There was a problem during EMF model code generation.");
e.printStackTrace();
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
*/
public Object start(IApplicationContext context) throws Exception {
String[] args = (String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS);
realMain(args);
return IApplication.EXIT_OK;
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Université de Rennes 1.
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:
Erwan Bousse - initial API and implementation
-->
<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="shareattributes" nsURI="http://shareattributes/1.0" nsPrefix="shareattributes">
<eClassifiers xsi:type="ecore:EClass" name="EClass0">
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Université de Rennes 1.
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:
Erwan Bousse - initial API and implementation
-->
<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="simple1" nsURI="http://simple1/1.0" nsPrefix="simple1">
<eClassifiers xsi:type="ecore:EClass" name="A">
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Université de Rennes 1.
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:
Erwan Bousse - initial API and implementation
-->
<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="simple2" nsURI="http://simple2/1.0" nsPrefix="simple2">
<eClassifiers xsi:type="ecore:EClass" name="A">
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Université de Rennes 1.
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:
Erwan Bousse - initial API and implementation
-->
<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="welldesigned" nsURI="http://welldesigned/1.0" nsPrefix="welldesigned">
<eClassifiers xsi:type="ecore:EClass" name="Root">
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Université de Rennes 1.
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:
Erwan Bousse - initial API and implementation
-->
<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="welldesigned2roots" nsURI="http://welldesigned2roots/1.0" nsPrefix="welldesigned2roots">
<eClassifiers xsi:type="ecore:EClass" name="Root">
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Université de Rennes 1.
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:
Erwan Bousse - initial API and implementation
-->
<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="shareattributes" nsURI="http://shareattributes/1.0" nsPrefix="shareattributes">
<eClassifiers xsi:type="ecore:EClass" name="EClass0">
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Université de Rennes 1.
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:
Erwan Bousse - initial API and implementation
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
......
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/jopt-simple-4.6.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
......
......@@ -10,7 +10,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0",
org.eclipse.gmf.runtime.notation;bundle-version="1.7.0",
org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.7.0",
fr.inria.diverse.cloning.materialgenerator;bundle-version="0.1.0",
fr.inria.diverse.cloning.runtime;bundle-version="0.1.0"
fr.inria.diverse.cloning.runtime;bundle-version="0.1.0",
fr.inria.diverse.cloning.external-libs;bundle-version="0.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: lib/jopt-simple-4.6.jar,
.
Bundle-ClassPath: .
Export-Package: fr.inria.diverse.cloning.benchmark.metamodelsgenerator.main
......@@ -2,5 +2,4 @@ source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
.,\
lib/jopt-simple-4.6.jar
.
......@@ -7,7 +7,7 @@
point="org.eclipse.core.runtime.applications">
<application>
<run
class="benchmarkmetamodelsgenerator.main.Application">
class="fr.inria.diverse.cloning.benchmark.metamodelsgenerator.main.Application">
</run>
</application>
</extension>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Université de Rennes 1.
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:
Erwan Bousse - initial API and implementation
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
......
package benchmarkmetamodelsgenerator.diagramgenerator;
/*******************************************************************************
* Copyright (c) 2014 Université de Rennes 1.
* 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:
* Erwan Bousse - initial API and implementation
******************************************************************************/
package fr.inria.diverse.cloning.benchmark.metamodelsgenerator.diagramgenerator;
import java.io.File;
import java.io.IOException;
......
package benchmarkmetamodelsgenerator.generator;
/*******************************************************************************
* Copyright (c) 2014 Université de Rennes 1.
* 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:
* Erwan Bousse - initial API and implementation
******************************************************************************/
package fr.inria.diverse.cloning.benchmark.metamodelsgenerator.generator;
import java.io.File;
......
package benchmarkmetamodelsgenerator.generator;
/*******************************************************************************
* Copyright (c) 2014 Université de Rennes 1.
* 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:
* Erwan Bousse - initial API and implementation
******************************************************************************/
package fr.inria.diverse.cloning.benchmark.metamodelsgenerator.generator;
import java.util.ArrayList;
import java.util.HashMap;
......
package benchmarkmetamodelsgenerator.generator;
/*******************************************************************************
* Copyright (c) 2014 Université de Rennes 1.
* 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:
* Erwan Bousse - initial API and implementation
******************************************************************************/
package fr.inria.diverse.cloning.benchmark.metamodelsgenerator.generator;
import java.util.ArrayList;
import java.util.List;
......
package benchmarkmetamodelsgenerator.main;
/*******************************************************************************
* Copyright (c) 2014 Université de Rennes 1.
* 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:
* Erwan Bousse - initial API and implementation
******************************************************************************/
package fr.inria.diverse.cloning.benchmark.metamodelsgenerator.main;
import java.io.File;
import java.io.IOException;