Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » Model Resolving step(This step is not accessible programmatically)
Model Resolving step [message #1698967] Fri, 19 June 2015 08:25 Go to next message
Gabriel Pascual is currently offline Gabriel PascualFriend
Messages: 31
Registered: April 2013
Location: Laval, France

I would access to step of Model Resolving [1] programmatically but, after reading the documentation, the only thing I can do is to extend the normal behaviour with both extension points.

For example before run a comparison, I would launch the Model Resolving step which uses IModelResolver and IResourceDependencyProvider
and other interesting classes but all is in internal scope. Otherwise, this step could be interesting to detect which are resources might be impacted by the next action.

I saw also that in RCP EMF Compare plugin, several registry(DiffEngine, PostProcessor, ....) are accessible.
In the same way, it would be interesting to access to step of Model Resolving.




Software Development Engineer
Re: Model Resolving step [message #1699284 is a reply to message #1698967] Tue, 23 June 2015 08:51 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1898
Registered: July 2009
Senior Member
Hi Gabriel,

The model resolving has internal details that we do not plan on making public API, but you should still be able to access this step programmatically from the facades available.

If you have a model file as a starting point, you might want to start from platform :

final IModelProviderDescriptor[] descriptors = ModelProvider.getModelProviderDescriptors();
ModelProvider modelProvider = null;
for (IModelProviderDescriptor desc : descriptors) {
    if ("".equals(desc.getId())) {
        modelProvider = desc;
ResourceMapping[] mappings = desc.getMappings(file, ResourceMappingContext.LOCAL_CONTEXT, new NullProgressMonitor());

Since this will give you the "emf" model provider (ours), the "mappings" array will contain a single EMFResourceMapping. call "getTraversals" on that for the list of files related to the one you gave as input.

You could also simply rely on EMF Compare to build your scope for you.... And writing this answer, I now understand what you mean, there are no API ways to create default instances of our IModelResolver and IModelMinimizer subclasses needed by the ComparisonScopeBuilder. Please open an enhancement request against EMF Compare for this on the bugzilla

Laurent Goubet

[Updated on: Tue, 23 June 2015 08:52]

Report message to a moderator

Re: Model Resolving step [message #1699659 is a reply to message #1699284] Thu, 25 June 2015 15:21 Go to previous message
Gabriel Pascual is currently offline Gabriel PascualFriend
Messages: 31
Registered: April 2013
Location: Laval, France
Hi Laurent,

Thanks for your help, I created the bug.

Indeed, if I combine your solution to access to IModelResolver and the extension point, I will be able to use my implementation of IModelResolver.
In fact, I needed to replace EMF Compare Scope (Workspace, Project, ...) by mine. To succeed, I had to override different internal implementations (ThreadedModelResolver, ResourceDependencyResolver and DefaultResolutionContext).



Software Development Engineer
Previous Topic:Print Structural differences to Console
Next Topic:Problems with the Diff-Feature
Goto Forum:

Current Time: Mon Jul 04 10:29:14 GMT 2022

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

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

Back to the top