Interface ISymlinkTranslator
-
public interface ISymlinkTranslator
A service responsible for translating symbolic links according to their context and taking into account the comparison model.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IMatchingSymlinks
getMatchingSymlinks(ComparisonNode node, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference reference, ComparisonSide sourceSide, String symlink, ComparisonContext comparisonContext, IMergeSession mergeSession)
For the specified symbolic link in the specified context on the specified side ("source side"), returns an object with this link on the specified target side and symbolic links (within the same context) of objects corresponding to the source object in the comparison model.IMatchingSymlinks
getMatchingSymlinksToTopObject(ComparisonContext comparisonContext, String symlink, ComparisonSide side, IMergeSession mergeSession)
Returns matched symlinks to the top object with the given symlink on a given comparison side.String
translateForImport(IMergeSession mergeSession, ComparisonNode node, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference reference, String symlink, ComparisonContext comparisonContext)
Translates the specified symbolic link referencing an object on the OTHER side of comparison for the purposes of import, that is, when the reference is situated in an imported other object.
-
-
-
Method Detail
-
getMatchingSymlinks
IMatchingSymlinks getMatchingSymlinks(ComparisonNode node, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference reference, ComparisonSide sourceSide, String symlink, ComparisonContext comparisonContext, IMergeSession mergeSession)
For the specified symbolic link in the specified context on the specified side ("source side"), returns an object with this link on the specified target side and symbolic links (within the same context) of objects corresponding to the source object in the comparison model.- Parameters:
node
- the comparison result nodeeObject
- the EObject containing the symbolic linkreference
- the reference of the linksourceSide
- the source sidesymlink
- the source symbolic linkcomparisonContext
- the current comparison context, cannot benull
mergeSession
- the merge session ornull
- Returns:
- an object with matching symbolic links where the source symbolic is on the source side
-
getMatchingSymlinksToTopObject
IMatchingSymlinks getMatchingSymlinksToTopObject(ComparisonContext comparisonContext, String symlink, ComparisonSide side, IMergeSession mergeSession)
Returns matched symlinks to the top object with the given symlink on a given comparison side.- Parameters:
comparisonContext
- the comparison context, cannot benull
symlink
- the top object symlink to be matched, cannot benull
side
- the comparison side where the top object lies, cannot benull
mergeSession
- the merge session, can benull
if no merge process run- Returns:
- the triple of matched symlinks or
null
if no matched symlinks found
-
translateForImport
String translateForImport(IMergeSession mergeSession, ComparisonNode node, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference reference, String symlink, ComparisonContext comparisonContext)
Translates the specified symbolic link referencing an object on the OTHER side of comparison for the purposes of import, that is, when the reference is situated in an imported other object. An object is imported if it is present only on the OTHER side of comparison and is merged according to the merge settings. The translated symlink, if the original symlink was referencing an object having a correspondence on the MAIN side of comparison, will be the same as in thegetMatchingSymlinks
method. If the symlink was pointing to an object not present on the MAIN side but imported in the specified session (or an object derived from one), the result will take into account the closest existing parent correspondence.- Parameters:
mergeSession
- the merge sessionnode
- the comparison result nodeeObject
- the EObject containing the symbolic linkreference
- the reference of the linksymlink
- the symbolic link on the other sidecomparisonContext
- the current comparison context, cannot benull
- Returns:
- the symlink in terms of the main side after import
-
-