public class EmfMergeManager
extends AbstractMergeManager
Modifier and Type | Class and Description |
---|---|
static interface |
EmfMergeManager.ChangeChangeConflictAcceptCommandValue
Extra interface for getChangeChangeConflictAcceptCommand().
|
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
_conflicts
List of conflicts in the merge session
|
protected DeltaResolver |
_deltaResolver
Delta Resolver
|
protected com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher |
_matcher
Matcher used by the merge manager.
|
protected DeltaContainer |
_newerDeltaContainer
Delta container used to contain deltas generated from base and right
contributor
|
protected DeltaContainer |
_olderDeltaContainer
Delta container used to contain deltas generated from base and right
contributor
|
protected int |
_sessionId
ID used to uniquely identify a merge session from the others.
|
protected boolean |
_sessionOpen
Tracks whether there is an open merge session
|
protected IContributorProvider |
contributorProvider |
protected org.eclipse.emf.ecore.xmi.XMLParserPool |
defaultXMLParserPool |
protected static java.lang.String |
EMF_CONTENT_TYPE_ID
EMF content type id
|
protected org.eclipse.emf.common.util.URI |
savedNewerResourceURI |
Constructor and Description |
---|
EmfMergeManager()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Called when the compare/merge session is about to be disposed.
|
protected void |
collectKeepMatchingIds(java.util.List deltas,
java.util.Set<java.lang.String> keepMatchingIds) |
protected boolean |
conflictingResourceNameCheck() |
protected ClosureUtils.IClosureIOHelper |
createClosureIOHelper(org.eclipse.emf.common.util.URI resourceUri,
IInputOutputDescriptor descriptor)
Factory method that should create object which can load closure into logic resource
|
protected IClosureURIConverterExtension |
createClosureURIConverterExtension(org.eclipse.emf.common.util.URI resourceUri,
IInputOutputDescriptor desc)
Factory method that should create helper method for URI converter to handle closure case
|
protected ConflictAnalyzer |
createConflictAnalyzer()
Creates a new instance of the Conflict Analyzer.
|
protected DeltaGenerator |
createDeltaGenerator()
Creates a new instance of the Delta Generator.
|
protected DeltaResolver |
createDeltaResolver()
Creates a new instance of the Delta Resolver.
|
protected IDeltaTreeGrouper |
createDeltaTreeGrouper(java.lang.String deltaTreeBuilderID) |
protected com.ibm.xtools.comparemerge.emf.internal.logicalmodel.ILogicalModelChangeSet |
createLogicalModelMergeChangeSet()
Creates the Logical model change set that is controlling the fragment loading
|
protected com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher |
createMatcher()
Creates a new instance of the Matcher.
|
protected org.eclipse.emf.ecore.resource.Resource |
createResource(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.common.util.URI resourceUri)
Create resource for the compare/merge session.
|
protected org.eclipse.emf.ecore.resource.ResourceSet |
createResourceSet()
Creates a new instance of the ResourceSet to be used when loading models in
memory.
|
protected org.eclipse.emf.ecore.resource.URIConverter |
createURIConverter(org.eclipse.emf.common.util.URI resourceUri,
IInputOutputDescriptor desc,
boolean disableModelRefResolution,
boolean disableSubUnitRefResolution)
Factory method which create URI converter
|
protected void |
disposeResource(org.eclipse.emf.ecore.resource.Resource resource) |
protected void |
disposeResources()
Clean-up everything.
|
protected void |
enterErrorMode()
Enters the "Error mode" in case of major error in doMerge()/doCompare().
|
java.lang.Object |
executeRunnable(IMergeManagerRunnable runnable)
A function used to perform some generic operation in a model-specific way.
|
protected java.lang.String |
extractErrorMessage(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.Exception ex,
IInputOutputDescriptor desc)
Will extract the error message generated when loading the EMF Resource.
|
protected com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher |
findNameMatcher()
Finds matcher that can look-up EObjects in the EMF Resource by their name and
the full path from the root of the resource (URI Fragment).
|
protected com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher |
findUUIDMatcher()
Finds matcher that can look-up EObjects in the EMF Resource by its UUID.
|
protected DeltaContainer |
generateDeltas(IInputOutputDescriptor base,
org.eclipse.emf.ecore.resource.Resource baseResource,
IInputOutputDescriptor contrib,
org.eclipse.emf.ecore.resource.Resource contribResource)
Creates and runs the delta generator to produce the deltas between the base
and a given contributor
|
org.eclipse.emf.common.command.Command |
getAcceptCommand(Delta delta)
Returns an accept command for the given delta
|
org.eclipse.emf.common.command.Command |
getAcceptDeltasCommand(java.util.List deltas)
Returns the fuse accept deltas command
|
org.eclipse.emf.common.command.Command |
getAcceptMergedValueCommand(Delta delta,
java.lang.Object mergedValue)
Creates accept command for add add conflict delta with the given merged value
|
org.eclipse.emf.ecore.resource.Resource |
getAncestorResource()
Retrieves the Resouce for the Left contributor, or null
|
org.eclipse.emf.ecore.resource.Resource |
getBaseResource()
Will retrieve the resource that is base resource all deltas generated
against.
|
int |
getCalculatedBaseIndex(Location location,
Delta delta)
Return an index for a location of a delta calculated to the base resource.
|
int |
getCalculatedContributorIndex(Location location,
Delta delta,
org.eclipse.emf.ecore.resource.Resource contributor)
Return an index for a location of a delta calculated to the merged resource.
|
int |
getCalculatedMergedIndex(Location location,
Delta delta)
Return an index for a location of a delta calculated to the merged resource.
|
int |
getCalculatedResourceIndex(org.eclipse.emf.ecore.resource.Resource resource,
Location location,
Delta delta)
Return an index for a location of a delta calculated for a given resource
which can be either Base, one of Contributors or Merged.
|
org.eclipse.emf.common.command.Command |
getChangeChangeConflictAcceptCommand(Conflict conflict,
java.lang.Object v)
Returns an accept command for the change-change conflict
|
org.eclipse.emf.common.command.Command |
getChangeChangeConflictRejectCommand(Conflict conflict)
Returns a reject command for the change-change conflict
|
org.eclipse.emf.common.command.Command |
getChangeChangeConflictResetCommand(Conflict conflict)
This commands reset resolution for change-change conflicts
|
org.eclipse.emf.common.command.Command |
getClearSubsessionResultsCommand(ChangeDelta delta) |
Delta |
getConflictDelta(Conflict conflict,
ContributorType contributor)
Finds a conflicting delta from the requested contributor
|
Delta |
getConflictResolutionDelta(Conflict conflict)
Determines the Delta that was accepted to resolve the conflict
|
java.util.List |
getConflicts()
Returns a list of conflicts generated by the session.
|
java.lang.String |
getContentTypeID()
Returns the content type ID for this session
|
org.eclipse.emf.ecore.resource.Resource[] |
getContributors()
Retrieves references to the contributor resouces of this merge session.
|
org.eclipse.emf.common.command.Command |
getDecrementCommand(ChangeDelta changeDelta)
Instantiate and return a command , which will remove delta increment and
re-apply delta state (if accepted) Typicaly done to erase results of merge
subsession.
|
protected IDeltaTreeBuilder[] |
getDefaultDeltaTreeBuilders() |
protected IDeltaTreeFilter[] |
getDefaultDeltaTreeFilters() |
java.lang.String |
getDefaultDeltaTreeSorter() |
protected IDeltaTreeSorter[] |
getDefaultDeltaTreeSorters() |
DeltaContainer |
getDeltaContainer(org.eclipse.emf.ecore.resource.Resource contributor)
Returns a delta container generated by the session for a particular
contributor.
|
DeltaContainer[] |
getDeltaContainers()
Retrieves all the deltaContainers related to this merge session.
|
ContributorType |
getDeltaContributor(Delta delta)
Determine the Contributor that caused the requested delta
|
Delta |
getDeltaForContributor(Conflict conflict,
ContributorType contributor)
Will retrieve the conflicting Delta caused by a given Contributor.
|
java.util.List |
getDeltas(org.eclipse.emf.ecore.resource.Resource contributor)
Returns a list of deltas generated by the session for a particular
contributor.
|
IDeltaTreeBuilder[] |
getDeltaTreeBuilders(org.eclipse.core.runtime.content.IContentType contentType) |
IDeltaTreeFilter[] |
getDeltaTreeFilters(org.eclipse.core.runtime.content.IContentType contentType) |
IDeltaTreeSorter[] |
getDeltaTreeSorters(org.eclipse.core.runtime.content.IContentType contentType) |
java.util.Collection |
getDependentDeltas(Delta delta,
org.eclipse.emf.ecore.resource.Resource contributor,
boolean accept)
Returns collectionf of other deltas in a given contributor that would also be
accepted or rejected together with the given delta.
|
protected static java.lang.String |
getDescriptorAbsolutePath(IInputOutputDescriptor desc)
Gets an absolute file path for the descriptor, if this is possible.
|
protected static java.lang.String |
getDescriptorPlatformPath(IInputOutputDescriptor desc)
Will generate workspace-relative ("platform") path for a given descriptor or
return null if the descriptor is stream-based or located outside of the
workspace
|
protected static org.eclipse.core.resources.IFile |
getFileInWorkspace(java.lang.String absolutePath)
Will find an IFile reative to the current workspace, or NULL if it is located
elsewhere, such as in the TMP directory
|
org.eclipse.emf.common.command.Command |
getIncrementCommand(ChangeDelta changeDelta,
java.lang.Object newValue)
Instantiate and return a command , which will create delta increment and
re-apply delta state (if accepted) Typicaly done to store results of merge
subsession.
|
protected java.io.InputStream |
getInputStream(IInputOutputDescriptor descriptor) |
org.eclipse.emf.ecore.resource.Resource |
getLeftResource()
Retrieves the Resouce for the Left contributor
|
protected java.util.Map |
getLoadOptions()
Get the load options required to load a resource.
|
com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher |
getMatcher()
Retrieves reference to the matcher that is used to identify (match) EMF
objects by their IDS in the EMF resource.
|
org.eclipse.emf.ecore.resource.Resource |
getMergedResource()
Retrieves the Resouce for the Merged contributor, or null
|
java.lang.String |
getMultilineText(java.lang.Object deltaObject) |
java.util.Set |
getNonconflictingDeltas(org.eclipse.emf.ecore.resource.Resource contributor)
Retrieves all the non conflicting deltas associated with the given
contributor
|
java.util.List<PseudoConflict> |
getPseudoConflicts(Delta delta) |
org.eclipse.emf.common.command.Command |
getRejectCommand(Delta delta)
Returns a reject command for the given delta.
|
org.eclipse.emf.common.command.Command |
getResolveDeltasCommand(java.util.List deltas,
ResolutionType resolution) |
org.eclipse.emf.ecore.resource.Resource |
getResource(ContributorType contributor)
Retrieves the Resouce for the requested contributor.
|
ContributorType |
getResourceContributor(org.eclipse.emf.ecore.resource.Resource resource)
Determine the Contributor for a requested resource
|
protected java.util.Set |
getResourceProxies(org.eclipse.emf.ecore.resource.Resource resource) |
java.util.List |
getResources()
Retrieves references to the contributor resouces of this merge session.
|
org.eclipse.emf.ecore.resource.Resource |
getRightResource()
Retrieves the Resouce for the Right contributor
|
protected java.util.Map |
getSaveOptions() |
protected void |
getTargetAffectedResources(java.util.List deltas,
java.util.Set affectedResources)
This is a funciton used in fuse session mainly for validateEdit.
|
org.eclipse.emf.common.command.Command |
getUnresolveCommand(Conflict c,
java.util.List<?> src) |
int |
getUnresolvedConflictCount()
Retrieves the total number of unresolved conflicts in the merge session
|
int |
getUnresolvedDeltaCount()
Retrieves the total number of unresolved deltas in the merge session
|
protected org.eclipse.emf.ecore.xmi.XMLParserPool |
getXMLParserPool() |
void |
init(MergeSessionInfo sessionInfo)
Overrides init() to initialise variable
_resourceSet with
default implementation of the ResourceSet which is EMF's
ResourceSetImpl() . |
protected void |
initDeltaResolver(DeltaResolver deltaResolver) |
boolean |
isClosureMode() |
static boolean |
isClosureRoot(IInputOutputDescriptor descriptor)
Returns true if descriptor describes closure root
|
boolean |
isEmptySession()
Determines if the C/M session has no differences/conflicts
|
boolean |
isMergeCompleted()
Determines whether merge operation has been completed.
|
boolean |
isMyFileMustBeMergeByMeInEclipseOnly() |
protected boolean |
isSparseModeEnabled()
Check if sparse mode enabled
|
boolean |
isTextChangeConflict(Conflict conflict) |
protected boolean |
needDispose(ContributorType contributor,
org.eclipse.emf.ecore.resource.Resource resource,
IInputOutputDescriptor descriptor)
Determines if this resource is to be un-loaded when merge manager is closed.
|
protected org.eclipse.emf.ecore.resource.Resource |
openMemoryResource(IInputOutputDescriptor desc) |
protected org.eclipse.emf.ecore.resource.Resource |
openResource(java.lang.String fileType,
org.eclipse.emf.common.util.URI resourceUri,
IInputOutputDescriptor desc)
Opens a new EMF Resource for a given IInputOutputDescriptor.
|
protected void |
preExecuteRunnable(IMergeManagerRunnable runnable)
This method should always be called before executeRunnable method is called.
|
protected void |
prepareResourceURIs()
Generates _ancestorUri, _olderUri, _newerUri and _principalUri.
|
protected MergeStatusType |
prepareSession()
A hook used to tune the Compare/Merge Session before it is run.
|
protected void |
pullTogetherResource(org.eclipse.emf.ecore.resource.Resource resource) |
void |
run(org.eclipse.core.runtime.IProgressMonitor monitor)
Perform the actual Compare or Merge.
|
void |
runDeltaGenerators()
Executed the delta generators and, if needed, the conflict analyzer.
|
void |
runDeltaGenerators(org.eclipse.core.runtime.IProgressMonitor monitor) |
protected void |
runSession(org.eclipse.core.runtime.IProgressMonitor monitor)
Runs all back-end components to detect all Deltas, Conflicts etc.
|
boolean |
saveMergedContributorAs(IInputOutputDescriptor output)
During the merge session will save the merge result into mergedOutput
IInputOutputDescriptor.
|
void |
saveMergedContributorCopy(java.lang.String toPath)
During the merge session will save a copy of the merge result to a specified
file path.
|
void |
saveMergedContributorCopy(java.lang.String toPath,
java.lang.String rootModelName) |
void |
setContentType(org.eclipse.core.runtime.content.IContentType contentType) |
void |
setMergedResource(org.eclipse.emf.ecore.resource.Resource resource) |
void |
setResourceModifier(ResourceModifier modifier)
Sets a Model Modifier - a facility used by the Delta Resolver to resolve the
Deltas, in particular ADD and DELETE.
To be set before the run() is called (i.e. |
protected void |
setURIConverter(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.ecore.resource.URIConverter converter) |
java.util.List |
sortDeltasByContributor(java.util.List deltas)
Will create a new list containing all Deltas organized by therir
contributors: Left is first, Right is second.
|
boolean |
useReflectiveTypesAndNames()
Checks if the reflective types and names should be used for rendering
descriptions and labels
|
protected static boolean |
validateSaveTarget(java.io.File f) |
protected static final java.lang.String EMF_CONTENT_TYPE_ID
protected boolean _sessionOpen
protected com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher _matcher
protected DeltaContainer _olderDeltaContainer
protected DeltaContainer _newerDeltaContainer
protected java.util.List _conflicts
protected DeltaResolver _deltaResolver
protected int _sessionId
protected org.eclipse.emf.common.util.URI savedNewerResourceURI
protected org.eclipse.emf.ecore.xmi.XMLParserPool defaultXMLParserPool
protected final IContributorProvider contributorProvider
public EmfMergeManager()
public void init(MergeSessionInfo sessionInfo)
_resourceSet
with
default implementation of the ResourceSet
which is EMF's
ResourceSetImpl()
. Can be overridden to provide custom
ResourceSet
.com.ibm.xtools.comparemerge.core.controller.AbstractMergeManager#init(com.ibm.xtools.comparemerge.core.utils.MergeSessionInfo)
public void setResourceModifier(ResourceModifier modifier)
DeltaResolver
is created).modifier
- to be used or null
if none to use.null
protected boolean conflictingResourceNameCheck()
public void run(org.eclipse.core.runtime.IProgressMonitor monitor)
IRunnableWithProgress.run(org.eclipse.core.runtime.IProgressMonitor)
protected void pullTogetherResource(org.eclipse.emf.ecore.resource.Resource resource)
protected void runSession(org.eclipse.core.runtime.IProgressMonitor monitor) throws java.lang.Exception
java.lang.Exception
- in case of errors in the BE. Can be OutOfMemory error,
runtime exceptions from EMF layer etc.public void runDeltaGenerators()
public void runDeltaGenerators(org.eclipse.core.runtime.IProgressMonitor monitor)
protected void collectKeepMatchingIds(java.util.List deltas, java.util.Set<java.lang.String> keepMatchingIds)
protected final DeltaContainer generateDeltas(IInputOutputDescriptor base, org.eclipse.emf.ecore.resource.Resource baseResource, IInputOutputDescriptor contrib, org.eclipse.emf.ecore.resource.Resource contribResource)
protected com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher createMatcher()
In case of FUSIN scenario will try to find a "Name" matcher, otherwise will try to find an UUID matcher.
protected com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher findUUIDMatcher()
URIFragmentMatcher
.protected com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher findNameMatcher()
URIFragmentMatcher
.protected DeltaGenerator createDeltaGenerator()
protected DeltaResolver createDeltaResolver()
protected void initDeltaResolver(DeltaResolver deltaResolver)
protected ConflictAnalyzer createConflictAnalyzer()
protected void disposeResources()
protected void disposeResource(org.eclipse.emf.ecore.resource.Resource resource)
protected boolean needDispose(ContributorType contributor, org.eclipse.emf.ecore.resource.Resource resource, IInputOutputDescriptor descriptor)
protected MergeStatusType prepareSession()
protected void prepareResourceURIs()
protected static org.eclipse.core.resources.IFile getFileInWorkspace(java.lang.String absolutePath)
absolutePath
- to find the file forprotected org.eclipse.emf.ecore.resource.Resource openMemoryResource(IInputOutputDescriptor desc)
protected org.eclipse.emf.ecore.resource.Resource openResource(java.lang.String fileType, org.eclipse.emf.common.util.URI resourceUri, IInputOutputDescriptor desc) throws java.lang.Exception
fileType
- of the EMF resource to be opened. Can be different from
the actual file extension (when merging from ClearCase).resourceUri
- the URI fot the resource being created. The URI must be
UNIQUE within the session. Its file name and extension are
very important and used by the EMF engine to locate a
proper Resource Factory to handle the model type.desc
- for which to open a resource. Holds a file path as String
or IStreamContentAccessorjava.io.IOException
java.lang.Exception
protected boolean isSparseModeEnabled()
protected java.util.Set getResourceProxies(org.eclipse.emf.ecore.resource.Resource resource)
protected org.eclipse.emf.ecore.resource.URIConverter createURIConverter(org.eclipse.emf.common.util.URI resourceUri, IInputOutputDescriptor desc, boolean disableModelRefResolution, boolean disableSubUnitRefResolution)
resourceUri
- desc
- disableModelRefResolution
- disableSubUnitRefResolution
- protected IClosureURIConverterExtension createClosureURIConverterExtension(org.eclipse.emf.common.util.URI resourceUri, IInputOutputDescriptor desc)
resourceUri
- desc
- protected ClosureUtils.IClosureIOHelper createClosureIOHelper(org.eclipse.emf.common.util.URI resourceUri, IInputOutputDescriptor descriptor)
resourceUri
- descriptor
- protected org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.emf.common.util.URI resourceUri)
protected void setURIConverter(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.emf.ecore.resource.URIConverter converter)
protected org.eclipse.emf.ecore.resource.ResourceSet createResourceSet()
protected java.util.Map getLoadOptions()
protected java.util.Map getSaveOptions()
protected org.eclipse.emf.ecore.xmi.XMLParserPool getXMLParserPool()
protected void enterErrorMode()
com.ibm.xtools.comparemerge.core.controller.AbstractMergeManager#enterErrorMode()
public void close()
public boolean isMergeCompleted()
com.ibm.xtools.comparemerge.core.controller.AbstractMergeManager#isMergeCompleted()
public boolean saveMergedContributorAs(IInputOutputDescriptor output) throws java.io.IOException
java.io.IOException
- if i/o error occuredprotected static boolean validateSaveTarget(java.io.File f)
public void saveMergedContributorCopy(java.lang.String toPath) throws java.io.IOException
java.io.IOException
- if i/o error occuredpublic void saveMergedContributorCopy(java.lang.String toPath, java.lang.String rootModelName) throws java.io.IOException
java.io.IOException
public boolean isEmptySession()
public com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher getMatcher()
public org.eclipse.emf.ecore.resource.Resource[] getContributors()
public java.util.List getResources()
public DeltaContainer[] getDeltaContainers()
public java.util.List getDeltas(org.eclipse.emf.ecore.resource.Resource contributor)
contributor
- a contributing resourcepublic java.util.List getConflicts()
public DeltaContainer getDeltaContainer(org.eclipse.emf.ecore.resource.Resource contributor)
contributor
- a contributing resourcepublic org.eclipse.emf.ecore.resource.Resource getBaseResource()
public org.eclipse.emf.ecore.resource.Resource getAncestorResource()
public org.eclipse.emf.ecore.resource.Resource getRightResource()
public org.eclipse.emf.ecore.resource.Resource getLeftResource()
public void setMergedResource(org.eclipse.emf.ecore.resource.Resource resource)
public org.eclipse.emf.ecore.resource.Resource getMergedResource()
public org.eclipse.emf.ecore.resource.Resource getResource(ContributorType contributor)
public ContributorType getResourceContributor(org.eclipse.emf.ecore.resource.Resource resource)
resource
- to find a contributorpublic ContributorType getDeltaContributor(Delta delta)
delta
- for which to find the contributorpublic Delta getConflictDelta(Conflict conflict, ContributorType contributor)
conflict
- holding the Deltacontributor
- causing the Delta to be foundpublic org.eclipse.emf.common.command.Command getIncrementCommand(ChangeDelta changeDelta, java.lang.Object newValue)
changeDelta
- - change delta to be incrementednewValue
- - new value for the delta incrementpublic org.eclipse.emf.common.command.Command getClearSubsessionResultsCommand(ChangeDelta delta)
delta
- - change delta which needs to be cleared from all the sub
session resultspublic org.eclipse.emf.common.command.Command getDecrementCommand(ChangeDelta changeDelta)
changeDelta
- - change delta to be dencrementedpublic java.util.List sortDeltasByContributor(java.util.List deltas)
deltas
- to sortpublic Delta getDeltaForContributor(Conflict conflict, ContributorType contributor)
conflict
- caused by this deltacontributor
- the delta is caused by. Contributor may only be
ContributorType.LEFT or ContributorType.RIGHT java.lang.IllegalArgumentException
- if nothing foundpublic Delta getConflictResolutionDelta(Conflict conflict)
conflict
- that was resolved using the requested Deltapublic java.lang.String getContentTypeID()
public void setContentType(org.eclipse.core.runtime.content.IContentType contentType)
public final boolean isClosureMode()
public final boolean useReflectiveTypesAndNames()
true
if reflective types and names should be used
false
otherwiseprotected java.lang.String extractErrorMessage(org.eclipse.emf.ecore.resource.Resource resource, java.lang.Exception ex, IInputOutputDescriptor desc)
resource
- to extract the error fromex
- the exception thrown by the EMFpublic int getUnresolvedDeltaCount()
public int getUnresolvedConflictCount()
public java.util.Set getNonconflictingDeltas(org.eclipse.emf.ecore.resource.Resource contributor)
contributor
- Given contributorpublic org.eclipse.emf.common.command.Command getAcceptCommand(Delta delta)
delta
- Given deltapublic org.eclipse.emf.common.command.Command getAcceptDeltasCommand(java.util.List deltas)
deltas
- Given list of deltas to acceptpublic org.eclipse.emf.common.command.Command getResolveDeltasCommand(java.util.List deltas, ResolutionType resolution)
public org.eclipse.emf.common.command.Command getRejectCommand(Delta delta)
delta
- Given deltapublic org.eclipse.emf.common.command.Command getChangeChangeConflictAcceptCommand(Conflict conflict, java.lang.Object v)
conflict
- Given change-change conflictv
- New value to be accepted, used to identify the change delta
that is going to be accepted with this commandpublic org.eclipse.emf.common.command.Command getAcceptMergedValueCommand(Delta delta, java.lang.Object mergedValue)
delta
- The target delta objectmergedValue
- The value to be applied to the target merged modelpublic org.eclipse.emf.common.command.Command getChangeChangeConflictRejectCommand(Conflict conflict)
conflict
- Given change-change conflictpublic int getCalculatedResourceIndex(org.eclipse.emf.ecore.resource.Resource resource, Location location, Delta delta)
resource
- in which to compute the indexlocation
- Location containing index to be calculateddelta
- delta whose location;s index to calculatepublic int getCalculatedMergedIndex(Location location, Delta delta)
location
- Location containing index to calculateddelta
- deltapublic int getCalculatedBaseIndex(Location location, Delta delta)
location
- Location containing index to calculateddelta
- deltapublic int getCalculatedContributorIndex(Location location, Delta delta, org.eclipse.emf.ecore.resource.Resource contributor)
location
- Location containing index to calculateddelta
- deltapublic java.util.Collection getDependentDeltas(Delta delta, org.eclipse.emf.ecore.resource.Resource contributor, boolean accept)
delta
- for which to find other dependent deltascontributor
- causing the deltas to be retrieved of null for deltas from
both contributorsaccept
- must be true for accept and false for rejectprotected void preExecuteRunnable(IMergeManagerRunnable runnable) throws java.lang.Exception
runnable
- java.lang.Exception
public java.lang.Object executeRunnable(IMergeManagerRunnable runnable) throws java.lang.Exception
runnable
- to executejava.lang.Exception
protected void getTargetAffectedResources(java.util.List deltas, java.util.Set affectedResources)
deltas
- list of deltasaffectedResources
- set of resources that will be dirtied.protected static java.lang.String getDescriptorAbsolutePath(IInputOutputDescriptor desc)
desc
- to get the absolute path forprotected static java.lang.String getDescriptorPlatformPath(IInputOutputDescriptor desc)
desc
- to get the platform path forpublic IDeltaTreeFilter[] getDeltaTreeFilters(org.eclipse.core.runtime.content.IContentType contentType)
protected IDeltaTreeFilter[] getDefaultDeltaTreeFilters()
public java.lang.String getDefaultDeltaTreeSorter()
public IDeltaTreeSorter[] getDeltaTreeSorters(org.eclipse.core.runtime.content.IContentType contentType)
protected IDeltaTreeSorter[] getDefaultDeltaTreeSorters()
public IDeltaTreeBuilder[] getDeltaTreeBuilders(org.eclipse.core.runtime.content.IContentType contentType)
protected IDeltaTreeGrouper createDeltaTreeGrouper(java.lang.String deltaTreeBuilderID)
protected IDeltaTreeBuilder[] getDefaultDeltaTreeBuilders()
protected com.ibm.xtools.comparemerge.emf.internal.logicalmodel.ILogicalModelChangeSet createLogicalModelMergeChangeSet()
protected java.io.InputStream getInputStream(IInputOutputDescriptor descriptor)
public java.lang.String getMultilineText(java.lang.Object deltaObject)
public boolean isMyFileMustBeMergeByMeInEclipseOnly()
public static boolean isClosureRoot(IInputOutputDescriptor descriptor)
descriptor
- public java.util.List<PseudoConflict> getPseudoConflicts(Delta delta)
public org.eclipse.emf.common.command.Command getUnresolveCommand(Conflict c, java.util.List<?> src)
public org.eclipse.emf.common.command.Command getChangeChangeConflictResetCommand(Conflict conflict)
conflict
- public boolean isTextChangeConflict(Conflict conflict)