|
Re: Suppress attributes for EMF Compare? [message #517592 is a reply to message #517445] |
Mon, 01 March 2010 08:02 |
|
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 #518835 is a reply to message #518802] |
Fri, 05 March 2010 09:07 |
|
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 |
|
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--
|
|
|
Powered by
FUDForum. Page generated in 0.03975 seconds