Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] Getting started
[EMF Compare] Getting started [message #491904] Fri, 16 October 2009 13:54 Go to next message
Carlos  is currently offline Carlos Friend
Messages: 52
Registered: September 2009
Member
Hi.

I want getting started with EMF Compare. I have installed the plugins and I'm looking for a example plugin like the EMF case (library example).

I have found source code in that way in the URL:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org .eclipse.emf.compare/examples/org.eclipse.emf.compare.exampl es.export.xslt/?root=Modeling_Project

Probably, that is a repository for developers...

However, I wanted to know where can I get the binary to install it, and make the first tests.

Thanks in advance.
Carlos.
Re: [EMF Compare] Getting started [message #491918 is a reply to message #491904] Fri, 16 October 2009 14:35 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090003040702080500060203
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Carlos,

This might seem "déjà lu" or a little bit out of space, it is a
copy/paste of a previous answer on this newsgroup. Don't hesitate to
slap me if it doesn't help :p.

It all depends on what you want to do with EMF Compare :) . If you
simply want to compare models, getting started is easy : add the
extension of the models you want to compare in Window => Preferences =>
General => Content types => EMF Compare and compare your files as you
would normally (see
http://wiki.eclipse.org/Comparing_XML_files_with_EMF_Compare ).

If you wish to call EMF Compare programmatically, the examples are
indeed the good place to start, with the "standalone" example being the
more concise as to "how to call for a comparison from code".

If you wish to develop patches/fixes for EMF Compare, take a look at
http://wiki.eclipse.org/Setting_up_a_development_environment _for_EMF_Compare
on how to set up your environment.

Hope this helps,

Laurent Goubet
Obeo


Carlos a écrit :
> Hi.
>
> I want getting started with EMF Compare. I have installed the plugins
> and I'm looking for a example plugin like the EMF case (library example).
>
> I have found source code in that way in the URL:
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org .eclipse.emf.compare/examples/org.eclipse.emf.compare.exampl es.export.xslt/?root=Modeling_Project
>
>
> Probably, that is a repository for developers...
>
> However, I wanted to know where can I get the binary to install it, and
> make the first tests.
>
> Thanks in advance.
> Carlos.


--------------090003040702080500060203
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
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyLyI+T2JlbzwvYT4NCmVtYWls O2ludGVybmV0
OmxhdXJlbnQuZ291YmV0QG9iZW8uZnINCnVybDpodHRwOi8vd3d3Lm9iZW8u ZnINCnZlcnNp
b246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------090003040702080500060203--
Re: [EMF Compare] Getting started [message #491945 is a reply to message #491918] Fri, 16 October 2009 16:34 Go to previous messageGo to next message
Carlos  is currently offline Carlos Friend
Messages: 52
Registered: September 2009
Member
Hi Laurent,

I want to call EMF Compare programmatically in the scope of an application which has to show the comparation result like a new tree model.
I will study that examples.
Sorry for the repeated post and thank you for your attention.

Best regards.
Carlos.
Re: [EMF Compare] Getting started [message #492178 is a reply to message #491945] Mon, 19 October 2009 10:45 Go to previous messageGo to next message
Carlos  is currently offline Carlos Friend
Messages: 52
Registered: September 2009
Member
Hi,

I'm trying to execute the standalone example for EMF compare with two models of "EXTlibray EMF example".

The example program throws the next exception:

org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri ' http:///org/eclipse/emf/examples/library/extlibrary.ecore/1. 0.0' not found. ( file:///C:/Galileo/eclipse/workspacePrueba/org.eclipse.emf.e xamples.library/My.extlibrary, 2, 189)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLL oadImpl.java:83)


when is loading the resources.

The package "extlibrary" has in the meta-model the next specification: (attributes and values for epackage)
-- Name:............... extlibrary
-- Ns prefix: ......... extlib
-- Ns URI ............ http:///org/eclipse/emf/examples/library/extlibrary.ecore/1. 0.0

There must be some wrong value... but I don't now exactly what is the problem.

Please, have you got any suggestion?
Thanks in advance.
Carlos.
Re: [EMF Compare] Getting started [message #492192 is a reply to message #492178] Mon, 19 October 2009 11:49 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000504020304070507090200
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Carlos,

When executing standalone code, you need to manually register the
metamodels in the package registry. You can do so with the example I
gave as commented out lines in the standalone "ExampleLauncher" :

// 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);

In your case, it will be something like
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put(ExtLibraryResource.FILE_EXTENSION,
ExtLibraryResource.Factory.INSTANCE);
resourceSet1.getPackageRegistry().put(ExtLibraryPackage.eNS_ URI,
ExtLibraryPackage.eINSTANCE);
resourceSet2.getPackageRegistry().put(ExtLibraryPackage.eNS_ URI,
ExtLibraryPackage.eINSTANCE);

Laurent Goubet
Obeo

Carlos a écrit :
> Hi,
>
> I'm trying to execute the standalone example for EMF compare with two
> models of "EXTlibray EMF example".
>
> The example program throws the next exception:
>
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
> uri ' http:///org/eclipse/emf/examples/library/extlibrary.ecore/1. 0.0'
> not found.
> ( file:///C:/Galileo/eclipse/workspacePrueba/org.eclipse.emf.e xamples.library/My.extlibrary,
> 2, 189)
> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLL
> oadImpl.java:83)
>
>
> when is loading the resources.
>
> The package "extlibrary" has in the meta-model the next specification:
> (attributes and values for epackage)
> -- Name:............... extlibrary
> -- Ns prefix: ......... extlib
> -- Ns URI ............
> http:///org/eclipse/emf/examples/library/extlibrary.ecore/1. 0.0
>
> There must be some wrong value... but I don't now exactly what is the
> problem.
>
> Please, have you got any suggestion?
> Thanks in advance.
> Carlos.


--------------000504020304070507090200
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
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyLyI+T2JlbzwvYT4NCmVtYWls O2ludGVybmV0
OmxhdXJlbnQuZ291YmV0QG9iZW8uZnINCnVybDpodHRwOi8vd3d3Lm9iZW8u ZnINCnZlcnNp
b246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------000504020304070507090200--
Re: [EMF Compare] Getting started [message #621494 is a reply to message #491918] Fri, 16 October 2009 16:34 Go to previous message
Carlos  is currently offline Carlos Friend
Messages: 52
Registered: September 2009
Member
Hi Laurent,

I want to call EMF Compare programmatically in the scope of an application which has to show the comparation result like a new tree model.
I will study that examples.
Sorry for the repeated post and thank you for your attention.

Best regards.
Carlos.
Re: [EMF Compare] Getting started [message #621496 is a reply to message #621494] Mon, 19 October 2009 10:46 Go to previous message
Carlos  is currently offline Carlos Friend
Messages: 52
Registered: September 2009
Member
Hi,

I'm trying to execute the standalone example for EMF compare with two models of "EXTlibray EMF example".

The example program throws the next exception:

org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri ' http:///org/eclipse/emf/examples/library/extlibrary.ecore/1. 0.0' not found. ( file:///C:/Galileo/eclipse/workspacePrueba/org.eclipse.emf.e xamples.library/My.extlibrary, 2, 189)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLL oadImpl.java:83)


when is loading the resources.

The package "extlibrary" has in the meta-model the next specification: (attributes and values for epackage)
-- Name:............... extlibrary
-- Ns prefix: ......... extlib
-- Ns URI ............ http:///org/eclipse/emf/examples/library/extlibrary.ecore/1. 0.0

There must be some wrong value... but I don't now exactly what is the problem.

Please, have you got any suggestion?
Thanks in advance.
Carlos.
Re: [EMF Compare] Getting started [message #621497 is a reply to message #621496] Mon, 19 October 2009 11:49 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000504020304070507090200
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Carlos,

When executing standalone code, you need to manually register the
metamodels in the package registry. You can do so with the example I
gave as commented out lines in the standalone "ExampleLauncher" :

// 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);

In your case, it will be something like
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put(ExtLibraryResource.FILE_EXTENSION,
ExtLibraryResource.Factory.INSTANCE);
resourceSet1.getPackageRegistry().put(ExtLibraryPackage.eNS_ URI,
ExtLibraryPackage.eINSTANCE);
resourceSet2.getPackageRegistry().put(ExtLibraryPackage.eNS_ URI,
ExtLibraryPackage.eINSTANCE);

Laurent Goubet
Obeo

Carlos a écrit :
> Hi,
>
> I'm trying to execute the standalone example for EMF compare with two
> models of "EXTlibray EMF example".
>
> The example program throws the next exception:
>
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
> uri ' http:///org/eclipse/emf/examples/library/extlibrary.ecore/1. 0.0'
> not found.
> ( file:///C:/Galileo/eclipse/workspacePrueba/org.eclipse.emf.e xamples.library/My.extlibrary,
> 2, 189)
> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLL
> oadImpl.java:83)
>
>
> when is loading the resources.
>
> The package "extlibrary" has in the meta-model the next specification:
> (attributes and values for epackage)
> -- Name:............... extlibrary
> -- Ns prefix: ......... extlib
> -- Ns URI ............
> http:///org/eclipse/emf/examples/library/extlibrary.ecore/1. 0.0
>
> There must be some wrong value... but I don't now exactly what is the
> problem.
>
> Please, have you got any suggestion?
> Thanks in advance.
> Carlos.


--------------000504020304070507090200
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
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyLyI+T2JlbzwvYT4NCmVtYWls O2ludGVybmV0
OmxhdXJlbnQuZ291YmV0QG9iZW8uZnINCnVybDpodHRwOi8vd3d3Lm9iZW8u ZnINCnZlcnNp
b246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------000504020304070507090200--
Previous Topic:[EcoreTools] Multiple packages
Next Topic:[EcoreTools] Choosing attribute type
Goto Forum:
  


Current Time: Fri Apr 19 09:57:41 GMT 2024

Powered by FUDForum. Page generated in 0.02903 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top