Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [Compare] extensibility
|
Re: [Compare] extensibility [message #99410 is a reply to message #99395] |
Wed, 17 October 2007 12:35 |
|
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 |
hanys 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 |
Eclipse User |
|
|
|
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 |
Cedric Brun 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 |
|
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 |
hanys 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 |
Ed Merks Messages: 33252 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 |
Cedric Brun 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.
|
|
|
Goto Forum:
Current Time: Sat Nov 09 03:31:38 GMT 2024
Powered by FUDForum. Page generated in 0.03684 seconds
|