|
Re: [Compare] Set the OPTION_IGNORE_ID upon startup? [message #128771 is a reply to message #128757] |
Tue, 19 August 2008 10:07 |
|
This is a multi-part message in MIME format.
--------------020104090201020404070601
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Hi Henrik,
I have never tried something like this, and know I haven't implemented
anything of the sort :).
You can try something like :
EMFCompareUIPlugin.getDefault().getPluginPreferences().setVa lue(EMFComparePreferenceKeys.PREFERENCE_KEY_IGNORE_ID,
true);
But I do not know if this can work since the "default" value for this
preference is set to false by EMF Compare.
Regards,
Laurent Goubet
obeo
Henrik J
|
|
|
|
Re: [Compare] Set the OPTION_IGNORE_ID upon startup? [message #128792 is a reply to message #128784] |
Tue, 19 August 2008 12:22 |
|
This is a multi-part message in MIME format.
--------------090908070206090906020200
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
No, providing an extension point to set _default_ values seems overkill.
What exactly is the need behind this? I could change the
GenericMatchEngine to allow preferences overriding if this could solve
the issue.
Laurent Goubet
Obeo
Henrik J
|
|
|
|
Re: [Compare] Set the OPTION_IGNORE_ID upon startup? [message #128818 is a reply to message #128805] |
Tue, 19 August 2008 13:25 |
|
This is a multi-part message in MIME format.
--------------050602010303070807060906
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
henrik,
Could you raise a bugzilla entry for this preference issue? It will
require an API change and won't find its way into the 0.8 version. ATM,
a workaround would be to define your own match engine (extension point
org.eclipse.emf.compare.match.engine) for the file extensions you need
(or * with priority set higher than "lowest" if you need this for all
comparisons) and override the option map :
public class SpecificMatchEngine extends GenericMatchEngine {
public MatchModel resourceMatch(Resource leftResource, Resource
rightResource, Map<String, Object> optionMap) throws InterruptedException {
optionMap.put(EMFComparePreferenceKeys.PREFERENCE_KEY_IGNORE _ID, true);
super.resourceMatch(leftResource, rightResource, optionMap);
}
public MatchModel resourceMatch(Resource leftResource, Resource
rightResource, Resource ancestorResource, Map<String, Object> optionMap)
throws InterruptedException {
optionMap.put(EMFComparePreferenceKeys.PREFERENCE_KEY_IGNORE _ID, true);
super.resourceMatch(leftResource, rightResource, ancestorResource,
optionMap);
}
}
Regards,
Laurent Goubet
Obeo
Henrik J
|
|
|
Re: [Compare] Set the OPTION_IGNORE_ID upon startup? [message #620239 is a reply to message #128757] |
Tue, 19 August 2008 10:07 |
|
This is a multi-part message in MIME format.
--------------020104090201020404070601
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Hi Henrik,
I have never tried something like this, and know I haven't implemented
anything of the sort :).
You can try something like :
EMFCompareUIPlugin.getDefault().getPluginPreferences().setVa lue(EMFComparePreferenceKeys.PREFERENCE_KEY_IGNORE_ID,
true);
But I do not know if this can work since the "default" value for this
preference is set to false by EMF Compare.
Regards,
Laurent Goubet
obeo
Henrik J
|
|
|
|
Re: [Compare] Set the OPTION_IGNORE_ID upon startup? [message #620241 is a reply to message #128784] |
Tue, 19 August 2008 12:22 |
|
This is a multi-part message in MIME format.
--------------090908070206090906020200
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
No, providing an extension point to set _default_ values seems overkill.
What exactly is the need behind this? I could change the
GenericMatchEngine to allow preferences overriding if this could solve
the issue.
Laurent Goubet
Obeo
Henrik J
|
|
|
|
Re: [Compare] Set the OPTION_IGNORE_ID upon startup? [message #620243 is a reply to message #128805] |
Tue, 19 August 2008 13:25 |
|
This is a multi-part message in MIME format.
--------------050602010303070807060906
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
henrik,
Could you raise a bugzilla entry for this preference issue? It will
require an API change and won't find its way into the 0.8 version. ATM,
a workaround would be to define your own match engine (extension point
org.eclipse.emf.compare.match.engine) for the file extensions you need
(or * with priority set higher than "lowest" if you need this for all
comparisons) and override the option map :
public class SpecificMatchEngine extends GenericMatchEngine {
public MatchModel resourceMatch(Resource leftResource, Resource
rightResource, Map<String, Object> optionMap) throws InterruptedException {
optionMap.put(EMFComparePreferenceKeys.PREFERENCE_KEY_IGNORE _ID, true);
super.resourceMatch(leftResource, rightResource, optionMap);
}
public MatchModel resourceMatch(Resource leftResource, Resource
rightResource, Resource ancestorResource, Map<String, Object> optionMap)
throws InterruptedException {
optionMap.put(EMFComparePreferenceKeys.PREFERENCE_KEY_IGNORE _ID, true);
super.resourceMatch(leftResource, rightResource, ancestorResource,
optionMap);
}
}
Regards,
Laurent Goubet
Obeo
Henrik J
|
|
|
Powered by
FUDForum. Page generated in 0.04575 seconds