Commit 06a7e2c3 authored by Erwan Bousse's avatar Erwan Bousse

Versionning everything

parent cf54973e
<?xml version="1.0" encoding="UTF-8"?>
<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="lapin" nsURI="http://lapin" nsPrefix="lapin">
<eClassifiers xsi:type="ecore:EClass" name="Class0">
<eStructuralFeatures xsi:type="ecore:EReference" name="refClass1_1" eType="#//Class1"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="refClass4_4" eType="#//Class4"
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Class1">
<eStructuralFeatures xsi:type="ecore:EReference" name="refClass2_2" eType="#//Class2"
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Class2">
<eStructuralFeatures xsi:type="ecore:EReference" name="refClass3_3" eType="#//Class3"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="attEInt_5" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="attEBoolean_8" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="attEInt_9_m" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="attEBoolean_12_m" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Class3">
<eStructuralFeatures xsi:type="ecore:EReference" name="refClass0_7" eType="#//Class0"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="refClass0_11_m" eType="#//Class0"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Class4">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="attEInt_6" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="attEInt_10_m" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eClassifiers>
</ecore:EPackage>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.externalJavaSearch"/>
<classpathentry kind="output" path=""/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>External Plug-in Libraries</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
#
#Mon Mar 03 19:11:35 CET 2014
searchablePlugins=org.eclipse.emf.importer,org.eclipse.emf.importer.ecore,org.eclipse.pde.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<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="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>SomeManipulations</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.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: SomeManipulations;singleton:=true
Bundle-Version: 0.1.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore,
org.eclipse.emf.ecore.xmi;bundle-version="2.9.1",
org.eclipse.emf.common,
FancyEMFCloning;bundle-version="0.1.0",
SomeMetamodel;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
#
bin.includes = .,\
META-INF/,\
plugin.xml,\
plugin.properties
jars.compile.order = .
source.. = src/
output.. = bin/
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel">
<somemetamodel:A>
<c href="file/tmp/deepClone/submodel2.xmi#/0"/>
<x href="file/tmp/deepClone/submodel2.xmi#/1"/>
</somemetamodel:A>
<somemetamodel:B/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel" xmlns:somemetamodelextension="http://somemetamodelextension/1.0">
<somemetamodel:C/>
<somemetamodelextension:X/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel">
<somemetamodel:A>
<c href="file/tmp/mutableClassesOnlyClone/submodel2.xmi#/0"/>
<x href="file/tmp/submodel2.xmi#/1"/>
</somemetamodel:A>
<somemetamodel:B/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel" xmlns:somemetamodelextension="http://somemetamodelextension/1.0">
<somemetamodel:C/>
<somemetamodelextension:X/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel">
<somemetamodel:A>
<c href="file/tmp/submodel2.xmi#/0"/>
<x href="file/tmp/submodel2.xmi#/1"/>
</somemetamodel:A>
<somemetamodel:B/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel" xmlns:somemetamodelextension="http://somemetamodelextension/1.0">
<somemetamodel:C/>
<somemetamodelextension:X/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel">
<somemetamodel:A>
<c href="submodel2.xmi#/0"/>
<x href="submodel2.xmi#/1"/>
</somemetamodel:A>
<somemetamodel:B/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel" xmlns:somemetamodelextension="http://somemetamodelextension/1.0">
<somemetamodel:C/>
<somemetamodelextension:X/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel">
<somemetamodel:A>
<c href="submodel2.xmi#/0"/>
<x href="submodel2.xmi#/1"/>
</somemetamodel:A>
<somemetamodel:B/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel" xmlns:somemetamodelextension="http://somemetamodelextension/1.0">
<somemetamodel:C/>
<somemetamodelextension:X/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel">
<somemetamodel:A>
<c href="submodel2.xmi#/0"/>
<x href="submodel2.xmi#/1"/>
</somemetamodel:A>
<somemetamodel:B/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel" xmlns:somemetamodelextension="http://somemetamodelextension/1.0">
<somemetamodel:C/>
<somemetamodelextension:X/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel">
<somemetamodel:A>
<c href="submodel2.xmi#/0"/>
<x href="submodel2.xmi#/1"/>
</somemetamodel:A>
<somemetamodel:B/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel" xmlns:somemetamodelextension="http://somemetamodelextension/1.0">
<somemetamodel:C/>
<somemetamodelextension:X/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel">
<somemetamodel:A>
<c href="submodel2.xmi#/0"/>
<x href="submodel2.xmi#/1"/>
</somemetamodel:A>
<somemetamodel:B/>
</xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:somemetamodel="http://somemetamodel" xmlns:somemetamodelextension="http://somemetamodelextension/1.0">
<somemetamodel:C/>
<somemetamodelextension:X/>
</xmi:XMI>
#
pluginName = SomeMetamodel Model
providerName = www.example.org
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
-->
<plugin>
<extension point="org.eclipse.emf.ecore.generated_package">
<!-- @generated SomeMetamodel -->
<package
uri="http://somemetamodel"
class="somemetamodel.SomemetamodelPackage"/>
</extension>
</plugin>
package main;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
import somemetamodel.A;
import somemetamodel.B;
import somemetamodel.C;
import somemetamodel.SomemetamodelFactory;
public class MainShowNoShare {
public static void main(String[] args) {
// Creating some objects from our metamodel
SomemetamodelFactory factory = SomemetamodelFactory.eINSTANCE;
A a1 = factory.createA();
B b1 = factory.createB();
A a2 = factory.createA();
B b2 = factory.createB();
C cShared = factory.createC();
// Preparing serialization
Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
Map<String, Object> m = reg.getExtensionToFactoryMap();
m.put("xmi", new XMIResourceFactoryImpl());
// Creating the resources (= models) set
ResourceSet resSet = new ResourceSetImpl();
// Creating a first model in the set
Resource model1 = resSet.createResource(URI.createURI("models/model1.xmi"));
model1.getContents().add(a1);
model1.getContents().add(b1);
model1.getContents().add(cShared);
// Creating a second model in the set
Resource model2 = resSet.createResource(URI.createURI("models/model2.xmi"));
model2.getContents().add(a2);
model2.getContents().add(b2);
model2.getContents().add(cShared); //TODO /!\ here C is removed from model1 and added to model2
// model2 = clone(model1)
// Saving the models into files
try {
model1.save(Collections.EMPTY_MAP);
model2.save(Collections.EMPTY_MAP);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
package main;
import java.util.Map;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
import somemetamodel.A;
import somemetamodel.B;
import somemetamodel.C;
import somemetamodel.SomemetamodelFactory;
public class MainTestChangeResource {
public static void main(String[] args) {
// Creating some objects from our metamodel
SomemetamodelFactory factory = SomemetamodelFactory.eINSTANCE;
A a = factory.createA();
B b1 = factory.createB();
B b2 = factory.createB();
C c = factory.createC();
// Preparing serialization
Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
Map<String, Object> m = reg.getExtensionToFactoryMap();
m.put("xmi", new XMIResourceFactoryImpl());
// Creating the resource sets (= models)
ResourceSet model1 = new ResourceSetImpl();
ResourceSet model2 = new ResourceSetImpl();
// Creating the first model
Resource submodel1 = model1.createResource(URI.createURI("models/submodel1.xmi"));
submodel1.getContents().add(a);
submodel1.getContents().add(b1);
// Creating the second model
Resource submodel2 = model2.createResource(URI.createURI("models/submodel2.xmi"));
submodel2.getContents().add(b2);
submodel2.getContents().add(c);
a.setB(b1);
a.setB(b2);
a.setC(c);
}
}
package main;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;