Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] Standalone run and in-memory-only objects
[EMF Compare] Standalone run and in-memory-only objects [message #88920] Wed, 11 July 2007 08:51 Go to next message
Eclipse UserFriend
Originally posted by: romain.raugi.gmail.com

Hi,

I tested Compare approximately one month ago (by building the plug-ins
from CVS sources) and two things particularly interested me:

- It was possible to use the match and diff engine outside of Eclipse.
- In-memory-only objects, with no corresponding resource (created in my
case with Dynamic EMF) were supported.

I think the first point is a real requirement knowing that EMF can be
used outside of Eclipse. For the second point, I think it contributes to
make Compare more flexible.

Now with the RC1, I see you introduced some dependencies that makes them
not working anymore.

- You depend now on EObject.eResource() (in DifferentServices for
example), what implies that objects should be loaded from a resource.

- The approach you recommended to use it outside of Eclipse doesn't work
anymore, DifferentServices looks now for the EMF Compare plug-in (to
log, to retrieve a search window...).

Do you plan to do some refactoring to make these points working again?

Thanks,

Romain.
Re: [EMF Compare] Standalone run and in-memory-only objects [message #88982 is a reply to message #88920] Wed, 11 July 2007 14:03 Go to previous messageGo to next message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
--nextPart2124834.EZEvBDC8lV
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8Bit

We're trying as much as possible to provide something usable outside of
Eclipse, just as EMF do. Right now, thanks to the fix of the #195859 bug
you should now be able to use it nicely without Eclipse, just have a look
on the enclosed Java program, it's working with the CVS version in the
R0.7.0maintenance branch.

All the Exceptions should be throwed back when compare is used outside of
Eclipse.

Concerning the "in-memory" objects, the issue is somewhat different. EMF
compare now extensively tests eResources to detect changes in resources
targeting other models. You're able to create a ResourceImpl without
needing any kind of serialization, it helps keeping track of changes and
id's. Using EMF resources and putting your in-memory objects inside you
should be able to compare them without problems.

eResource() is really helpfull to determine the EObject origin and ignoring
it could bring to bad delta results and more especially bad merges.

Though we can discuss about it, can you tell us about your use case needing
that no "Resource" is used?

Cédric


Romain Raugi wrote:

> Hi,
>
> I tested Compare approximately one month ago (by building the plug-ins
> from CVS sources) and two things particularly interested me:
>
> - It was possible to use the match and diff engine outside of Eclipse.
> - In-memory-only objects, with no corresponding resource (created in my
> case with Dynamic EMF) were supported.
>
> I think the first point is a real requirement knowing that EMF can be
> used outside of Eclipse. For the second point, I think it contributes to
> make Compare more flexible.
>
> Now with the RC1, I see you introduced some dependencies that makes them
> not working anymore.
>
> - You depend now on EObject.eResource() (in DifferentServices for
> example), what implies that objects should be loaded from a resource.
>
> - The approach you recommended to use it outside of Eclipse doesn't work
> anymore, DifferentServices looks now for the EMF Compare plug-in (to
> log, to retrieve a search window...).
>
> Do you plan to do some refactoring to make these points working again?
>
> Thanks,
>
> Romain.


--nextPart2124834.EZEvBDC8lV
Content-Type: text/x-java; name="ExampleLauncher.java"
Content-Transfer-Encoding: 8Bit
Content-Disposition: attachment; filename="ExampleLauncher.java"

/*********************************************************** ********************
* Copyright (c) 2006, 2007 Obeo.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Obeo - initial API and implementation
************************************************************ *******************/
package org.eclipse.emf.compare.tests;

import java.io.File;
import java.io.IOException;
import java.util.Collections;

import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.compare.diff.generic.DiffMaker;
import org.eclipse.emf.compare.diff.metamodel.DiffModel;
import org.eclipse.emf.compare.match.metamodel.MatchModel;
import org.eclipse.emf.compare.match.statistic.DifferencesServices;
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.ecore.xmi.impl.XMIResourceFactoryImpl;

/**
* 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 {
private ExampleLauncher() {
// prevents instantiation
}

/**
* Loads a model from an {@link org.eclipse.emf.common.util.URI URI} in a given {@link ResourceSet}.
*
* @param file
* {@link java.io.File File} containing the model to be loaded.
* @param resourceSet
* The {@link ResourceSet} to load the model in.
* @return The model loaded from the file.
* @throws IOException
* If the given file does not exist.
*/
@SuppressWarnings("unchecked")
public static EObject load(File file, ResourceSet resourceSet) throws IOException {
final URI modelURI = URI.createFileURI(file.getPath());
EObject result = null;

String fileExtension = modelURI.fileExtension();
if (fileExtension == null || fileExtension.length() == 0) {
fileExtension = Resource.Factory.Registry.DEFAULT_EXTENSION;
}

final Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
final Object resourceFactory = reg.getExtensionToFactoryMap().get(fileExtension);
if (resourceFactory != null) {
resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put(fileExtension, resourceFactory);
} else {
resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put(fileExtension, new XMIResourceFactoryImpl());
}

final Resource modelResource = resourceSet.createResource(modelURI);
modelResource.load(Collections.EMPTY_MAP);
if (modelResource.getContents().size() > 0)
result = (EObject)modelResource.getContents().get(0);
return result;
}

/**
* 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()) {
final ResourceSet resourceSet = new ResourceSetImpl();
try {
final EObject model1 = load(new File(args[0]), resourceSet);
final EObject model2 = load(new File(args[1]), resourceSet);
final MatchModel match = new DifferencesServices().modelMatch(model1, model2, new NullProgressMonitor());
final DiffModel diff = new DiffMaker().doDiff(match);

try {
System.out.println(ModelUtils.serialize(match));
System.out.println(ModelUtils.serialize(diff));
} catch (IOException e) {
e.printStackTrace();
}
} catch (IOException e) {
// cannot be thrown
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
} else {
System.out.println("usage : Launcher <Model1> <Model2>"); //$NON-NLS-1$
}
}
}


--nextPart2124834.EZEvBDC8lV--


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: [EMF Compare] Standalone run and in-memory-only objects [message #88997 is a reply to message #88982] Wed, 11 July 2007 15:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: romain.raugi.gmail.com

I'm pleased to know that compare still can be used outside of Eclipse.

My use case doesn't prevent me from using resources, the reason is only
that I don't need them and that I thought it was closely dependent to
serialization.

What I want to do is to adapt existing models loaded in memory (no EMF)
to compare them thanks to your generic engine. For this purpose I'm
creating a little adapter with dynamic EMF. I will use ResourceImpls in
addition, it is fine.

Thanks!

Romain

Cédric Brun a écrit :
> We're trying as much as possible to provide something usable outside of
> Eclipse, just as EMF do. Right now, thanks to the fix of the #195859 bug
> you should now be able to use it nicely without Eclipse, just have a look
> on the enclosed Java program, it's working with the CVS version in the
> R0.7.0maintenance branch.
>
> All the Exceptions should be throwed back when compare is used outside of
> Eclipse.
>
> Concerning the "in-memory" objects, the issue is somewhat different. EMF
> compare now extensively tests eResources to detect changes in resources
> targeting other models. You're able to create a ResourceImpl without
> needing any kind of serialization, it helps keeping track of changes and
> id's. Using EMF resources and putting your in-memory objects inside you
> should be able to compare them without problems.
>
> eResource() is really helpfull to determine the EObject origin and ignoring
> it could bring to bad delta results and more especially bad merges.
>
> Though we can discuss about it, can you tell us about your use case needing
> that no "Resource" is used?
>
> Cédric
>
>
> Romain Raugi wrote:
>
>> Hi,
>>
>> I tested Compare approximately one month ago (by building the plug-ins
>> from CVS sources) and two things particularly interested me:
>>
>> - It was possible to use the match and diff engine outside of Eclipse.
>> - In-memory-only objects, with no corresponding resource (created in my
>> case with Dynamic EMF) were supported.
>>
>> I think the first point is a real requirement knowing that EMF can be
>> used outside of Eclipse. For the second point, I think it contributes to
>> make Compare more flexible.
>>
>> Now with the RC1, I see you introduced some dependencies that makes them
>> not working anymore.
>>
>> - You depend now on EObject.eResource() (in DifferentServices for
>> example), what implies that objects should be loaded from a resource.
>>
>> - The approach you recommended to use it outside of Eclipse doesn't work
>> anymore, DifferentServices looks now for the EMF Compare plug-in (to
>> log, to retrieve a search window...).
>>
>> Do you plan to do some refactoring to make these points working again?
>>
>> Thanks,
>>
>> Romain.
>
Re: [EMF Compare] Standalone run and in-memory-only objects [message #89209 is a reply to message #88997] Thu, 12 July 2007 09:38 Go to previous messageGo to next message
Andrew Carton is currently offline Andrew CartonFriend
Messages: 104
Registered: July 2009
Senior Member
Cédric

Yes, thats cool that you fixed those bugs, so we can run standalone!
Would it be possible to get a mini-release or could you provide a
timeframe on the next release. I'd love to have a play around with this
and i'm not familiar how to get at the build in the cvs.

Thanks,
Andrew


Ar 11/07/2007 16:02, Scríobh Romain Raugi:
> I'm pleased to know that compare still can be used outside of Eclipse.
>
> My use case doesn't prevent me from using resources, the reason is only
> that I don't need them and that I thought it was closely dependent to
> serialization.
>
> What I want to do is to adapt existing models loaded in memory (no EMF)
> to compare them thanks to your generic engine. For this purpose I'm
> creating a little adapter with dynamic EMF. I will use ResourceImpls in
> addition, it is fine.
>
> Thanks!
>
> Romain
>
> Cédric Brun a écrit :
>> We're trying as much as possible to provide something usable outside of
>> Eclipse, just as EMF do. Right now, thanks to the fix of the #195859 bug
>> you should now be able to use it nicely without Eclipse, just have a look
>> on the enclosed Java program, it's working with the CVS version in the
>> R0.7.0maintenance branch.
>>
>> All the Exceptions should be throwed back when compare is used outside of
>> Eclipse.
>>
>> Concerning the "in-memory" objects, the issue is somewhat different. EMF
>> compare now extensively tests eResources to detect changes in resources
>> targeting other models. You're able to create a ResourceImpl without
>> needing any kind of serialization, it helps keeping track of changes and
>> id's. Using EMF resources and putting your in-memory objects inside you
>> should be able to compare them without problems.
>>
>> eResource() is really helpfull to determine the EObject origin and
>> ignoring it could bring to bad delta results and more especially bad
>> merges.
>> Though we can discuss about it, can you tell us about your use case
>> needing
>> that no "Resource" is used?
>>
>> Cédric
>>
>> Romain Raugi wrote:
>>
>>> Hi,
>>>
>>> I tested Compare approximately one month ago (by building the plug-ins
>>> from CVS sources) and two things particularly interested me:
>>>
>>> - It was possible to use the match and diff engine outside of Eclipse.
>>> - In-memory-only objects, with no corresponding resource (created in my
>>> case with Dynamic EMF) were supported.
>>>
>>> I think the first point is a real requirement knowing that EMF can be
>>> used outside of Eclipse. For the second point, I think it contributes to
>>> make Compare more flexible.
>>>
>>> Now with the RC1, I see you introduced some dependencies that makes them
>>> not working anymore.
>>>
>>> - You depend now on EObject.eResource() (in DifferentServices for
>>> example), what implies that objects should be loaded from a resource.
>>>
>>> - The approach you recommended to use it outside of Eclipse doesn't work
>>> anymore, DifferentServices looks now for the EMF Compare plug-in (to
>>> log, to retrieve a search window...).
>>>
>>> Do you plan to do some refactoring to make these points working again?
>>>
>>> Thanks,
>>>
>>> Romain.
>>
Re: [EMF Compare] Standalone run and in-memory-only objects [message #89239 is a reply to message #89209] Thu, 12 July 2007 09:53 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
As the RC1 got these bugs I'll build an RC2 (probably today). Then we'll
wait a few days for new bugs and if no "stopper bugs" are tracked this RC2
will become the final 0.7 release.

Cheers,

Cédric

Andrew Carton wrote:

> Cédric
>
> Yes, thats cool that you fixed those bugs, so we can run standalone!
> Would it be possible to get a mini-release or could you provide a
> timeframe on the next release. I'd love to have a play around with this
> and i'm not familiar how to get at the build in the cvs.
>
> Thanks,
> Andrew
>
>
> Ar 11/07/2007 16:02, Scríobh Romain Raugi:
>> I'm pleased to know that compare still can be used outside of Eclipse.
>>
>> My use case doesn't prevent me from using resources, the reason is only
>> that I don't need them and that I thought it was closely dependent to
>> serialization.
>>
>> What I want to do is to adapt existing models loaded in memory (no EMF)
>> to compare them thanks to your generic engine. For this purpose I'm
>> creating a little adapter with dynamic EMF. I will use ResourceImpls in
>> addition, it is fine.
>>
>> Thanks!
>>
>> Romain
>>
>> Cédric Brun a écrit :
>>> We're trying as much as possible to provide something usable outside of
>>> Eclipse, just as EMF do. Right now, thanks to the fix of the #195859 bug
>>> you should now be able to use it nicely without Eclipse, just have a
>>> look on the enclosed Java program, it's working with the CVS version in
>>> the R0.7.0maintenance branch.
>>>
>>> All the Exceptions should be throwed back when compare is used outside
>>> of Eclipse.
>>>
>>> Concerning the "in-memory" objects, the issue is somewhat different. EMF
>>> compare now extensively tests eResources to detect changes in resources
>>> targeting other models. You're able to create a ResourceImpl without
>>> needing any kind of serialization, it helps keeping track of changes and
>>> id's. Using EMF resources and putting your in-memory objects inside you
>>> should be able to compare them without problems.
>>>
>>> eResource() is really helpfull to determine the EObject origin and
>>> ignoring it could bring to bad delta results and more especially bad
>>> merges.
>>> Though we can discuss about it, can you tell us about your use case
>>> needing
>>> that no "Resource" is used?
>>>
>>> Cédric
>>>
>>> Romain Raugi wrote:
>>>
>>>> Hi,
>>>>
>>>> I tested Compare approximately one month ago (by building the plug-ins
>>>> from CVS sources) and two things particularly interested me:
>>>>
>>>> - It was possible to use the match and diff engine outside of Eclipse.
>>>> - In-memory-only objects, with no corresponding resource (created in my
>>>> case with Dynamic EMF) were supported.
>>>>
>>>> I think the first point is a real requirement knowing that EMF can be
>>>> used outside of Eclipse. For the second point, I think it contributes
>>>> to make Compare more flexible.
>>>>
>>>> Now with the RC1, I see you introduced some dependencies that makes
>>>> them not working anymore.
>>>>
>>>> - You depend now on EObject.eResource() (in DifferentServices for
>>>> example), what implies that objects should be loaded from a resource.
>>>>
>>>> - The approach you recommended to use it outside of Eclipse doesn't
>>>> work anymore, DifferentServices looks now for the EMF Compare plug-in
>>>> (to log, to retrieve a search window...).
>>>>
>>>> Do you plan to do some refactoring to make these points working again?
>>>>
>>>> Thanks,
>>>>
>>>> Romain.
>>>


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: [EMF Compare] Standalone run and in-memory-only objects [message #608696 is a reply to message #88920] Wed, 11 July 2007 14:03 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
--nextPart2124834.EZEvBDC8lV
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8Bit

We're trying as much as possible to provide something usable outside of
Eclipse, just as EMF do. Right now, thanks to the fix of the #195859 bug
you should now be able to use it nicely without Eclipse, just have a look
on the enclosed Java program, it's working with the CVS version in the
R0.7.0maintenance branch.

All the Exceptions should be throwed back when compare is used outside of
Eclipse.

Concerning the "in-memory" objects, the issue is somewhat different. EMF
compare now extensively tests eResources to detect changes in resources
targeting other models. You're able to create a ResourceImpl without
needing any kind of serialization, it helps keeping track of changes and
id's. Using EMF resources and putting your in-memory objects inside you
should be able to compare them without problems.

eResource() is really helpfull to determine the EObject origin and ignoring
it could bring to bad delta results and more especially bad merges.

Though we can discuss about it, can you tell us about your use case needing
that no "Resource" is used?

Cédric


Romain Raugi wrote:

> Hi,
>
> I tested Compare approximately one month ago (by building the plug-ins
> from CVS sources) and two things particularly interested me:
>
> - It was possible to use the match and diff engine outside of Eclipse.
> - In-memory-only objects, with no corresponding resource (created in my
> case with Dynamic EMF) were supported.
>
> I think the first point is a real requirement knowing that EMF can be
> used outside of Eclipse. For the second point, I think it contributes to
> make Compare more flexible.
>
> Now with the RC1, I see you introduced some dependencies that makes them
> not working anymore.
>
> - You depend now on EObject.eResource() (in DifferentServices for
> example), what implies that objects should be loaded from a resource.
>
> - The approach you recommended to use it outside of Eclipse doesn't work
> anymore, DifferentServices looks now for the EMF Compare plug-in (to
> log, to retrieve a search window...).
>
> Do you plan to do some refactoring to make these points working again?
>
> Thanks,
>
> Romain.


--nextPart2124834.EZEvBDC8lV
Content-Type: text/x-java; name="ExampleLauncher.java"
Content-Transfer-Encoding: 8Bit
Content-Disposition: attachment; filename="ExampleLauncher.java"

/*********************************************************** ********************
* Copyright (c) 2006, 2007 Obeo.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Obeo - initial API and implementation
************************************************************ *******************/
package org.eclipse.emf.compare.tests;

import java.io.File;
import java.io.IOException;
import java.util.Collections;

import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.compare.diff.generic.DiffMaker;
import org.eclipse.emf.compare.diff.metamodel.DiffModel;
import org.eclipse.emf.compare.match.metamodel.MatchModel;
import org.eclipse.emf.compare.match.statistic.DifferencesServices;
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.ecore.xmi.impl.XMIResourceFactoryImpl;

/**
* 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 {
private ExampleLauncher() {
// prevents instantiation
}

/**
* Loads a model from an {@link org.eclipse.emf.common.util.URI URI} in a given {@link ResourceSet}.
*
* @param file
* {@link java.io.File File} containing the model to be loaded.
* @param resourceSet
* The {@link ResourceSet} to load the model in.
* @return The model loaded from the file.
* @throws IOException
* If the given file does not exist.
*/
@SuppressWarnings("unchecked")
public static EObject load(File file, ResourceSet resourceSet) throws IOException {
final URI modelURI = URI.createFileURI(file.getPath());
EObject result = null;

String fileExtension = modelURI.fileExtension();
if (fileExtension == null || fileExtension.length() == 0) {
fileExtension = Resource.Factory.Registry.DEFAULT_EXTENSION;
}

final Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
final Object resourceFactory = reg.getExtensionToFactoryMap().get(fileExtension);
if (resourceFactory != null) {
resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put(fileExtension, resourceFactory);
} else {
resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put(fileExtension, new XMIResourceFactoryImpl());
}

final Resource modelResource = resourceSet.createResource(modelURI);
modelResource.load(Collections.EMPTY_MAP);
if (modelResource.getContents().size() > 0)
result = (EObject)modelResource.getContents().get(0);
return result;
}

/**
* 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()) {
final ResourceSet resourceSet = new ResourceSetImpl();
try {
final EObject model1 = load(new File(args[0]), resourceSet);
final EObject model2 = load(new File(args[1]), resourceSet);
final MatchModel match = new DifferencesServices().modelMatch(model1, model2, new NullProgressMonitor());
final DiffModel diff = new DiffMaker().doDiff(match);

try {
System.out.println(ModelUtils.serialize(match));
System.out.println(ModelUtils.serialize(diff));
} catch (IOException e) {
e.printStackTrace();
}
} catch (IOException e) {
// cannot be thrown
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
} else {
System.out.println("usage : Launcher <Model1> <Model2>"); //$NON-NLS-1$
}
}
}


--nextPart2124834.EZEvBDC8lV--


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: [EMF Compare] Standalone run and in-memory-only objects [message #608697 is a reply to message #88982] Wed, 11 July 2007 15:02 Go to previous message
Romain Raugi is currently offline Romain RaugiFriend
Messages: 15
Registered: July 2009
Junior Member
I'm pleased to know that compare still can be used outside of Eclipse.

My use case doesn't prevent me from using resources, the reason is only
that I don't need them and that I thought it was closely dependent to
serialization.

What I want to do is to adapt existing models loaded in memory (no EMF)
to compare them thanks to your generic engine. For this purpose I'm
creating a little adapter with dynamic EMF. I will use ResourceImpls in
addition, it is fine.

Thanks!

Romain

Cédric Brun a écrit :
> We're trying as much as possible to provide something usable outside of
> Eclipse, just as EMF do. Right now, thanks to the fix of the #195859 bug
> you should now be able to use it nicely without Eclipse, just have a look
> on the enclosed Java program, it's working with the CVS version in the
> R0.7.0maintenance branch.
>
> All the Exceptions should be throwed back when compare is used outside of
> Eclipse.
>
> Concerning the "in-memory" objects, the issue is somewhat different. EMF
> compare now extensively tests eResources to detect changes in resources
> targeting other models. You're able to create a ResourceImpl without
> needing any kind of serialization, it helps keeping track of changes and
> id's. Using EMF resources and putting your in-memory objects inside you
> should be able to compare them without problems.
>
> eResource() is really helpfull to determine the EObject origin and ignoring
> it could bring to bad delta results and more especially bad merges.
>
> Though we can discuss about it, can you tell us about your use case needing
> that no "Resource" is used?
>
> Cédric
>
>
> Romain Raugi wrote:
>
>> Hi,
>>
>> I tested Compare approximately one month ago (by building the plug-ins
>> from CVS sources) and two things particularly interested me:
>>
>> - It was possible to use the match and diff engine outside of Eclipse.
>> - In-memory-only objects, with no corresponding resource (created in my
>> case with Dynamic EMF) were supported.
>>
>> I think the first point is a real requirement knowing that EMF can be
>> used outside of Eclipse. For the second point, I think it contributes to
>> make Compare more flexible.
>>
>> Now with the RC1, I see you introduced some dependencies that makes them
>> not working anymore.
>>
>> - You depend now on EObject.eResource() (in DifferentServices for
>> example), what implies that objects should be loaded from a resource.
>>
>> - The approach you recommended to use it outside of Eclipse doesn't work
>> anymore, DifferentServices looks now for the EMF Compare plug-in (to
>> log, to retrieve a search window...).
>>
>> Do you plan to do some refactoring to make these points working again?
>>
>> Thanks,
>>
>> Romain.
>
Re: [EMF Compare] Standalone run and in-memory-only objects [message #608711 is a reply to message #88997] Thu, 12 July 2007 09:38 Go to previous message
Andrew Carton is currently offline Andrew CartonFriend
Messages: 104
Registered: July 2009
Senior Member
Cédric

Yes, thats cool that you fixed those bugs, so we can run standalone!
Would it be possible to get a mini-release or could you provide a
timeframe on the next release. I'd love to have a play around with this
and i'm not familiar how to get at the build in the cvs.

Thanks,
Andrew


Ar 11/07/2007 16:02, Scríobh Romain Raugi:
> I'm pleased to know that compare still can be used outside of Eclipse.
>
> My use case doesn't prevent me from using resources, the reason is only
> that I don't need them and that I thought it was closely dependent to
> serialization.
>
> What I want to do is to adapt existing models loaded in memory (no EMF)
> to compare them thanks to your generic engine. For this purpose I'm
> creating a little adapter with dynamic EMF. I will use ResourceImpls in
> addition, it is fine.
>
> Thanks!
>
> Romain
>
> Cédric Brun a écrit :
>> We're trying as much as possible to provide something usable outside of
>> Eclipse, just as EMF do. Right now, thanks to the fix of the #195859 bug
>> you should now be able to use it nicely without Eclipse, just have a look
>> on the enclosed Java program, it's working with the CVS version in the
>> R0.7.0maintenance branch.
>>
>> All the Exceptions should be throwed back when compare is used outside of
>> Eclipse.
>>
>> Concerning the "in-memory" objects, the issue is somewhat different. EMF
>> compare now extensively tests eResources to detect changes in resources
>> targeting other models. You're able to create a ResourceImpl without
>> needing any kind of serialization, it helps keeping track of changes and
>> id's. Using EMF resources and putting your in-memory objects inside you
>> should be able to compare them without problems.
>>
>> eResource() is really helpfull to determine the EObject origin and
>> ignoring it could bring to bad delta results and more especially bad
>> merges.
>> Though we can discuss about it, can you tell us about your use case
>> needing
>> that no "Resource" is used?
>>
>> Cédric
>>
>> Romain Raugi wrote:
>>
>>> Hi,
>>>
>>> I tested Compare approximately one month ago (by building the plug-ins
>>> from CVS sources) and two things particularly interested me:
>>>
>>> - It was possible to use the match and diff engine outside of Eclipse.
>>> - In-memory-only objects, with no corresponding resource (created in my
>>> case with Dynamic EMF) were supported.
>>>
>>> I think the first point is a real requirement knowing that EMF can be
>>> used outside of Eclipse. For the second point, I think it contributes to
>>> make Compare more flexible.
>>>
>>> Now with the RC1, I see you introduced some dependencies that makes them
>>> not working anymore.
>>>
>>> - You depend now on EObject.eResource() (in DifferentServices for
>>> example), what implies that objects should be loaded from a resource.
>>>
>>> - The approach you recommended to use it outside of Eclipse doesn't work
>>> anymore, DifferentServices looks now for the EMF Compare plug-in (to
>>> log, to retrieve a search window...).
>>>
>>> Do you plan to do some refactoring to make these points working again?
>>>
>>> Thanks,
>>>
>>> Romain.
>>
Re: [EMF Compare] Standalone run and in-memory-only objects [message #608713 is a reply to message #89209] Thu, 12 July 2007 09:53 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
As the RC1 got these bugs I'll build an RC2 (probably today). Then we'll
wait a few days for new bugs and if no "stopper bugs" are tracked this RC2
will become the final 0.7 release.

Cheers,

Cédric

Andrew Carton wrote:

> Cédric
>
> Yes, thats cool that you fixed those bugs, so we can run standalone!
> Would it be possible to get a mini-release or could you provide a
> timeframe on the next release. I'd love to have a play around with this
> and i'm not familiar how to get at the build in the cvs.
>
> Thanks,
> Andrew
>
>
> Ar 11/07/2007 16:02, Scríobh Romain Raugi:
>> I'm pleased to know that compare still can be used outside of Eclipse.
>>
>> My use case doesn't prevent me from using resources, the reason is only
>> that I don't need them and that I thought it was closely dependent to
>> serialization.
>>
>> What I want to do is to adapt existing models loaded in memory (no EMF)
>> to compare them thanks to your generic engine. For this purpose I'm
>> creating a little adapter with dynamic EMF. I will use ResourceImpls in
>> addition, it is fine.
>>
>> Thanks!
>>
>> Romain
>>
>> Cédric Brun a écrit :
>>> We're trying as much as possible to provide something usable outside of
>>> Eclipse, just as EMF do. Right now, thanks to the fix of the #195859 bug
>>> you should now be able to use it nicely without Eclipse, just have a
>>> look on the enclosed Java program, it's working with the CVS version in
>>> the R0.7.0maintenance branch.
>>>
>>> All the Exceptions should be throwed back when compare is used outside
>>> of Eclipse.
>>>
>>> Concerning the "in-memory" objects, the issue is somewhat different. EMF
>>> compare now extensively tests eResources to detect changes in resources
>>> targeting other models. You're able to create a ResourceImpl without
>>> needing any kind of serialization, it helps keeping track of changes and
>>> id's. Using EMF resources and putting your in-memory objects inside you
>>> should be able to compare them without problems.
>>>
>>> eResource() is really helpfull to determine the EObject origin and
>>> ignoring it could bring to bad delta results and more especially bad
>>> merges.
>>> Though we can discuss about it, can you tell us about your use case
>>> needing
>>> that no "Resource" is used?
>>>
>>> Cédric
>>>
>>> Romain Raugi wrote:
>>>
>>>> Hi,
>>>>
>>>> I tested Compare approximately one month ago (by building the plug-ins
>>>> from CVS sources) and two things particularly interested me:
>>>>
>>>> - It was possible to use the match and diff engine outside of Eclipse.
>>>> - In-memory-only objects, with no corresponding resource (created in my
>>>> case with Dynamic EMF) were supported.
>>>>
>>>> I think the first point is a real requirement knowing that EMF can be
>>>> used outside of Eclipse. For the second point, I think it contributes
>>>> to make Compare more flexible.
>>>>
>>>> Now with the RC1, I see you introduced some dependencies that makes
>>>> them not working anymore.
>>>>
>>>> - You depend now on EObject.eResource() (in DifferentServices for
>>>> example), what implies that objects should be loaded from a resource.
>>>>
>>>> - The approach you recommended to use it outside of Eclipse doesn't
>>>> work anymore, DifferentServices looks now for the EMF Compare plug-in
>>>> (to log, to retrieve a search window...).
>>>>
>>>> Do you plan to do some refactoring to make these points working again?
>>>>
>>>> Thanks,
>>>>
>>>> Romain.
>>>


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Previous Topic:[ Teneo ] SDO class name problem
Next Topic:[EMF Compare] XSLT File
Goto Forum:
  


Current Time: Sun Oct 02 11:19:06 GMT 2022

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

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

Back to the top