Class AbstractResourceMappingMerger

  • All Implemented Interfaces:

    public abstract class AbstractResourceMappingMerger
    extends ResourceMappingMerger
    Partial implementation of a refactoring-aware resource mapping merger.

    This class provides support to determine pending refactorings during model merging and model update, and displays a refactoring wizard to apply the refactorings to the local workspace.

    Note: this class is designed to be extended by clients. Programming language implementers which need a refactoring-aware resource mapping merger to associated with their model provider may extend this class to implement language-specific project dependency rules.

    See Also:
    • Constructor Detail

      • AbstractResourceMappingMerger

        protected AbstractResourceMappingMerger​(ModelProvider provider)
        Creates a new abstract refactoring model merger.
        provider - the model provider
    • Method Detail

      • aboutToPerformMerge

        protected IStatus aboutToPerformMerge​(IMergeContext context,
                                              IProgressMonitor monitor)
        Hook method which is called before the actual merge process happens.

        Subclasses may extend this method to perform any special processing. The default implementation checks whether there are any pending refactorings in the merge context and displays a refactoring wizard to let the user perform the pending refactorings before merge.

        Returning a status of severity IStatus.ERROR will terminate the merge process.

        context - the merge context
        monitor - the progress monitor to use
        a status describing the outcome of the operation
      • getDependencies

        protected abstract IProject[] getDependencies​(IProject[] projects)
        Returns the dependent projects of the projects associated with the incoming refactorings.

        Subclasses must implement this method to return the dependent projects according to the semantics of the associated programming language. The result of this method is used to decide whether the resource mapping merger should execute the incoming refactorings in order to fix up references in dependent projects.

        projects - the projects associated with the incoming refactorings in the synchronization scope.
        the dependent projects, or an empty array