Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMF Compare Start problem
EMF Compare Start problem [message #530695] Fri, 30 April 2010 10:47 Go to next message
Bogie is currently offline Bogie
Messages: 14
Registered: April 2010
Junior Member
Hi,

I'm new to EMF Compare and I tried to execute the example standalone application ( i run it in eclipse), by comparing 2 uml files (i register the additional packages). Unfortunately I get an exception:

org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object 'org.eclipse.uml2.uml.internal.impl.ClassImpl@117f31e (name: Class3, visibility: <unset>) (isLeaf: false, isAbstract: false) (isActive: false)' is not contained in a resource.

When I run it in debug mode, I can see that the exception happens at:
System.out.println(ModelUtils.serialize(match));

When I compare the same uml files non programmatically, I get a normal result with a number of differences.
I can't understand what's wrong for days. Can anyone help me please?
Re: EMF Compare Start problem [message #530967 is a reply to message #530695] Mon, 03 May 2010 04:32 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1609
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060606000902010201050701
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Bogie,

The "System.out.println(ModelUtils.serialize(match)" line is only there
to give console feedback on what was matched ... and there are clearly
better ways to do so.

As for the actual error ; there are references from one (or both) of
your model(s) to an object that isn't contained in any model ... do you
create EObjects anywhere in your code (to reference them from other
objects, to add them to the model, ...)? I do not understand where the
"mailto:" part comes from in the error message you get, my best bet
would be that you have an EObject which "toString" returns
"mailto:<reference>", and this EObject would be the culprit :
"'mailto:....' is not contained in a resource".

If nothing of this rings a bell, could you attach your sample models and
the code you're running?

Laurent Goubet
Obeo

Bogie wrote:
> Hi,
>
> I'm new to EMF Compare and I tried to execute the example standalone
> application ( i run it in eclipse), by comparing 2 uml files (i register
> the additional packages). Unfortunately I get an exception:
>
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object
> mailto:'org.eclipse.uml2.uml.internal.impl.ClassImpl@117f31e (name:
> Class3, visibility: <unset>) (isLeaf: false, isAbstract: false)
> (isActive: false)' is not contained in a resource.
>
> When I run it in debug mode, I can see that the exception happens at:
> System.out.println(ModelUtils.serialize(match));
> When I compare the same uml files non programmatically, I get a normal
> result with a number of differences.
> I can't understand what's wrong for days. Can anyone help me please?
>


--------------060606000902010201050701
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------060606000902010201050701--
Re: EMF Compare Start problem [message #530999 is a reply to message #530967] Mon, 03 May 2010 06:16 Go to previous messageGo to next message
Bogie is currently offline Bogie
Messages: 14
Registered: April 2010
Junior Member
Hi,

Thank you for your reply. I don't create EObjects in my code, I just take the models as arguments from the command line. I don't change anything in the code because I wanted to try the basic example in order to start.
The two uml models I use are the following:

model1.uml:
<?xml version="1.0" encoding="UTF-8"?>
<uml:Package xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xmi:id="_9bQ4ULT8Ed2kfr6ZNjmMHg" name="testModels">
<elementImport xmi:id="_9cHz8LT8Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
</elementImport>
<elementImport xmi:id="_9cHz8bT8Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</elementImport>
<elementImport xmi:id="_9cHz8rT8Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Unlimi tedNatural"/>
</elementImport>
<elementImport xmi:id="_9cHz87T8Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Intege r"/>
</elementImport>
<packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg" name="Class1">
<ownedAttribute xmi:id="_eY790LT-Ed2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
<ownedAttribute xmi:id="_fiLd0LT-Ed2kfr6ZNjmMHg" name="attribute1" aggregation="composite"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg" name="Class3"/>
<packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg" name="Class2">
<ownedAttribute xmi:id="_eY790LT-Ed2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
</packagedElement>
<packagedElement xmi:type="uml:Package" xmi:id="_q_x3oLUAEd2kfr6ZNjmMHg" name="package1">
<packagedElement xmi:type="uml:Package" xmi:id="_rd8aULUAEd2kfr6ZNjmMHg" name="package2">
<packagedElement xmi:type="uml:Package" xmi:id="_roAVQLUAEd2kfr6ZNjmMHg" name="package3">
<packagedElement xmi:type="uml:Class" xmi:id="_vStFYLUAEd2kfr6ZNjmMHg" name="Class1">
<ownedAttribute xmi:id="_vStFYbUAEd2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
<ownedAttribute xmi:id="_vStFYrUAEd2kfr6ZNjmMHg" name="attribute1" aggregation="composite"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_vStFY7UAEd2kfr6ZNjmMHg" name="Class3"/>
<packagedElement xmi:type="uml:Class" xmi:id="_vStFZLUAEd2kfr6ZNjmMHg" name="Class2">
<ownedAttribute xmi:id="_vStFZbUAEd2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
</packagedElement>
</packagedElement>
</packagedElement>
</packagedElement>
</uml:Package>

model2.uml:

<?xml version="1.0" encoding="UTF-8"?>
<uml:Package xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xmi:id="_ZDkboLT-Ed2kfr6ZNjmMHg" name="testModels">
<packagedElement xmi:type="uml:Package" xmi:id="_gPEHELUAEd2kfr6ZNjmMHg" name="package1">
<packagedElement xmi:type="uml:Package" xmi:id="_ir1EcLUAEd2kfr6ZNjmMHg" name="package2">
<packagedElement xmi:type="uml:Package" xmi:id="_kd9wcLUAEd2kfr6ZNjmMHg" name="package3">
<packagedElement xmi:type="uml:Class" xmi:id="_mU_jgLUAEd2kfr6ZNjmMHg" name="Class3"/>
<packagedElement xmi:type="uml:Class" xmi:id="_mU_jgbUAEd2kfr6ZNjmMHg" name="Class2">
<ownedAttribute xmi:id="_mU_jgrUAEd2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_mU_jg7UAEd2kfr6ZNjmMHg" name="Class1">
<ownedAttribute xmi:id="_mU_jhLUAEd2kfr6ZNjmMHg" name="attribute1" aggregation="composite"/>
<ownedAttribute xmi:id="_mU_jhbUAEd2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
</packagedElement>
</packagedElement>
</packagedElement>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_Z7YNYLT-Ed2kfr6ZNjmMHg" name="Class1">
<ownedAttribute xmi:id="_bM11QLT-Ed2kfr6ZNjmMHg" name="attribute1" aggregation="composite"/>
<ownedAttribute xmi:id="_cYr9ULT-Ed2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
</packagedElement>
<elementImport xmi:id="_ZELfoLT-Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
</elementImport>
<elementImport xmi:id="_ZELfobT-Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</elementImport>
<elementImport xmi:id="_ZELforT-Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Unlimi tedNatural"/>
</elementImport>
<elementImport xmi:id="_ZELfo7T-Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Intege r"/>
</elementImport>
<packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg" name="Class3"/>
<packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg" name="Class2">
<ownedAttribute xmi:id="_eY790LT-Ed2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
</packagedElement>


</uml:Package>

The code is:

package standalone.example.launcher;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.compare.diff.metamodel.DiffElement;
import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
import org.eclipse.emf.compare.diff.metamodel.DiffModel;
import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSna pshot;
import org.eclipse.emf.compare.diff.service.DiffService;
import org.eclipse.emf.compare.match.metamodel.MatchModel;
import org.eclipse.emf.compare.match.service.MatchService;
import org.eclipse.emf.compare.util.ModelUtils;
import org.eclipse.emf.ecore.EObject;
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.compare.diff.merge.service.MergeService;

import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.resource.UMLResource;
/**
* This application will try and launch an headless model comparison.
*
* @author Cedric Brun <a href="mailto:cedric.brun@obeo.fr">cedric.brun@obeo.fr</a>
*/
public final class ExampleLauncher {
/**
* This class doesn't need to be instantiated.
*/
private ExampleLauncher() {
// prevents instantiation
}

/**
* Launcher of this application.
*
* @param args
* Arguments of the launch.
*/
public static void main(String[] args) {
if (args.length == 2 && new File(args[0]).canRead() && new File(args[1]).canRead()) {
// Creates the resourceSets where we'll load the models
final ResourceSet resourceSet1 = new ResourceSetImpl();
final ResourceSet resourceSet2 = new ResourceSetImpl();
// Register additionnal packages here. For UML2 for instance :
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put(UMLResource.FILE_EXTENSION,
UMLResource.Factory.INSTANCE);
resourceSet1.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
resourceSet2.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);

try {
System.out.println("Loading resources.\n"); //$NON-NLS-1$
// Loads the two models passed as arguments
final EObject model1 = ModelUtils.load(new File(args[0]), resourceSet1);
final EObject model2 = ModelUtils.load(new File(args[1]), resourceSet2);

// Creates the match then the diff model for those two models
System.out.println("Matching models.\n"); //$NON-NLS-1$
final MatchModel match = MatchService.doMatch(model1, model2, Collections
.<String, Object> emptyMap());
System.out.println("Differencing models.\n"); //$NON-NLS-1$
final DiffModel diff = DiffService.doDiff(match, false);

System.out.println("Merging difference to args[1].\n"); //$NON-NLS-1$
final List<DiffElement> differences = new ArrayList<DiffElement>(diff.getOwnedElements());
// This will merge all references to the right model (second argument).
MergeService.merge(differences, true);

// Prints the results
try {
System.out.println("MatchModel :\n"); //$NON-NLS-1$
System.out.println(ModelUtils.serialize(match));
System.out.println("DiffModel :\n"); //$NON-NLS-1$
System.out.println(ModelUtils.serialize(diff));
} catch (final IOException e) {
e.printStackTrace();
}

// Serializes the result as "result.emfdiff" in the directory this class has been called from.
System.out.println("saving emfdiff as \"result.emfdiff\""); //$NON-NLS-1$
final ComparisonResourceSnapshot snapshot = DiffFactory.eINSTANCE
.createComparisonResourceSnapshot();
snapshot.setDate(Calendar.getInstance().getTime());
snapshot.setMatch(match);
snapshot.setDiff(diff);
ModelUtils.save(snapshot, "result.emfdiff"); //$NON-NLS-1$
} catch (final IOException e) {
// shouldn't be thrown
e.printStackTrace();
} catch (final InterruptedException e) {
e.printStackTrace();
}
} else {
System.out.println("usage : ExampleLauncher <Model1> <Model2>"); //$NON-NLS-1$
}
}
}

Another thing is that when I comment the line that gives me the error, System.out.println(ModelUtils.serialize(match));

I still get the same error but on:
ModelUtils.save(snapshot, "result.emfdiff");

Re: EMF Compare Start problem [message #531009 is a reply to message #530999] Mon, 03 May 2010 07:25 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1609
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040303020105070809050005
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Bogie,

I can't really see where the problem would come from ; though I can say
you're not registering everything UML needs in ordder to use it
standalone. You can find everything needed here :
http://wiki.eclipse.org/MDT/UML2/FAQ#What.27s_required_to_lo ad_a_UML_.28.uml.29_resource_from_a_standalone_application.3 F

Looking at your model, you need to register
"UMLResource.LIBRARIES_PATHMAP" at the very least. That is ... _if_
you're indeed using this Java class as a standalone application.
Registering these should help with your comparison.

These lines aren't needed when you compare the two files in Eclipse as
the UML plugin in this case does every needed step itself.

Laurent Goubet
Obeo

Bogie wrote:
> Hi,
>
> Thank you for your reply. I don't create EObjects in my code, I just
> take the models as arguments from the command line. I don't change
> anything in the code because I wanted to try the basic example in order
> to start. The two uml models I use are the following:
>
> model1.uml:
> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Package xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> xmi:id="_9bQ4ULT8Ed2kfr6ZNjmMHg" name="testModels">
> <elementImport xmi:id="_9cHz8LT8Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
> </elementImport>
> <elementImport xmi:id="_9cHz8bT8Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
> </elementImport>
> <elementImport xmi:id="_9cHz8rT8Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Unlimi tedNatural"/>
>
> </elementImport>
> <elementImport xmi:id="_9cHz87T8Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Intege r"/>
> </elementImport>
> <packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg"
> name="Class1">
> <ownedAttribute xmi:id="_eY790LT-Ed2kfr6ZNjmMHg" name="attribute2"
> aggregation="composite"/>
> <ownedAttribute xmi:id="_fiLd0LT-Ed2kfr6ZNjmMHg" name="attribute1"
> aggregation="composite"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg"
> name="Class3"/>
> <packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg"
> name="Class2">
> <ownedAttribute xmi:id="_eY790LT-Ed2kfr6ZNjmMHg" name="attribute2"
> aggregation="composite"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Package"
> xmi:id="_q_x3oLUAEd2kfr6ZNjmMHg" name="package1">
> <packagedElement xmi:type="uml:Package"
> xmi:id="_rd8aULUAEd2kfr6ZNjmMHg" name="package2">
> <packagedElement xmi:type="uml:Package"
> xmi:id="_roAVQLUAEd2kfr6ZNjmMHg" name="package3">
> <packagedElement xmi:type="uml:Class"
> xmi:id="_vStFYLUAEd2kfr6ZNjmMHg" name="Class1">
> <ownedAttribute xmi:id="_vStFYbUAEd2kfr6ZNjmMHg"
> name="attribute2" aggregation="composite"/>
> <ownedAttribute xmi:id="_vStFYrUAEd2kfr6ZNjmMHg"
> name="attribute1" aggregation="composite"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Class"
> xmi:id="_vStFY7UAEd2kfr6ZNjmMHg" name="Class3"/>
> <packagedElement xmi:type="uml:Class"
> xmi:id="_vStFZLUAEd2kfr6ZNjmMHg" name="Class2">
> <ownedAttribute xmi:id="_vStFZbUAEd2kfr6ZNjmMHg"
> name="attribute2" aggregation="composite"/>
> </packagedElement>
> </packagedElement>
> </packagedElement>
> </packagedElement>
> </uml:Package>
>
> model2.uml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Package xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> xmi:id="_ZDkboLT-Ed2kfr6ZNjmMHg" name="testModels">
> <packagedElement xmi:type="uml:Package"
> xmi:id="_gPEHELUAEd2kfr6ZNjmMHg" name="package1">
> <packagedElement xmi:type="uml:Package"
> xmi:id="_ir1EcLUAEd2kfr6ZNjmMHg" name="package2">
> <packagedElement xmi:type="uml:Package"
> xmi:id="_kd9wcLUAEd2kfr6ZNjmMHg" name="package3">
> <packagedElement xmi:type="uml:Class"
> xmi:id="_mU_jgLUAEd2kfr6ZNjmMHg" name="Class3"/>
> <packagedElement xmi:type="uml:Class"
> xmi:id="_mU_jgbUAEd2kfr6ZNjmMHg" name="Class2">
> <ownedAttribute xmi:id="_mU_jgrUAEd2kfr6ZNjmMHg"
> name="attribute2" aggregation="composite"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Class"
> xmi:id="_mU_jg7UAEd2kfr6ZNjmMHg" name="Class1">
> <ownedAttribute xmi:id="_mU_jhLUAEd2kfr6ZNjmMHg"
> name="attribute1" aggregation="composite"/>
> <ownedAttribute xmi:id="_mU_jhbUAEd2kfr6ZNjmMHg"
> name="attribute2" aggregation="composite"/>
> </packagedElement>
> </packagedElement>
> </packagedElement>
> </packagedElement>
> <packagedElement xmi:type="uml:Class" xmi:id="_Z7YNYLT-Ed2kfr6ZNjmMHg"
> name="Class1">
> <ownedAttribute xmi:id="_bM11QLT-Ed2kfr6ZNjmMHg" name="attribute1"
> aggregation="composite"/>
> <ownedAttribute xmi:id="_cYr9ULT-Ed2kfr6ZNjmMHg" name="attribute2"
> aggregation="composite"/>
> </packagedElement>
> <elementImport xmi:id="_ZELfoLT-Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
> </elementImport>
> <elementImport xmi:id="_ZELfobT-Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
> </elementImport>
> <elementImport xmi:id="_ZELforT-Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Unlimi tedNatural"/>
>
> </elementImport>
> <elementImport xmi:id="_ZELfo7T-Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Intege r"/>
> </elementImport>
> <packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg"
> name="Class3"/>
> <packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg"
> name="Class2">
> <ownedAttribute xmi:id="_eY790LT-Ed2kfr6ZNjmMHg" name="attribute2"
> aggregation="composite"/>
> </packagedElement>
>
>
> </uml:Package>
>
> The code is:
>
> package standalone.example.launcher;
>
> import java.io.File;
> import java.io.IOException;
> import java.util.ArrayList;
> import java.util.Calendar;
> import java.util.Collections;
> import java.util.List;
>
> import org.eclipse.emf.compare.diff.metamodel.DiffElement;
> import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
> import org.eclipse.emf.compare.diff.metamodel.DiffModel;
> import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSna pshot;
> import org.eclipse.emf.compare.diff.service.DiffService;
> import org.eclipse.emf.compare.match.metamodel.MatchModel;
> import org.eclipse.emf.compare.match.service.MatchService;
> import org.eclipse.emf.compare.util.ModelUtils;
> import org.eclipse.emf.ecore.EObject;
> 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.compare.diff.merge.service.MergeService;
>
> import org.eclipse.uml2.uml.UMLPackage;
> import org.eclipse.uml2.uml.resource.UMLResource;
> /**
> * This application will try and launch an headless model comparison.
> * * @author Cedric Brun <a
> href="mailto:mailto:cedric.brun@obeo.fr">mailto:cedric.brun@obeo.fr</a>
> */
> public final class ExampleLauncher {
> /**
> * This class doesn't need to be instantiated.
> */
> private ExampleLauncher() {
> // prevents instantiation
> }
>
> /**
> * Launcher of this application.
> * * @param args
> * Arguments of the launch.
> */
> public static void main(String[] args) {
> if (args.length == 2 && new File(args[0]).canRead() && new
> File(args[1]).canRead()) {
> // Creates the resourceSets where we'll load the models
> final ResourceSet resourceSet1 = new ResourceSetImpl();
> final ResourceSet resourceSet2 = new ResourceSetImpl();
> // Register additionnal packages here. For UML2 for instance :
>
> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(
> ).put(UMLResource.FILE_EXTENSION,
> UMLResource.Factory.INSTANCE);
> resourceSet1.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
> resourceSet2.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
>
> try {
> System.out.println("Loading resources.\n"); //$NON-NLS-1$
> // Loads the two models passed as arguments
> final EObject model1 = ModelUtils.load(new
> File(args[0]), resourceSet1);
> final EObject model2 = ModelUtils.load(new
> File(args[1]), resourceSet2);
>
> // Creates the match then the diff model for those two
> models
> System.out.println("Matching models.\n"); //$NON-NLS-1$
> final MatchModel match = MatchService.doMatch(model1,
> model2, Collections
> .<String, Object> emptyMap());
> System.out.println("Differencing models.\n"); //$NON-NLS-1$
> final DiffModel diff = DiffService.doDiff(match, false);
>
> System.out.println("Merging difference to args[1].\n");
> //$NON-NLS-1$
> final List<DiffElement> differences = new
> ArrayList<DiffElement>(diff.getOwnedElements());
> // This will merge all references to the right model
> (second argument).
> MergeService.merge(differences, true);
>
> // Prints the results
> try {
> System.out.println("MatchModel :\n"); //$NON-NLS-1$
> System.out.println(ModelUtils.serialize(match));
> System.out.println("DiffModel :\n"); //$NON-NLS-1$
> System.out.println(ModelUtils.serialize(diff));
> } catch (final IOException e) {
> e.printStackTrace();
> }
>
> // Serializes the result as "result.emfdiff" in the
> directory this class has been called from.
> System.out.println("saving emfdiff as
> \"result.emfdiff\""); //$NON-NLS-1$
> final ComparisonResourceSnapshot snapshot =
> DiffFactory.eINSTANCE
> .createComparisonResourceSnapshot();
> snapshot.setDate(Calendar.getInstance().getTime());
> snapshot.setMatch(match);
> snapshot.setDiff(diff);
> ModelUtils.save(snapshot, "result.emfdiff"); //$NON-NLS-1$
> } catch (final IOException e) {
> // shouldn't be thrown
> e.printStackTrace();
> } catch (final InterruptedException e) {
> e.printStackTrace();
> }
> } else {
> System.out.println("usage : ExampleLauncher <Model1>
> <Model2>"); //$NON-NLS-1$
> }
> }
> }
>
> Another thing is that when I comment the line that gives me the error,
> System.out.println(ModelUtils.serialize(match));
>
> I still get the same error but on:
> ModelUtils.save(snapshot, "result.emfdiff");
>
>


--------------040303020105070809050005
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------040303020105070809050005--
Re: EMF Compare Start problem [message #531156 is a reply to message #531009] Mon, 03 May 2010 18:43 Go to previous messageGo to next message
Bogie is currently offline Bogie
Messages: 14
Registered: April 2010
Junior Member
Hi,

Thanks for your help. I'm running the application in eclipse, not as a standalone one.
It's the following code:

package standalone.example.launcher;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.compare.diff.metamodel.DiffElement;
import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
import org.eclipse.emf.compare.diff.metamodel.DiffModel;
import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSna pshot;
import org.eclipse.emf.compare.diff.service.DiffService;
import org.eclipse.emf.compare.match.metamodel.MatchModel;
import org.eclipse.emf.compare.match.service.MatchService;
import org.eclipse.emf.compare.util.ModelUtils;
import org.eclipse.emf.ecore.EObject;
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.compare.diff.merge.service.MergeService;

import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.resource.UMLResource;
/**
* This application will try and launch an headless model comparison.
*
* @author Cedric Brun <a href="mailto:cedric.brun@obeo.fr">cedric.brun@obeo.fr</a>
*/
public final class ExampleLauncher {
/**
* This class doesn't need to be instantiated.
*/
private ExampleLauncher() {
// prevents instantiation
}

/**
* Launcher of this application.
*
* @param args
* Arguments of the launch.
*/
public static void main(String[] args) {
if (args.length == 2 && new File(args[0]).canRead() && new File(args[1]).canRead()) {
// Creates the resourceSets where we'll load the models
final ResourceSet resourceSet1 = new ResourceSetImpl();
final ResourceSet resourceSet2 = new ResourceSetImpl();
// Register additionnal packages here. For UML2 for instance :
// Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put(UMLResource.FILE_EXTENSION,
//UMLResource.Factory.INSTANCE);
// resourceSet1.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
// resourceSet2.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);

try {
System.out.println("Loading resources.\n"); //$NON-NLS-1$
// Loads the two models passed as arguments
final EObject model1 = ModelUtils.load(new File(args[0]), resourceSet1);
final EObject model2 = ModelUtils.load(new File(args[1]), resourceSet2);

// Creates the match then the diff model for those two models
System.out.println("Matching models.\n"); //$NON-NLS-1$
final MatchModel match = MatchService.doMatch(model1, model2, Collections
.<String, Object> emptyMap());
System.out.println("Differencing models.\n"); //$NON-NLS-1$
final DiffModel diff = DiffService.doDiff(match, false);

System.out.println("Merging difference to args[1].\n"); //$NON-NLS-1$
final List<DiffElement> differences = new ArrayList<DiffElement>(diff.getOwnedElements());
// This will merge all references to the right model (second argument).
MergeService.merge(differences, true);

// Prints the results
try {
System.out.println("MatchModel :\n"); //$NON-NLS-1$
//System.out.println(ModelUtils.serialize(match));
System.out.println("DiffModel :\n"); //$NON-NLS-1$
System.out.println(ModelUtils.serialize(diff));
} catch (final IOException e) {
e.printStackTrace();
}

// Serializes the result as "result.emfdiff" in the directory this class has been called from.
System.out.println("saving emfdiff as \"result.emfdiff\""); //$NON-NLS-1$
final ComparisonResourceSnapshot snapshot = DiffFactory.eINSTANCE
.createComparisonResourceSnapshot();
snapshot.setDate(Calendar.getInstance().getTime());
snapshot.setMatch(match);
snapshot.setDiff(diff);
ModelUtils.save(snapshot, "result.emfdiff"); //$NON-NLS-1$
} catch (final IOException e) {
// shouldn't be thrown
e.printStackTrace();
} catch (final InterruptedException e) {
e.printStackTrace();
}
} else {
System.out.println("usage : ExampleLauncher <Model1> <Model2>"); //$NON-NLS-1$
}
}
}

As I've understood from your previous message, I commented the lines that register additional packages, since the UML plugin in eclipse handles everything. When running this code I get the following exception:

org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri 'http://www.eclipse.org/uml2/2.1.0/UML' not found. ( file:///C:/Users/Bogie/workspace/StandaloneExample/model/mod el1.uml, 2, 180)

which happens at line:

final EObject model1 = ModelUtils.load(new File(args[0]), resourceSet1);

But, on the other hand maybe I've understood wrong?

Bogie

Re: EMF Compare Start problem [message #531306 is a reply to message #531156] Tue, 04 May 2010 09:48 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1609
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050200080003020608030006
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Bogie,

Well the problem is that I see a "main()" in there ... and I believe
you're launching your class (within Eclipse) through "run as -> Java
application" ... and this is exactly how you launch a standalone app
from within Eclipse :). If I hit the spot as to how you launch your code
(and the exception you get when commenting out the UML package
registration nearly proves it), then you will need to do everything
that's outlined on the UML wiki page I gave you the link before. Namely,
uncomment the UML package registration, and add the registrations of the
URIMaps.

Laurent Goubet
Obeo

Bogie wrote:
> Hi,
>
> Thanks for your help. I'm running the application in eclipse, not as a
> standalone one. It's the following code:
>
> package standalone.example.launcher;
>
> import java.io.File;
> import java.io.IOException;
> import java.util.ArrayList;
> import java.util.Calendar;
> import java.util.Collections;
> import java.util.List;
>
> import org.eclipse.emf.compare.diff.metamodel.DiffElement;
> import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
> import org.eclipse.emf.compare.diff.metamodel.DiffModel;
> import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSna pshot;
> import org.eclipse.emf.compare.diff.service.DiffService;
> import org.eclipse.emf.compare.match.metamodel.MatchModel;
> import org.eclipse.emf.compare.match.service.MatchService;
> import org.eclipse.emf.compare.util.ModelUtils;
> import org.eclipse.emf.ecore.EObject;
> 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.compare.diff.merge.service.MergeService;
>
> import org.eclipse.uml2.uml.UMLPackage;
> import org.eclipse.uml2.uml.resource.UMLResource;
> /**
> * This application will try and launch an headless model comparison.
> * * @author Cedric Brun <a
> href="mailto:mailto:cedric.brun@obeo.fr">mailto:cedric.brun@obeo.fr</a>
> */
> public final class ExampleLauncher {
> /**
> * This class doesn't need to be instantiated.
> */
> private ExampleLauncher() {
> // prevents instantiation
> }
>
> /**
> * Launcher of this application.
> * * @param args
> * Arguments of the launch.
> */
> public static void main(String[] args) {
> if (args.length == 2 && new File(args[0]).canRead() && new
> File(args[1]).canRead()) {
> // Creates the resourceSets where we'll load the models
> final ResourceSet resourceSet1 = new ResourceSetImpl();
> final ResourceSet resourceSet2 = new ResourceSetImpl();
> // Register additionnal packages here. For UML2 for instance :
> //
> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(
> ).put(UMLResource.FILE_EXTENSION,
> //UMLResource.Factory.INSTANCE);
> // resourceSet1.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
> // resourceSet2.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
>
> try {
> System.out.println("Loading resources.\n"); //$NON-NLS-1$
> // Loads the two models passed as arguments
> final EObject model1 = ModelUtils.load(new
> File(args[0]), resourceSet1);
> final EObject model2 = ModelUtils.load(new
> File(args[1]), resourceSet2);
>
> // Creates the match then the diff model for those two
> models
> System.out.println("Matching models.\n"); //$NON-NLS-1$
> final MatchModel match = MatchService.doMatch(model1,
> model2, Collections
> .<String, Object> emptyMap());
> System.out.println("Differencing models.\n"); //$NON-NLS-1$
> final DiffModel diff = DiffService.doDiff(match, false);
>
> System.out.println("Merging difference to args[1].\n");
> //$NON-NLS-1$
> final List<DiffElement> differences = new
> ArrayList<DiffElement>(diff.getOwnedElements());
> // This will merge all references to the right model
> (second argument).
> MergeService.merge(differences, true);
>
> // Prints the results
> try {
> System.out.println("MatchModel :\n"); //$NON-NLS-1$
> //System.out.println(ModelUtils.serialize(match));
> System.out.println("DiffModel :\n"); //$NON-NLS-1$
> System.out.println(ModelUtils.serialize(diff));
> } catch (final IOException e) {
> e.printStackTrace();
> }
>
> // Serializes the result as "result.emfdiff" in the
> directory this class has been called from.
> System.out.println("saving emfdiff as
> \"result.emfdiff\""); //$NON-NLS-1$
> final ComparisonResourceSnapshot snapshot =
> DiffFactory.eINSTANCE
> .createComparisonResourceSnapshot();
> snapshot.setDate(Calendar.getInstance().getTime());
> snapshot.setMatch(match);
> snapshot.setDiff(diff);
> ModelUtils.save(snapshot, "result.emfdiff"); //$NON-NLS-1$
> } catch (final IOException e) {
> // shouldn't be thrown
> e.printStackTrace();
> } catch (final InterruptedException e) {
> e.printStackTrace();
> }
> } else {
> System.out.println("usage : ExampleLauncher <Model1>
> <Model2>"); //$NON-NLS-1$
> }
> }
> }
>
> As I've understood from your previous message, I commented the lines
> that register additional packages, since the UML plugin in eclipse
> handles everything. When running this code I get the following exception:
>
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
> uri 'http://www.eclipse.org/uml2/2.1.0/UML' not found.
> ( file:///C:/Users/Bogie/workspace/StandaloneExample/model/mod el1.uml, 2,
> 180)
>
> which happens at line:
>
> final EObject model1 = ModelUtils.load(new File(args[0]), resourceSet1);
>
> But, on the other hand maybe I've understood wrong?
>
> Bogie
>
>


--------------050200080003020608030006
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------050200080003020608030006--
Re: EMF Compare Start problem [message #531525 is a reply to message #531306] Wed, 05 May 2010 06:43 Go to previous messageGo to next message
Bogie is currently offline Bogie
Messages: 14
Registered: April 2010
Junior Member
Hi,

Thank you very much for clearing up some things for me. I registered the packages and defined the uri maps, but I still get the same exception.
This is my code snippet :

final ResourceSet resourceSet1 = new ResourceSetImpl();
final ResourceSet resourceSet2 = new ResourceSetImpl();
// Register additionnal packages here. For UML2 for instance :
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put(UMLResource.FILE_EXTENSION,
UMLResource.Factory.INSTANCE);
resourceSet1.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
resourceSet2.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
Map<URI, URI> uriMap1 = resourceSet1.getURIConverter().getURIMap();
URI uri = URI.createURI(" jar:file:/C:/eclipse/plugins/org.eclipse.uml2.uml.resources_ 2.2.0.v200805131030.jar!/ ");

uriMap1.put(URI.createURI(UMLResource.METAMODELS_PATHMAP), uri.appendSegment("metamodels").appendSegment(""));
uriMap1.put(URI.createURI(UMLResource.PROFILES_PATHMAP), uri.appendSegment("profiles").appendSegment(""));
uriMap1.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP), uri.appendSegment("libraries").appendSegment(""));
Map<URI, URI> uriMap2 = resourceSet2.getURIConverter().getURIMap();

uriMap2.put(URI.createURI(UMLResource.METAMODELS_PATHMAP), uri.appendSegment("metamodels").appendSegment(""));
uriMap2.put(URI.createURI(UMLResource.PROFILES_PATHMAP), uri.appendSegment("profiles").appendSegment(""));
uriMap2.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP), uri.appendSegment("libraries").appendSegment(""));

In debug mode, when I come to the line that causes the exception (ModelUtils.save(snapshot, "result.emfdiff")Wink, I get the message:
The jar of this class file belongs to the class 'Plug-in Dependencies' which does not allow modifications to source attachments on its entries.

public class org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl....

So, the problem I have is maybe due to the plug-in dependencies, since org.eclipse.emf.ecore.xmi is not in my required plug-ins list, because I can't add it?
I added this plug-in to the java search but nothing changes (plug-in view and then right click add to java search).

Re: EMF Compare Start problem [message #531549 is a reply to message #531525] Wed, 05 May 2010 07:52 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1609
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080406030304020301070109
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Bogie,

I am at a loss here as to what's happening with your models. Could you
raise a bugzilla with the error message you get, the models your trying
to compare, and the code you're using to this end?

Laurent Goubet
Obeo

Bogie wrote:
> Hi,
>
> Thank you very much for clearing up some things for me. I registered
> the packages and defined the uri maps, but I still get the same
> exception. This is my code snippet :
>
> final ResourceSet resourceSet1 = new ResourceSetImpl();
> final ResourceSet resourceSet2 = new ResourceSetImpl();
> // Register additionnal packages here. For UML2 for instance :
>
> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(
> ).put(UMLResource.FILE_EXTENSION,
> UMLResource.Factory.INSTANCE);
> resourceSet1.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
> resourceSet2.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
> Map<URI, URI> uriMap1 =
> resourceSet1.getURIConverter().getURIMap();
> URI uri = URI.createURI("
> jar:file:/C:/eclipse/plugins/org.eclipse.uml2.uml.resources_
> 2.2.0.v200805131030.jar!/ ");
>
> uriMap1.put(URI.createURI(UMLResource.METAMODELS_PATHMAP),
> uri.appendSegment("metamodels").appendSegment(""));
> uriMap1.put(URI.createURI(UMLResource.PROFILES_PATHMAP),
> uri.appendSegment("profiles").appendSegment(""));
> uriMap1.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP),
> uri.appendSegment("libraries").appendSegment(""));
> Map<URI, URI> uriMap2 =
> resourceSet2.getURIConverter().getURIMap();
>
> uriMap2.put(URI.createURI(UMLResource.METAMODELS_PATHMAP),
> uri.appendSegment("metamodels").appendSegment(""));
> uriMap2.put(URI.createURI(UMLResource.PROFILES_PATHMAP),
> uri.appendSegment("profiles").appendSegment(""));
> uriMap2.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP),
> uri.appendSegment("libraries").appendSegment(""));
>
> In debug mode, when I come to the line that causes the exception
> (ModelUtils.save(snapshot, "result.emfdiff");), I get the message: The
> jar of this class file belongs to the class 'Plug-in Dependencies' which
> does not allow modifications to source attachments on its entries.
>
> public class org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl....
>
> So, the problem I have is maybe due to the plug-in dependencies, since
> org.eclipse.emf.ecore.xmi is not in my required plug-ins list, because I
> can't add it?
> I added this plug-in to the java search but nothing changes (plug-in
> view and then right click add to java search).
>
>


--------------080406030304020301070109
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------080406030304020301070109--
Re: EMF Compare Start problem [message #531563 is a reply to message #531549] Wed, 05 May 2010 08:37 Go to previous messageGo to next message
Bogie is currently offline Bogie
Messages: 14
Registered: April 2010
Junior Member
Hi,
I've submitted the code to Bugzilla.
Re: EMF Compare Start problem [message #531791 is a reply to message #531563] Thu, 06 May 2010 04:28 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1609
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010403080700000804010907
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Humm ... could you copy the bugzilla URL here? I can't seem to find it.

Bogie wrote:
> Hi,
> I've submitted the code to Bugzilla.


--------------010403080700000804010907
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------010403080700000804010907--
Re: EMF Compare Start problem [message #532120 is a reply to message #531791] Fri, 07 May 2010 05:02 Go to previous messageGo to next message
Bogie is currently offline Bogie
Messages: 14
Registered: April 2010
Junior Member
Here it is:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=311710
Re: EMF Compare Start problem [message #532802 is a reply to message #532120] Tue, 11 May 2010 05:33 Go to previous message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1609
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070105040102080307030509
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Thanks, my RSS feed hadn't been updated and I didn't look directly on
the bugzilla (I kinda got used to being fed by thunderbird :p).

We'll try and look at this asap.

Laurent Goubet
Obeo

Bogie wrote:
> Here it is:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=311710
>


--------------070105040102080307030509
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------070105040102080307030509--
Re: EMF Compare Start problem [message #622545 is a reply to message #530967] Mon, 03 May 2010 06:16 Go to previous message
Bogie is currently offline Bogie
Messages: 14
Registered: April 2010
Junior Member
Hi,

Thank you for your reply. I don't create EObjects in my code, I just take the models as arguments from the command line. I don't change anything in the code because I wanted to try the basic example in order to start.
The two uml models I use are the following:

model1.uml:
<?xml version="1.0" encoding="UTF-8"?>
<uml:Package xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xmi:id="_9bQ4ULT8Ed2kfr6ZNjmMHg" name="testModels">
<elementImport xmi:id="_9cHz8LT8Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
</elementImport>
<elementImport xmi:id="_9cHz8bT8Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</elementImport>
<elementImport xmi:id="_9cHz8rT8Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Unlimi tedNatural"/>
</elementImport>
<elementImport xmi:id="_9cHz87T8Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Intege r"/>
</elementImport>
<packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg" name="Class1">
<ownedAttribute xmi:id="_eY790LT-Ed2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
<ownedAttribute xmi:id="_fiLd0LT-Ed2kfr6ZNjmMHg" name="attribute1" aggregation="composite"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg" name="Class3"/>
<packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg" name="Class2">
<ownedAttribute xmi:id="_eY790LT-Ed2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
</packagedElement>
<packagedElement xmi:type="uml:Package" xmi:id="_q_x3oLUAEd2kfr6ZNjmMHg" name="package1">
<packagedElement xmi:type="uml:Package" xmi:id="_rd8aULUAEd2kfr6ZNjmMHg" name="package2">
<packagedElement xmi:type="uml:Package" xmi:id="_roAVQLUAEd2kfr6ZNjmMHg" name="package3">
<packagedElement xmi:type="uml:Class" xmi:id="_vStFYLUAEd2kfr6ZNjmMHg" name="Class1">
<ownedAttribute xmi:id="_vStFYbUAEd2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
<ownedAttribute xmi:id="_vStFYrUAEd2kfr6ZNjmMHg" name="attribute1" aggregation="composite"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_vStFY7UAEd2kfr6ZNjmMHg" name="Class3"/>
<packagedElement xmi:type="uml:Class" xmi:id="_vStFZLUAEd2kfr6ZNjmMHg" name="Class2">
<ownedAttribute xmi:id="_vStFZbUAEd2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
</packagedElement>
</packagedElement>
</packagedElement>
</packagedElement>
</uml:Package>

model2.uml:

<?xml version="1.0" encoding="UTF-8"?>
<uml:Package xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xmi:id="_ZDkboLT-Ed2kfr6ZNjmMHg" name="testModels">
<packagedElement xmi:type="uml:Package" xmi:id="_gPEHELUAEd2kfr6ZNjmMHg" name="package1">
<packagedElement xmi:type="uml:Package" xmi:id="_ir1EcLUAEd2kfr6ZNjmMHg" name="package2">
<packagedElement xmi:type="uml:Package" xmi:id="_kd9wcLUAEd2kfr6ZNjmMHg" name="package3">
<packagedElement xmi:type="uml:Class" xmi:id="_mU_jgLUAEd2kfr6ZNjmMHg" name="Class3"/>
<packagedElement xmi:type="uml:Class" xmi:id="_mU_jgbUAEd2kfr6ZNjmMHg" name="Class2">
<ownedAttribute xmi:id="_mU_jgrUAEd2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_mU_jg7UAEd2kfr6ZNjmMHg" name="Class1">
<ownedAttribute xmi:id="_mU_jhLUAEd2kfr6ZNjmMHg" name="attribute1" aggregation="composite"/>
<ownedAttribute xmi:id="_mU_jhbUAEd2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
</packagedElement>
</packagedElement>
</packagedElement>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_Z7YNYLT-Ed2kfr6ZNjmMHg" name="Class1">
<ownedAttribute xmi:id="_bM11QLT-Ed2kfr6ZNjmMHg" name="attribute1" aggregation="composite"/>
<ownedAttribute xmi:id="_cYr9ULT-Ed2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
</packagedElement>
<elementImport xmi:id="_ZELfoLT-Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
</elementImport>
<elementImport xmi:id="_ZELfobT-Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</elementImport>
<elementImport xmi:id="_ZELforT-Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Unlimi tedNatural"/>
</elementImport>
<elementImport xmi:id="_ZELfo7T-Ed2kfr6ZNjmMHg">
<importedElement xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Intege r"/>
</elementImport>
<packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg" name="Class3"/>
<packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg" name="Class2">
<ownedAttribute xmi:id="_eY790LT-Ed2kfr6ZNjmMHg" name="attribute2" aggregation="composite"/>
</packagedElement>


</uml:Package>

The code is:

package standalone.example.launcher;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.compare.diff.metamodel.DiffElement;
import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
import org.eclipse.emf.compare.diff.metamodel.DiffModel;
import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSna pshot;
import org.eclipse.emf.compare.diff.service.DiffService;
import org.eclipse.emf.compare.match.metamodel.MatchModel;
import org.eclipse.emf.compare.match.service.MatchService;
import org.eclipse.emf.compare.util.ModelUtils;
import org.eclipse.emf.ecore.EObject;
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.compare.diff.merge.service.MergeService;

import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.resource.UMLResource;
/**
* This application will try and launch an headless model comparison.
*
* @author Cedric Brun <a href="mailto:mailto:cedric.brun@obeo.fr">mailto:cedric.brun@obeo.fr</a>
*/
public final class ExampleLauncher {
/**
* This class doesn't need to be instantiated.
*/
private ExampleLauncher() {
// prevents instantiation
}

/**
* Launcher of this application.
*
* @param args
* Arguments of the launch.
*/
public static void main(String[] args) {
if (args.length == 2 && new File(args[0]).canRead() && new File(args[1]).canRead()) {
// Creates the resourceSets where we'll load the models
final ResourceSet resourceSet1 = new ResourceSetImpl();
final ResourceSet resourceSet2 = new ResourceSetImpl();
// Register additionnal packages here. For UML2 for instance :
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put(UMLResource.FILE_EXTENSION,
UMLResource.Factory.INSTANCE);
resourceSet1.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
resourceSet2.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);

try {
System.out.println("Loading resources.\n"); //$NON-NLS-1$
// Loads the two models passed as arguments
final EObject model1 = ModelUtils.load(new File(args[0]), resourceSet1);
final EObject model2 = ModelUtils.load(new File(args[1]), resourceSet2);

// Creates the match then the diff model for those two models
System.out.println("Matching models.\n"); //$NON-NLS-1$
final MatchModel match = MatchService.doMatch(model1, model2, Collections
.<String, Object> emptyMap());
System.out.println("Differencing models.\n"); //$NON-NLS-1$
final DiffModel diff = DiffService.doDiff(match, false);

System.out.println("Merging difference to args[1].\n"); //$NON-NLS-1$
final List<DiffElement> differences = new ArrayList<DiffElement>(diff.getOwnedElements());
// This will merge all references to the right model (second argument).
MergeService.merge(differences, true);

// Prints the results
try {
System.out.println("MatchModel :\n"); //$NON-NLS-1$
System.out.println(ModelUtils.serialize(match));
System.out.println("DiffModel :\n"); //$NON-NLS-1$
System.out.println(ModelUtils.serialize(diff));
} catch (final IOException e) {
e.printStackTrace();
}

// Serializes the result as "result.emfdiff" in the directory this class has been called from.
System.out.println("saving emfdiff as \"result.emfdiff\""); //$NON-NLS-1$
final ComparisonResourceSnapshot snapshot = DiffFactory.eINSTANCE
.createComparisonResourceSnapshot();
snapshot.setDate(Calendar.getInstance().getTime());
snapshot.setMatch(match);
snapshot.setDiff(diff);
ModelUtils.save(snapshot, "result.emfdiff"); //$NON-NLS-1$
} catch (final IOException e) {
// shouldn't be thrown
e.printStackTrace();
} catch (final InterruptedException e) {
e.printStackTrace();
}
} else {
System.out.println("usage : ExampleLauncher <Model1> <Model2>"); //$NON-NLS-1$
}
}
}

Another thing is that when I comment the line that gives me the error, System.out.println(ModelUtils.serialize(match));

I still get the same error but on:
ModelUtils.save(snapshot, "result.emfdiff");
Re: EMF Compare Start problem [message #622546 is a reply to message #622545] Mon, 03 May 2010 07:25 Go to previous message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1609
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040303020105070809050005
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Bogie,

I can't really see where the problem would come from ; though I can say
you're not registering everything UML needs in ordder to use it
standalone. You can find everything needed here :
http://wiki.eclipse.org/MDT/UML2/FAQ#What.27s_required_to_lo ad_a_UML_.28.uml.29_resource_from_a_standalone_application.3 F

Looking at your model, you need to register
"UMLResource.LIBRARIES_PATHMAP" at the very least. That is ... _if_
you're indeed using this Java class as a standalone application.
Registering these should help with your comparison.

These lines aren't needed when you compare the two files in Eclipse as
the UML plugin in this case does every needed step itself.

Laurent Goubet
Obeo

Bogie wrote:
> Hi,
>
> Thank you for your reply. I don't create EObjects in my code, I just
> take the models as arguments from the command line. I don't change
> anything in the code because I wanted to try the basic example in order
> to start. The two uml models I use are the following:
>
> model1.uml:
> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Package xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> xmi:id="_9bQ4ULT8Ed2kfr6ZNjmMHg" name="testModels">
> <elementImport xmi:id="_9cHz8LT8Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
> </elementImport>
> <elementImport xmi:id="_9cHz8bT8Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
> </elementImport>
> <elementImport xmi:id="_9cHz8rT8Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Unlimi tedNatural"/>
>
> </elementImport>
> <elementImport xmi:id="_9cHz87T8Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Intege r"/>
> </elementImport>
> <packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg"
> name="Class1">
> <ownedAttribute xmi:id="_eY790LT-Ed2kfr6ZNjmMHg" name="attribute2"
> aggregation="composite"/>
> <ownedAttribute xmi:id="_fiLd0LT-Ed2kfr6ZNjmMHg" name="attribute1"
> aggregation="composite"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg"
> name="Class3"/>
> <packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg"
> name="Class2">
> <ownedAttribute xmi:id="_eY790LT-Ed2kfr6ZNjmMHg" name="attribute2"
> aggregation="composite"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Package"
> xmi:id="_q_x3oLUAEd2kfr6ZNjmMHg" name="package1">
> <packagedElement xmi:type="uml:Package"
> xmi:id="_rd8aULUAEd2kfr6ZNjmMHg" name="package2">
> <packagedElement xmi:type="uml:Package"
> xmi:id="_roAVQLUAEd2kfr6ZNjmMHg" name="package3">
> <packagedElement xmi:type="uml:Class"
> xmi:id="_vStFYLUAEd2kfr6ZNjmMHg" name="Class1">
> <ownedAttribute xmi:id="_vStFYbUAEd2kfr6ZNjmMHg"
> name="attribute2" aggregation="composite"/>
> <ownedAttribute xmi:id="_vStFYrUAEd2kfr6ZNjmMHg"
> name="attribute1" aggregation="composite"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Class"
> xmi:id="_vStFY7UAEd2kfr6ZNjmMHg" name="Class3"/>
> <packagedElement xmi:type="uml:Class"
> xmi:id="_vStFZLUAEd2kfr6ZNjmMHg" name="Class2">
> <ownedAttribute xmi:id="_vStFZbUAEd2kfr6ZNjmMHg"
> name="attribute2" aggregation="composite"/>
> </packagedElement>
> </packagedElement>
> </packagedElement>
> </packagedElement>
> </uml:Package>
>
> model2.uml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Package xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> xmi:id="_ZDkboLT-Ed2kfr6ZNjmMHg" name="testModels">
> <packagedElement xmi:type="uml:Package"
> xmi:id="_gPEHELUAEd2kfr6ZNjmMHg" name="package1">
> <packagedElement xmi:type="uml:Package"
> xmi:id="_ir1EcLUAEd2kfr6ZNjmMHg" name="package2">
> <packagedElement xmi:type="uml:Package"
> xmi:id="_kd9wcLUAEd2kfr6ZNjmMHg" name="package3">
> <packagedElement xmi:type="uml:Class"
> xmi:id="_mU_jgLUAEd2kfr6ZNjmMHg" name="Class3"/>
> <packagedElement xmi:type="uml:Class"
> xmi:id="_mU_jgbUAEd2kfr6ZNjmMHg" name="Class2">
> <ownedAttribute xmi:id="_mU_jgrUAEd2kfr6ZNjmMHg"
> name="attribute2" aggregation="composite"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Class"
> xmi:id="_mU_jg7UAEd2kfr6ZNjmMHg" name="Class1">
> <ownedAttribute xmi:id="_mU_jhLUAEd2kfr6ZNjmMHg"
> name="attribute1" aggregation="composite"/>
> <ownedAttribute xmi:id="_mU_jhbUAEd2kfr6ZNjmMHg"
> name="attribute2" aggregation="composite"/>
> </packagedElement>
> </packagedElement>
> </packagedElement>
> </packagedElement>
> <packagedElement xmi:type="uml:Class" xmi:id="_Z7YNYLT-Ed2kfr6ZNjmMHg"
> name="Class1">
> <ownedAttribute xmi:id="_bM11QLT-Ed2kfr6ZNjmMHg" name="attribute1"
> aggregation="composite"/>
> <ownedAttribute xmi:id="_cYr9ULT-Ed2kfr6ZNjmMHg" name="attribute2"
> aggregation="composite"/>
> </packagedElement>
> <elementImport xmi:id="_ZELfoLT-Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
> </elementImport>
> <elementImport xmi:id="_ZELfobT-Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
> </elementImport>
> <elementImport xmi:id="_ZELforT-Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Unlimi tedNatural"/>
>
> </elementImport>
> <elementImport xmi:id="_ZELfo7T-Ed2kfr6ZNjmMHg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Intege r"/>
> </elementImport>
> <packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg"
> name="Class3"/>
> <packagedElement xmi:type="uml:Class" xmi:id="_AsKoYLT9Ed2kfr6ZNjmMHg"
> name="Class2">
> <ownedAttribute xmi:id="_eY790LT-Ed2kfr6ZNjmMHg" name="attribute2"
> aggregation="composite"/>
> </packagedElement>
>
>
> </uml:Package>
>
> The code is:
>
> package standalone.example.launcher;
>
> import java.io.File;
> import java.io.IOException;
> import java.util.ArrayList;
> import java.util.Calendar;
> import java.util.Collections;
> import java.util.List;
>
> import org.eclipse.emf.compare.diff.metamodel.DiffElement;
> import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
> import org.eclipse.emf.compare.diff.metamodel.DiffModel;
> import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSna pshot;
> import org.eclipse.emf.compare.diff.service.DiffService;
> import org.eclipse.emf.compare.match.metamodel.MatchModel;
> import org.eclipse.emf.compare.match.service.MatchService;
> import org.eclipse.emf.compare.util.ModelUtils;
> import org.eclipse.emf.ecore.EObject;
> 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.compare.diff.merge.service.MergeService;
>
> import org.eclipse.uml2.uml.UMLPackage;
> import org.eclipse.uml2.uml.resource.UMLResource;
> /**
> * This application will try and launch an headless model comparison.
> * * @author Cedric Brun <a
> href="mailto:mailto:cedric.brun@obeo.fr">mailto:cedric.brun@obeo.fr</a>
> */
> public final class ExampleLauncher {
> /**
> * This class doesn't need to be instantiated.
> */
> private ExampleLauncher() {
> // prevents instantiation
> }
>
> /**
> * Launcher of this application.
> * * @param args
> * Arguments of the launch.
> */
> public static void main(String[] args) {
> if (args.length == 2 && new File(args[0]).canRead() && new
> File(args[1]).canRead()) {
> // Creates the resourceSets where we'll load the models
> final ResourceSet resourceSet1 = new ResourceSetImpl();
> final ResourceSet resourceSet2 = new ResourceSetImpl();
> // Register additionnal packages here. For UML2 for instance :
>
> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(
> ).put(UMLResource.FILE_EXTENSION,
> UMLResource.Factory.INSTANCE);
> resourceSet1.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
> resourceSet2.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
>
> try {
> System.out.println("Loading resources.\n"); //$NON-NLS-1$
> // Loads the two models passed as arguments
> final EObject model1 = ModelUtils.load(new
> File(args[0]), resourceSet1);
> final EObject model2 = ModelUtils.load(new
> File(args[1]), resourceSet2);
>
> // Creates the match then the diff model for those two
> models
> System.out.println("Matching models.\n"); //$NON-NLS-1$
> final MatchModel match = MatchService.doMatch(model1,
> model2, Collections
> .<String, Object> emptyMap());
> System.out.println("Differencing models.\n"); //$NON-NLS-1$
> final DiffModel diff = DiffService.doDiff(match, false);
>
> System.out.println("Merging difference to args[1].\n");
> //$NON-NLS-1$
> final List<DiffElement> differences = new
> ArrayList<DiffElement>(diff.getOwnedElements());
> // This will merge all references to the right model
> (second argument).
> MergeService.merge(differences, true);
>
> // Prints the results
> try {
> System.out.println("MatchModel :\n"); //$NON-NLS-1$
> System.out.println(ModelUtils.serialize(match));
> System.out.println("DiffModel :\n"); //$NON-NLS-1$
> System.out.println(ModelUtils.serialize(diff));
> } catch (final IOException e) {
> e.printStackTrace();
> }
>
> // Serializes the result as "result.emfdiff" in the
> directory this class has been called from.
> System.out.println("saving emfdiff as
> \"result.emfdiff\""); //$NON-NLS-1$
> final ComparisonResourceSnapshot snapshot =
> DiffFactory.eINSTANCE
> .createComparisonResourceSnapshot();
> snapshot.setDate(Calendar.getInstance().getTime());
> snapshot.setMatch(match);
> snapshot.setDiff(diff);
> ModelUtils.save(snapshot, "result.emfdiff"); //$NON-NLS-1$
> } catch (final IOException e) {
> // shouldn't be thrown
> e.printStackTrace();
> } catch (final InterruptedException e) {
> e.printStackTrace();
> }
> } else {
> System.out.println("usage : ExampleLauncher <Model1>
> <Model2>"); //$NON-NLS-1$
> }
> }
> }
>
> Another thing is that when I comment the line that gives me the error,
> System.out.println(ModelUtils.serialize(match));
>
> I still get the same error but on:
> ModelUtils.save(snapshot, "result.emfdiff");
>
>


--------------040303020105070809050005
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------040303020105070809050005--
Re: EMF Compare Start problem [message #622550 is a reply to message #531009] Mon, 03 May 2010 18:43 Go to previous message
Bogie is currently offline Bogie
Messages: 14
Registered: April 2010
Junior Member
Hi,

Thanks for your help. I'm running the application in eclipse, not as a standalone one.
It's the following code:

package standalone.example.launcher;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.compare.diff.metamodel.DiffElement;
import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
import org.eclipse.emf.compare.diff.metamodel.DiffModel;
import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSna pshot;
import org.eclipse.emf.compare.diff.service.DiffService;
import org.eclipse.emf.compare.match.metamodel.MatchModel;
import org.eclipse.emf.compare.match.service.MatchService;
import org.eclipse.emf.compare.util.ModelUtils;
import org.eclipse.emf.ecore.EObject;
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.compare.diff.merge.service.MergeService;

import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.resource.UMLResource;
/**
* This application will try and launch an headless model comparison.
*
* @author Cedric Brun <a href="mailto:mailto:cedric.brun@obeo.fr">mailto:cedric.brun@obeo.fr</a>
*/
public final class ExampleLauncher {
/**
* This class doesn't need to be instantiated.
*/
private ExampleLauncher() {
// prevents instantiation
}

/**
* Launcher of this application.
*
* @param args
* Arguments of the launch.
*/
public static void main(String[] args) {
if (args.length == 2 && new File(args[0]).canRead() && new File(args[1]).canRead()) {
// Creates the resourceSets where we'll load the models
final ResourceSet resourceSet1 = new ResourceSetImpl();
final ResourceSet resourceSet2 = new ResourceSetImpl();
// Register additionnal packages here. For UML2 for instance :
// Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put(UMLResource.FILE_EXTENSION,
//UMLResource.Factory.INSTANCE);
// resourceSet1.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
// resourceSet2.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);

try {
System.out.println("Loading resources.\n"); //$NON-NLS-1$
// Loads the two models passed as arguments
final EObject model1 = ModelUtils.load(new File(args[0]), resourceSet1);
final EObject model2 = ModelUtils.load(new File(args[1]), resourceSet2);

// Creates the match then the diff model for those two models
System.out.println("Matching models.\n"); //$NON-NLS-1$
final MatchModel match = MatchService.doMatch(model1, model2, Collections
.<String, Object> emptyMap());
System.out.println("Differencing models.\n"); //$NON-NLS-1$
final DiffModel diff = DiffService.doDiff(match, false);

System.out.println("Merging difference to args[1].\n"); //$NON-NLS-1$
final List<DiffElement> differences = new ArrayList<DiffElement>(diff.getOwnedElements());
// This will merge all references to the right model (second argument).
MergeService.merge(differences, true);

// Prints the results
try {
System.out.println("MatchModel :\n"); //$NON-NLS-1$
//System.out.println(ModelUtils.serialize(match));
System.out.println("DiffModel :\n"); //$NON-NLS-1$
System.out.println(ModelUtils.serialize(diff));
} catch (final IOException e) {
e.printStackTrace();
}

// Serializes the result as "result.emfdiff" in the directory this class has been called from.
System.out.println("saving emfdiff as \"result.emfdiff\""); //$NON-NLS-1$
final ComparisonResourceSnapshot snapshot = DiffFactory.eINSTANCE
.createComparisonResourceSnapshot();
snapshot.setDate(Calendar.getInstance().getTime());
snapshot.setMatch(match);
snapshot.setDiff(diff);
ModelUtils.save(snapshot, "result.emfdiff"); //$NON-NLS-1$
} catch (final IOException e) {
// shouldn't be thrown
e.printStackTrace();
} catch (final InterruptedException e) {
e.printStackTrace();
}
} else {
System.out.println("usage : ExampleLauncher <Model1> <Model2>"); //$NON-NLS-1$
}
}
}

As I've understood from your previous message, I commented the lines that register additional packages, since the UML plugin in eclipse handles everything. When running this code I get the following exception:

org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri 'http://www.eclipse.org/uml2/2.1.0/UML' not found. ( file:///C:/Users/Bogie/workspace/StandaloneExample/model/mod el1.uml, 2, 180)

which happens at line:

final EObject model1 = ModelUtils.load(new File(args[0]), resourceSet1);

But, on the other hand maybe I've understood wrong?

Bogie
Re: EMF Compare Start problem [message #622552 is a reply to message #622550] Tue, 04 May 2010 09:48 Go to previous message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1609
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050200080003020608030006
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Bogie,

Well the problem is that I see a "main()" in there ... and I believe
you're launching your class (within Eclipse) through "run as -> Java
application" ... and this is exactly how you launch a standalone app
from within Eclipse :). If I hit the spot as to how you launch your code
(and the exception you get when commenting out the UML package
registration nearly proves it), then you will need to do everything
that's outlined on the UML wiki page I gave you the link before. Namely,
uncomment the UML package registration, and add the registrations of the
URIMaps.

Laurent Goubet
Obeo

Bogie wrote:
> Hi,
>
> Thanks for your help. I'm running the application in eclipse, not as a
> standalone one. It's the following code:
>
> package standalone.example.launcher;
>
> import java.io.File;
> import java.io.IOException;
> import java.util.ArrayList;
> import java.util.Calendar;
> import java.util.Collections;
> import java.util.List;
>
> import org.eclipse.emf.compare.diff.metamodel.DiffElement;
> import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
> import org.eclipse.emf.compare.diff.metamodel.DiffModel;
> import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSna pshot;
> import org.eclipse.emf.compare.diff.service.DiffService;
> import org.eclipse.emf.compare.match.metamodel.MatchModel;
> import org.eclipse.emf.compare.match.service.MatchService;
> import org.eclipse.emf.compare.util.ModelUtils;
> import org.eclipse.emf.ecore.EObject;
> 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.compare.diff.merge.service.MergeService;
>
> import org.eclipse.uml2.uml.UMLPackage;
> import org.eclipse.uml2.uml.resource.UMLResource;
> /**
> * This application will try and launch an headless model comparison.
> * * @author Cedric Brun <a
> href="mailto:mailto:cedric.brun@obeo.fr">mailto:cedric.brun@obeo.fr</a>
> */
> public final class ExampleLauncher {
> /**
> * This class doesn't need to be instantiated.
> */
> private ExampleLauncher() {
> // prevents instantiation
> }
>
> /**
> * Launcher of this application.
> * * @param args
> * Arguments of the launch.
> */
> public static void main(String[] args) {
> if (args.length == 2 && new File(args[0]).canRead() && new
> File(args[1]).canRead()) {
> // Creates the resourceSets where we'll load the models
> final ResourceSet resourceSet1 = new ResourceSetImpl();
> final ResourceSet resourceSet2 = new ResourceSetImpl();
> // Register additionnal packages here. For UML2 for instance :
> //
> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(
> ).put(UMLResource.FILE_EXTENSION,
> //UMLResource.Factory.INSTANCE);
> // resourceSet1.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
> // resourceSet2.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
>
> try {
> System.out.println("Loading resources.\n"); //$NON-NLS-1$
> // Loads the two models passed as arguments
> final EObject model1 = ModelUtils.load(new
> File(args[0]), resourceSet1);
> final EObject model2 = ModelUtils.load(new
> File(args[1]), resourceSet2);
>
> // Creates the match then the diff model for those two
> models
> System.out.println("Matching models.\n"); //$NON-NLS-1$
> final MatchModel match = MatchService.doMatch(model1,
> model2, Collections
> .<String, Object> emptyMap());
> System.out.println("Differencing models.\n"); //$NON-NLS-1$
> final DiffModel diff = DiffService.doDiff(match, false);
>
> System.out.println("Merging difference to args[1].\n");
> //$NON-NLS-1$
> final List<DiffElement> differences = new
> ArrayList<DiffElement>(diff.getOwnedElements());
> // This will merge all references to the right model
> (second argument).
> MergeService.merge(differences, true);
>
> // Prints the results
> try {
> System.out.println("MatchModel :\n"); //$NON-NLS-1$
> //System.out.println(ModelUtils.serialize(match));
> System.out.println("DiffModel :\n"); //$NON-NLS-1$
> System.out.println(ModelUtils.serialize(diff));
> } catch (final IOException e) {
> e.printStackTrace();
> }
>
> // Serializes the result as "result.emfdiff" in the
> directory this class has been called from.
> System.out.println("saving emfdiff as
> \"result.emfdiff\""); //$NON-NLS-1$
> final ComparisonResourceSnapshot snapshot =
> DiffFactory.eINSTANCE
> .createComparisonResourceSnapshot();
> snapshot.setDate(Calendar.getInstance().getTime());
> snapshot.setMatch(match);
> snapshot.setDiff(diff);
> ModelUtils.save(snapshot, "result.emfdiff"); //$NON-NLS-1$
> } catch (final IOException e) {
> // shouldn't be thrown
> e.printStackTrace();
> } catch (final InterruptedException e) {
> e.printStackTrace();
> }
> } else {
> System.out.println("usage : ExampleLauncher <Model1>
> <Model2>"); //$NON-NLS-1$
> }
> }
> }
>
> As I've understood from your previous message, I commented the lines
> that register additional packages, since the UML plugin in eclipse
> handles everything. When running this code I get the following exception:
>
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
> uri 'http://www.eclipse.org/uml2/2.1.0/UML' not found.
> ( file:///C:/Users/Bogie/workspace/StandaloneExample/model/mod el1.uml, 2,
> 180)
>
> which happens at line:
>
> final EObject model1 = ModelUtils.load(new File(args[0]), resourceSet1);
>
> But, on the other hand maybe I've understood wrong?
>
> Bogie
>
>


--------------050200080003020608030006
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------050200080003020608030006--
Re: EMF Compare Start problem [message #622819 is a reply to message #531306] Wed, 05 May 2010 06:44 Go to previous message
Bogie is currently offline Bogie
Messages: 14
Registered: April 2010
Junior Member
Hi,

Thank you very much for clearing up some things for me. I registered the packages and defined the uri maps, but I still get the same exception.
This is my code snippet :

final ResourceSet resourceSet1 = new ResourceSetImpl();
final ResourceSet resourceSet2 = new ResourceSetImpl();
// Register additionnal packages here. For UML2 for instance :
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put(UMLResource.FILE_EXTENSION,
UMLResource.Factory.INSTANCE);
resourceSet1.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
resourceSet2.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
Map<URI, URI> uriMap1 = resourceSet1.getURIConverter().getURIMap();
URI uri = URI.createURI(" jar:file:/C:/eclipse/plugins/org.eclipse.uml2.uml.resources_ 2.2.0.v200805131030.jar!/ ");

uriMap1.put(URI.createURI(UMLResource.METAMODELS_PATHMAP), uri.appendSegment("metamodels").appendSegment(""));
uriMap1.put(URI.createURI(UMLResource.PROFILES_PATHMAP), uri.appendSegment("profiles").appendSegment(""));
uriMap1.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP), uri.appendSegment("libraries").appendSegment(""));
Map<URI, URI> uriMap2 = resourceSet2.getURIConverter().getURIMap();

uriMap2.put(URI.createURI(UMLResource.METAMODELS_PATHMAP), uri.appendSegment("metamodels").appendSegment(""));
uriMap2.put(URI.createURI(UMLResource.PROFILES_PATHMAP), uri.appendSegment("profiles").appendSegment(""));
uriMap2.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP), uri.appendSegment("libraries").appendSegment(""));

In debug mode, when I come to the line that causes the exception (ModelUtils.save(snapshot, "result.emfdiff");), I get the message:
The jar of this class file belongs to the class 'Plug-in Dependencies' which does not allow modifications to source attachments on its entries.

public class org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl....

So, the problem I have is maybe due to the plug-in dependencies, since org.eclipse.emf.ecore.xmi is not in my required plug-ins list, because I can't add it?
I added this plug-in to the java search but nothing changes (plug-in view and then right click add to java search).
Re: EMF Compare Start problem [message #622820 is a reply to message #622819] Wed, 05 May 2010 07:52 Go to previous message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1609
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080406030304020301070109
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Bogie,

I am at a loss here as to what's happening with your models. Could you
raise a bugzilla with the error message you get, the models your trying
to compare, and the code you're using to this end?

Laurent Goubet
Obeo

Bogie wrote:
> Hi,
>
> Thank you very much for clearing up some things for me. I registered
> the packages and defined the uri maps, but I still get the same
> exception. This is my code snippet :
>
> final ResourceSet resourceSet1 = new ResourceSetImpl();
> final ResourceSet resourceSet2 = new ResourceSetImpl();
> // Register additionnal packages here. For UML2 for instance :
>
> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(
> ).put(UMLResource.FILE_EXTENSION,
> UMLResource.Factory.INSTANCE);
> resourceSet1.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
> resourceSet2.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
> Map<URI, URI> uriMap1 =
> resourceSet1.getURIConverter().getURIMap();
> URI uri = URI.createURI("
> jar:file:/C:/eclipse/plugins/org.eclipse.uml2.uml.resources_
> 2.2.0.v200805131030.jar!/ ");
>
> uriMap1.put(URI.createURI(UMLResource.METAMODELS_PATHMAP),
> uri.appendSegment("metamodels").appendSegment(""));
> uriMap1.put(URI.createURI(UMLResource.PROFILES_PATHMAP),
> uri.appendSegment("profiles").appendSegment(""));
> uriMap1.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP),
> uri.appendSegment("libraries").appendSegment(""));
> Map<URI, URI> uriMap2 =
> resourceSet2.getURIConverter().getURIMap();
>
> uriMap2.put(URI.createURI(UMLResource.METAMODELS_PATHMAP),
> uri.appendSegment("metamodels").appendSegment(""));
> uriMap2.put(URI.createURI(UMLResource.PROFILES_PATHMAP),
> uri.appendSegment("profiles").appendSegment(""));
> uriMap2.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP),
> uri.appendSegment("libraries").appendSegment(""));
>
> In debug mode, when I come to the line that causes the exception
> (ModelUtils.save(snapshot, "result.emfdiff");), I get the message: The
> jar of this class file belongs to the class 'Plug-in Dependencies' which
> does not allow modifications to source attachments on its entries.
>
> public class org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl....
>
> So, the problem I have is maybe due to the plug-in dependencies, since
> org.eclipse.emf.ecore.xmi is not in my required plug-ins list, because I
> can't add it?
> I added this plug-in to the java search but nothing changes (plug-in
> view and then right click add to java search).
>
>


--------------080406030304020301070109
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------080406030304020301070109--
Re: EMF Compare Start problem [message #622824 is a reply to message #531549] Wed, 05 May 2010 08:37 Go to previous message
Bogie is currently offline Bogie
Messages: 14
Registered: April 2010
Junior Member
Hi,
I've submitted the code to Bugzilla.
Re: EMF Compare Start problem [message #622831 is a reply to message #622824] Thu, 06 May 2010 04:28 Go to previous message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1609
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010403080700000804010907
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Humm ... could you copy the bugzilla URL here? I can't seem to find it.

Bogie wrote:
> Hi,
> I've submitted the code to Bugzilla.


--------------010403080700000804010907
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------010403080700000804010907--
Re: EMF Compare Start problem [message #622851 is a reply to message #531791] Fri, 07 May 2010 05:02 Go to previous message
Bogie is currently offline Bogie
Messages: 14
Registered: April 2010
Junior Member
Here it is:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=311710
Re: EMF Compare Start problem [message #622874 is a reply to message #622851] Tue, 11 May 2010 05:33 Go to previous message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1609
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070105040102080307030509
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Thanks, my RSS feed hadn't been updated and I didn't look directly on
the bugzilla (I kinda got used to being fed by thunderbird :p).

We'll try and look at this asap.

Laurent Goubet
Obeo

Bogie wrote:
> Here it is:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=311710
>


--------------070105040102080307030509
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------070105040102080307030509--
Previous Topic:EMF Compare
Next Topic:EMF XMI Serialization
Goto Forum:
  


Current Time: Mon Apr 21 03:25:03 EDT 2014

Powered by FUDForum. Page generated in 0.03846 seconds