|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.team.core.mapping.ResourceMappingMerger
org.eclipse.ltk.ui.refactoring.model.AbstractResourceMappingMerger
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.
IResourceMappingMerger
Constructor Summary | |
---|---|
protected |
AbstractResourceMappingMerger(ModelProvider provider)
Creates a new abstract refactoring model merger. |
Method Summary | |
---|---|
protected IStatus |
aboutToPerformMerge(IMergeContext context,
IProgressMonitor monitor)
Hook method which is called before the actual merge process happens. |
protected abstract IProject[] |
getDependencies(IProject[] projects)
Returns the dependent projects of the projects associated with the incoming refactorings. |
protected ModelProvider |
getModelProvider()
Return the model provider associated with this merger. |
IStatus |
merge(IMergeContext context,
IProgressMonitor monitor)
A default implementation of merge that attempts to merge all the mappings in the context. |
protected IStatus |
mergePerformed(IMergeContext context,
IProgressMonitor monitor)
Hook method which is called after the actual merge process happened. |
Methods inherited from class org.eclipse.team.core.mapping.ResourceMappingMerger |
---|
getMergeRule, validateMerge |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected AbstractResourceMappingMerger(ModelProvider provider)
provider
- the model providerMethod Detail |
protected IStatus aboutToPerformMerge(IMergeContext context, IProgressMonitor monitor)
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 contextmonitor
- the progress monitor to use
protected abstract IProject[] getDependencies(IProject[] projects)
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.
protected final ModelProvider getModelProvider()
getModelProvider
in class ResourceMappingMerger
public IStatus merge(IMergeContext context, IProgressMonitor monitor) throws CoreException
merge
in interface IResourceMappingMerger
merge
in class ResourceMappingMerger
context
- the contextmonitor
- a progress monitor
CoreException
- if an error occurredIResourceMappingMerger.merge(org.eclipse.team.core.mapping.IMergeContext, org.eclipse.core.runtime.IProgressMonitor)
protected IStatus mergePerformed(IMergeContext context, IProgressMonitor monitor)
merge(IMergeContext, IProgressMonitor)
returns a status with severity less than IStatus.ERROR
and a
status code unequal to IMergeStatus.CONFLICTS
or
IMergeStatus.INTERNAL_ERROR
.
Subclasses may extend this method to perform any special processing. The default implementation does nothing.
context
- the merge contextmonitor
- the progress monitor to use
|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.