Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Compare] extensibility
[Compare] extensibility [message #99395] Wed, 17 October 2007 11:44 Go to next message
hanys is currently offline hanysFriend
Messages: 188
Registered: July 2009
Senior Member
Hello,

will be in future possible to use another formats for LOADING/STORING of
data?
Possibly for load/store model in multiple files?
For example via extension point mechanism.


best Regards,
Jan
Re: [Compare] extensibility [message #99410 is a reply to message #99395] Wed, 17 October 2007 12: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.
--------------060405020904090007070004
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Jan,

I don't really understand what you describe as "data".

Storing data : if you are talking about the result of the comparison, it
is already possible to alter the way it is saved. Currently an action is
implemented to save the result as "emfdiff" which contains both the diff
model and the match model. The extension point
"org.eclipse.emf.compare.ui.export" allows you to define new actions for
the "export" menu.

Loading data : if you are talking about the way we load the two models
to be compared ... well we don't :) org.eclipse.compare does this job
and sends us streams to the models to be compared. That is for the "GUI
usage" of emf compare. If you compare objects from code instead, it is
up to you to load your EObjects in memory and call a comparison on them
using MatchService#modelMatch(EObject, EObject, ProgressMonitor).
Starting from here, it should be possible to load your models from
multiple files in the same ResourceSet and compare them.

Regards,
Laurent Goubet
Obeo

eclipsemaniac a
Re: [Compare] extensibility [message #99439 is a reply to message #99410] Wed, 17 October 2007 13:21 Go to previous messageGo to next message
hanys is currently offline hanysFriend
Messages: 188
Registered: July 2009
Senior Member
Hello,

I did some debuging and found that for loading is used your utility
ModelUtils.
There are some methods for load the Resource. Could it be somehow extensible
so that used can provide his own implemetation of this load method for a
file, registered lets say by content type?

Best Regards,
Jan

"laurent Goubet" <laurent.goubet@obeo.fr> wrote in message
news:ff4vge$6i1$1@build.eclipse.org...
> Jan,
>
> I don't really understand what you describe as "data".
>
> Storing data : if you are talking about the result of the comparison, it
> is already possible to alter the way it is saved. Currently an action is
> implemented to save the result as "emfdiff" which contains both the diff
> model and the match model. The extension point
> "org.eclipse.emf.compare.ui.export" allows you to define new actions for
> the "export" menu.
>
> Loading data : if you are talking about the way we load the two models
> to be compared ... well we don't :) org.eclipse.compare does this job
> and sends us streams to the models to be compared. That is for the "GUI
> usage" of emf compare. If you compare objects from code instead, it is
> up to you to load your EObjects in memory and call a comparison on them
> using MatchService#modelMatch(EObject, EObject, ProgressMonitor).
> Starting from here, it should be possible to load your models from
> multiple files in the same ResourceSet and compare them.
>
> Regards,
> Laurent Goubet
> Obeo
>
> eclipsemaniac a
Re: [Compare] extensibility [message #99464 is a reply to message #99439] Wed, 17 October 2007 13:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------040903010302020702000409
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Jan,

Note that in EMF 2.4 we added support for content types.
<https://bugs.eclipse.org/bugs/show_bug.cgi?id=191077>

https://bugs.eclipse.org/bugs/show_bug.cgi?id=191077

Unfortunately there's no documentation yet. The XMI plugin.xml shows
how the content type for Ecore Model content is registered.


eclipsemaniac wrote:
> Hello,
>
> I did some debuging and found that for loading is used your utility
> ModelUtils.
> There are some methods for load the Resource. Could it be somehow extensible
> so that used can provide his own implemetation of this load method for a
> file, registered lets say by content type?
>
> Best Regards,
> Jan
>
> "laurent Goubet" <laurent.goubet@obeo.fr> wrote in message
> news:ff4vge$6i1$1@build.eclipse.org...
>
>> Jan,
>>
>> I don't really understand what you describe as "data".
>>
>> Storing data : if you are talking about the result of the comparison, it
>> is already possible to alter the way it is saved. Currently an action is
>> implemented to save the result as "emfdiff" which contains both the diff
>> model and the match model. The extension point
>> "org.eclipse.emf.compare.ui.export" allows you to define new actions for
>> the "export" menu.
>>
>> Loading data : if you are talking about the way we load the two models
>> to be compared ... well we don't :) org.eclipse.compare does this job
>> and sends us streams to the models to be compared. That is for the "GUI
>> usage" of emf compare. If you compare objects from code instead, it is
>> up to you to load your EObjects in memory and call a comparison on them
>> using MatchService#modelMatch(EObject, EObject, ProgressMonitor).
>> Starting from here, it should be possible to load your models from
>> multiple files in the same ResourceSet and compare them.
>>
>> Regards,
>> Laurent Goubet
>> Obeo
>>
>> eclipsemaniac a
Re: [Compare] extensibility [message #99595 is a reply to message #99439] Thu, 18 October 2007 06:59 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Hi,

using emf you may define your own ResourceFactory associated with a file
extension. This resource factory has to provide a Resource implementation,
you may define your own loading/saving your model in a specific way.

EMF compare will automatically re-use that implementation.

Cédric

eclipsemaniac wrote:

> Hello,
>
> I did some debuging and found that for loading is used your utility
> ModelUtils.
> There are some methods for load the Resource. Could it be somehow
> extensible so that used can provide his own implemetation of this load
> method for a file, registered lets say by content type?
>
> Best Regards,
> Jan
>
> "laurent Goubet" <laurent.goubet@obeo.fr> wrote in message
> news:ff4vge$6i1$1@build.eclipse.org...
>> Jan,
>>
>> I don't really understand what you describe as "data".
>>
>> Storing data : if you are talking about the result of the comparison, it
>> is already possible to alter the way it is saved. Currently an action is
>> implemented to save the result as "emfdiff" which contains both the diff
>> model and the match model. The extension point
>> "org.eclipse.emf.compare.ui.export" allows you to define new actions for
>> the "export" menu.
>>
>> Loading data : if you are talking about the way we load the two models
>> to be compared ... well we don't :) org.eclipse.compare does this job
>> and sends us streams to the models to be compared. That is for the "GUI
>> usage" of emf compare. If you compare objects from code instead, it is
>> up to you to load your EObjects in memory and call a comparison on them
>> using MatchService#modelMatch(EObject, EObject, ProgressMonitor).
>> Starting from here, it should be possible to load your models from
>> multiple files in the same ResourceSet and compare them.
>>
>> Regards,
>> Laurent Goubet
>> Obeo
>>
>> eclipsemaniac a


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: [Compare] extensibility [message #610044 is a reply to message #99395] Wed, 17 October 2007 12:35 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.
--------------060405020904090007070004
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Jan,

I don't really understand what you describe as "data".

Storing data : if you are talking about the result of the comparison, it
is already possible to alter the way it is saved. Currently an action is
implemented to save the result as "emfdiff" which contains both the diff
model and the match model. The extension point
"org.eclipse.emf.compare.ui.export" allows you to define new actions for
the "export" menu.

Loading data : if you are talking about the way we load the two models
to be compared ... well we don't :) org.eclipse.compare does this job
and sends us streams to the models to be compared. That is for the "GUI
usage" of emf compare. If you compare objects from code instead, it is
up to you to load your EObjects in memory and call a comparison on them
using MatchService#modelMatch(EObject, EObject, ProgressMonitor).
Starting from here, it should be possible to load your models from
multiple files in the same ResourceSet and compare them.

Regards,
Laurent Goubet
Obeo

eclipsemaniac a
Re: [Compare] extensibility [message #610048 is a reply to message #99410] Wed, 17 October 2007 13:21 Go to previous message
hanys is currently offline hanysFriend
Messages: 188
Registered: July 2009
Senior Member
Hello,

I did some debuging and found that for loading is used your utility
ModelUtils.
There are some methods for load the Resource. Could it be somehow extensible
so that used can provide his own implemetation of this load method for a
file, registered lets say by content type?

Best Regards,
Jan

"laurent Goubet" <laurent.goubet@obeo.fr> wrote in message
news:ff4vge$6i1$1@build.eclipse.org...
> Jan,
>
> I don't really understand what you describe as "data".
>
> Storing data : if you are talking about the result of the comparison, it
> is already possible to alter the way it is saved. Currently an action is
> implemented to save the result as "emfdiff" which contains both the diff
> model and the match model. The extension point
> "org.eclipse.emf.compare.ui.export" allows you to define new actions for
> the "export" menu.
>
> Loading data : if you are talking about the way we load the two models
> to be compared ... well we don't :) org.eclipse.compare does this job
> and sends us streams to the models to be compared. That is for the "GUI
> usage" of emf compare. If you compare objects from code instead, it is
> up to you to load your EObjects in memory and call a comparison on them
> using MatchService#modelMatch(EObject, EObject, ProgressMonitor).
> Starting from here, it should be possible to load your models from
> multiple files in the same ResourceSet and compare them.
>
> Regards,
> Laurent Goubet
> Obeo
>
> eclipsemaniac a
Re: [Compare] extensibility [message #610051 is a reply to message #99439] Wed, 17 October 2007 13:49 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040903010302020702000409
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Jan,

Note that in EMF 2.4 we added support for content types.
<https://bugs.eclipse.org/bugs/show_bug.cgi?id=191077>

https://bugs.eclipse.org/bugs/show_bug.cgi?id=191077

Unfortunately there's no documentation yet. The XMI plugin.xml shows
how the content type for Ecore Model content is registered.


eclipsemaniac wrote:
> Hello,
>
> I did some debuging and found that for loading is used your utility
> ModelUtils.
> There are some methods for load the Resource. Could it be somehow extensible
> so that used can provide his own implemetation of this load method for a
> file, registered lets say by content type?
>
> Best Regards,
> Jan
>
> "laurent Goubet" <laurent.goubet@obeo.fr> wrote in message
> news:ff4vge$6i1$1@build.eclipse.org...
>
>> Jan,
>>
>> I don't really understand what you describe as "data".
>>
>> Storing data : if you are talking about the result of the comparison, it
>> is already possible to alter the way it is saved. Currently an action is
>> implemented to save the result as "emfdiff" which contains both the diff
>> model and the match model. The extension point
>> "org.eclipse.emf.compare.ui.export" allows you to define new actions for
>> the "export" menu.
>>
>> Loading data : if you are talking about the way we load the two models
>> to be compared ... well we don't :) org.eclipse.compare does this job
>> and sends us streams to the models to be compared. That is for the "GUI
>> usage" of emf compare. If you compare objects from code instead, it is
>> up to you to load your EObjects in memory and call a comparison on them
>> using MatchService#modelMatch(EObject, EObject, ProgressMonitor).
>> Starting from here, it should be possible to load your models from
>> multiple files in the same ResourceSet and compare them.
>>
>> Regards,
>> Laurent Goubet
>> Obeo
>>
>> eclipsemaniac a


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Compare] extensibility [message #610069 is a reply to message #99439] Thu, 18 October 2007 06:59 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Hi,

using emf you may define your own ResourceFactory associated with a file
extension. This resource factory has to provide a Resource implementation,
you may define your own loading/saving your model in a specific way.

EMF compare will automatically re-use that implementation.

Cédric

eclipsemaniac wrote:

> Hello,
>
> I did some debuging and found that for loading is used your utility
> ModelUtils.
> There are some methods for load the Resource. Could it be somehow
> extensible so that used can provide his own implemetation of this load
> method for a file, registered lets say by content type?
>
> Best Regards,
> Jan
>
> "laurent Goubet" <laurent.goubet@obeo.fr> wrote in message
> news:ff4vge$6i1$1@build.eclipse.org...
>> Jan,
>>
>> I don't really understand what you describe as "data".
>>
>> Storing data : if you are talking about the result of the comparison, it
>> is already possible to alter the way it is saved. Currently an action is
>> implemented to save the result as "emfdiff" which contains both the diff
>> model and the match model. The extension point
>> "org.eclipse.emf.compare.ui.export" allows you to define new actions for
>> the "export" menu.
>>
>> Loading data : if you are talking about the way we load the two models
>> to be compared ... well we don't :) org.eclipse.compare does this job
>> and sends us streams to the models to be compared. That is for the "GUI
>> usage" of emf compare. If you compare objects from code instead, it is
>> up to you to load your EObjects in memory and call a comparison on them
>> using MatchService#modelMatch(EObject, EObject, ProgressMonitor).
>> Starting from here, it should be possible to load your models from
>> multiple files in the same ResourceSet and compare them.
>>
>> Regards,
>> Laurent Goubet
>> Obeo
>>
>> eclipsemaniac a


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Previous Topic:Clean EMF install: Project does not exist?
Next Topic:[CDO] all tests successfull, next step ?
Goto Forum:
  


Current Time: Tue Apr 23 02:50:07 GMT 2024

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

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

Back to the top