Skip to main content



      Home
Home » Modeling » Compare » Disable model resolver for certain file type(Avoid unnecessary loading of resources, if model is completely contained in one file)
Disable model resolver for certain file type [message #1779733] Thu, 11 January 2018 16:48 Go to next message
Eclipse UserFriend
Hey guys,

is there an easy way to disable the model resolver for a certain filetype? My model is self-contained in one file, so it is not necessary to load all sibling files of the same type to build up a dependency tree.

I know that the resolution can be globally disabled via a workspace setting, but it would be nice, if I could tell emf compare as a developer that my model does not have external dependencies.

If I see it correctly, one possible approach would be:

1. Register own model resolver extending ThreadedModelResolver (which is not recommended)
2. Extend DefaultResolutionContext with custom ResourceDependencyLocalResolver
3. Override getResolutionStartingPoint and return the file itself, if I encounter a file with my file extension

Is there an easier way to do that?

Thanks
Janik
Re: Disable model resolver for certain file type [message #1779975 is a reply to message #1779733] Tue, 16 January 2018 04:40 Go to previous messageGo to next message
Eclipse UserFriend
Hello Janik,

If you're using EMF Compare programmatically, you can manually set the resolution scope preference to "SELF" :
final IPreferenceStore store = EMFCompareIDEUIPlugin.getDefault().getPreferenceStore();
store.setValue(EMFCompareUIPreferences.RESOLUTION_SCOPE_PREFERENCE, CrossReferenceResolutionScope.SELF.toString());


Since this will globally affect the preferences, you might want to store the previous value of the preference and reset it after your comparison.

If you're not using EMF Compare programmatically, you will indeed have to override the model resolver since we didn't provide a mean to disable it on a model-per-model basis.

Laurent Goubet
Obeo
Re: Disable model resolver for certain file type [message #1781359 is a reply to message #1779975] Tue, 06 February 2018 07:14 Go to previous message
Eclipse UserFriend
Hey Laurent,

thanks for the answer and sorry for the late response. I decided to postpone a solution for this problem, as in our case a project typically only contains one model. Just in my manual test setup with many different models in one project it appeared as some performance issue. If it is possible, the resolution of side-band files could be triggered lazier (only if needed) in future.

Thanks
Previous Topic:EMF compare does not work?
Next Topic:Performance of EMF compare
Goto Forum:
  


Current Time: Sun Aug 31 01:03:17 EDT 2025

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

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

Back to the top