Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Suppress attributes for EMF Compare?
Suppress attributes for EMF Compare? [message #517445] Sun, 28 February 2010 03:08 Go to next message
PB  is currently offline PB Friend
Messages: 4
Registered: February 2010
Junior Member
I want to use EMF Compare, but get a lot of noise due to certain attributes I don't want to compare.
Is it possible to suppress attributes during the matching process?



Per
Re: Suppress attributes for EMF Compare? [message #517592 is a reply to message #517445] Mon, 01 March 2010 08:02 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.
--------------080903040605050504020003
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

You'll have to extend the GenericDiffEngine (extension point
org.eclipse.emf.compare.diff.engine) so that its "getAttributesChecker"
method returns your own implementation. In this implementation, you can
ignore whatever attribute bothers you by overriding
"AttributesCheck.shouldBeIgnored(EAttribute)".

Laurent Goubet
Obeo

PB wrote:
> I want to use EMF Compare, but get a lot of noise due to certain
> attributes I don't want to compare.
> Is it possible to suppress attributes during the matching process?
>
>
>
> Per
>


--------------080903040605050504020003
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=
--------------080903040605050504020003--
Re: Suppress attributes for EMF Compare? [message #518802 is a reply to message #517592] Fri, 05 March 2010 04:26 Go to previous messageGo to next message
PB  is currently offline PB Friend
Messages: 4
Registered: February 2010
Junior Member
Thanks!

I created my subclass like this:

public class MyDiffEngine extends
org.eclipse.emf.compare.diff.engine.GenericDiffEngine implements IDiffEngine {


I added it to the extension 'org.eclipse.emf.compare.diff.engine'

However running a compare does not use my class (I have print statements in it).


Per






Re: Suppress attributes for EMF Compare? [message #518835 is a reply to message #518802] Fri, 05 March 2010 09:07 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.
--------------030108030403040205050605
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

There could be a number of reasons why your engine is not called :
1) you registered it against the wrong extension / namespace
2) you registered it against ecore with "lowest" priority (same as the
generic engine), thus the generic engine is called instead

You can work around 2) by either setting an higher priority or ticking
the option "Comparison engine selection" on the EMF Compare preference
page. If you're not calling EMF Compare from the Eclipse GUI, you'll
have to programatically set your own IMatchEngineSelector through
MatchService#setMatchEngineSelector() and IDiffEngineSelector through
DiffService#setDiffEngineSelector() so that they return your engines.

Laurent Goubet
Obeo

PB wrote:
> Thanks!
>
> I created my subclass like this:
>
> public class MyDiffEngine extends
> org.eclipse.emf.compare.diff.engine.GenericDiffEngine implements
> IDiffEngine {
>
>
> I added it to the extension 'org.eclipse.emf.compare.diff.engine'
>
> However running a compare does not use my class (I have print statements
> in it).
>
>
> Per
>
>
>
>
>
>
>


--------------030108030403040205050605
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=
--------------030108030403040205050605--
Re: Suppress attributes for EMF Compare? [message #622272 is a reply to message #518802] Fri, 05 March 2010 09:07 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.
--------------030108030403040205050605
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

There could be a number of reasons why your engine is not called :
1) you registered it against the wrong extension / namespace
2) you registered it against ecore with "lowest" priority (same as the
generic engine), thus the generic engine is called instead

You can work around 2) by either setting an higher priority or ticking
the option "Comparison engine selection" on the EMF Compare preference
page. If you're not calling EMF Compare from the Eclipse GUI, you'll
have to programatically set your own IMatchEngineSelector through
MatchService#setMatchEngineSelector() and IDiffEngineSelector through
DiffService#setDiffEngineSelector() so that they return your engines.

Laurent Goubet
Obeo

PB wrote:
> Thanks!
>
> I created my subclass like this:
>
> public class MyDiffEngine extends
> org.eclipse.emf.compare.diff.engine.GenericDiffEngine implements
> IDiffEngine {
>
>
> I added it to the extension 'org.eclipse.emf.compare.diff.engine'
>
> However running a compare does not use my class (I have print statements
> in it).
>
>
> Per
>
>
>
>
>
>
>


--------------030108030403040205050605
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=
--------------030108030403040205050605--
Previous Topic:Suppress attributes for EMF Compare?
Next Topic:Re: XText: cant find main class org.eclipse.emf.mwe.core.WorkflowRunner
Goto Forum:
  


Current Time: Thu Sep 19 22:02:41 GMT 2024

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

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

Back to the top