Hello. I need to override the behaviour of the model resolver on EMF Compare 3.3.7, but apparently it is impossible! Can anyone point out how/if it can be done?
There is an extension point "org.eclipse.emf.compare.ide.ui.modelResolvers" and it is used to register the default ThreadedModelResolver (org.eclipse.emf.compare.ide.ui.internal.logical.resolver.ThreadedModelResolver).
The problem is that when I try to provide my own model resolver, its registration fails in 'org.eclipse.emf.compare.rcp.EMFCompareRCPPlugin.register(IGraphConsumer)' (below), throwing an exception because the resolver's id has already been registered (the default one). The problem is that I cannot change that id in my resolver (ResourceUIUtil.RESOURCES_GRAPH_ID) because it is hardcoded in org.eclipse.emf.compare.rcp.ui.internal.util.ResourceUIUtil.getResourcesURIGraph() which is used extensively throughout EMF Compare!!!
public void register(IGraphConsumer consumer) {
consumer.setGraph(new Graph<URI>());
String id = consumer.getId();
if (graphsById.containsKey(id)) {
throw new IllegalArgumentException(EMFCompareRCPMessages.getString("duplicate.graph.id.msg", id)); //$NON-NLS-1$
}
graphsById.put(id, consumer.getGraphView());
}
So how on earth can one override the model resolver?
Thanks