Class ComparisonSession

java.lang.Object
com._1c.g5.v8.dt.internal.compare.ComparisonSession
All Implemented Interfaces:
IComparisonSession, IProgressMonitorContainer

public class ComparisonSession extends Object implements IComparisonSession
Comparison session implementation.
  • Constructor Details

  • Method Details

    • setRootNode

      public void setRootNode(RootComparisonNode rootNode)
      Sets the root node of the comparison tree related to this session. Should be run at the very beginning of a comparison process.
      Parameters:
      rootNode - the root comparison node with non-empty FQN attached to BM or null
    • getHandle

      public ComparisonProcessHandle getHandle()
      Description copied from interface: IComparisonSession
      Returns the handle of the comparison process this session is associated with.
      Specified by:
      getHandle in interface IComparisonSession
      Returns:
      the handle, never null
    • getStatus

      public ComparisonProcessStatus getStatus()
      Description copied from interface: IComparisonSession
      Returns the status of the comparison process.
      Specified by:
      getStatus in interface IComparisonSession
      Returns:
      the status, never null
    • setStatus

      public void setStatus(ComparisonProcessStatus status)
      Parameters:
      status - the status to set
    • getQueue

      public ComparisonQueue getQueue()
      Returns the comparison queue.
      Returns:
      the comparison queue, never null
    • prioritize

      public void prioritize(List<Long> nodeIds)
      Description copied from interface: IComparisonSession
      Asks the session to prioritize the comparison of the specified list of nodes.
      Specified by:
      prioritize in interface IComparisonSession
      Parameters:
      nodeIds - the ids of the nodes to prioritize their comparison, not null
    • getDataSource

      public IComparisonDataSource getDataSource(ComparisonSide side)
      Description copied from interface: IComparisonSession
      Returns the comparison data source by its side.
      Specified by:
      getDataSource in interface IComparisonSession
      Parameters:
      side - the side of the data source, not null
      Returns:
      the data source, may be null when trying to get the common ancestor of a two-way comparison
    • getTopNodeOf

      public TopComparisonNode getTopNodeOf(long nodeId)
      Description copied from interface: IComparisonSession
      Returns a top-level parent node of the node with the specified id.
      Specified by:
      getTopNodeOf in interface IComparisonSession
      Parameters:
      nodeId - the node id to find top parent for
      Returns:
      the top node or null if no such node found
    • getTopNodeOf

      public TopComparisonNode getTopNodeOf(ComparisonNode node)
      Description copied from interface: IComparisonSession
      Returns a top-level parent node of the given node.
      Specified by:
      getTopNodeOf in interface IComparisonSession
      Parameters:
      node - the node to find top parent for
      Returns:
      the top node or null if no such node found
    • getNode

      public ComparisonNode getNode(long nodeId)
      Description copied from interface: IComparisonSession
      Returns a result node by the specified id.
      Specified by:
      getNode in interface IComparisonSession
      Parameters:
      nodeId - the node id
      Returns:
      the node or null if no node exists with such id in the model
    • getNode

      public ComparisonNode getNode(ComparisonContext comparisonContext, long nodeId)
      Description copied from interface: IComparisonSession
      Returns a result node by the specified id.
      Specified by:
      getNode in interface IComparisonSession
      Parameters:
      comparisonContext - the comparison context, not null
      nodeId - the node id
      Returns:
      the node or null if no node exists with such id in the model
    • getTopNode

      public TopComparisonNode getTopNode(String symlink, ComparisonSide side)
      Description copied from interface: IComparisonSession
      Returns a top node by the specified symbolic link.
      Specified by:
      getTopNode in interface IComparisonSession
      Parameters:
      symlink - the symbolic link, not null
      side - the side to search at, can not be null
      Returns:
      the top node or null if didn't find it
    • getRootNode

      public RootComparisonNode getRootNode()
      Description copied from interface: IComparisonSession
      Returns the root of the comparison result tree.
      Specified by:
      getRootNode in interface IComparisonSession
      Returns:
      the root of the comparison result tree.
    • getMatchingStrategy

      public MatchingStrategy getMatchingStrategy(ComparisonSide firstSide, ComparisonSide secondSide)
      Description copied from interface: IComparisonSession
      Returns the matching strategy used between the specified sides.

      The method is symmetrical, i. e. getMatchingStrategy(a, b) == getMatchingStrategy(b, a).

      Specified by:
      getMatchingStrategy in interface IComparisonSession
      Parameters:
      firstSide - the first side of the comparison, not null
      secondSide - the second side of the comparison, not null
      Returns:
      the matching strategy, never null
    • getDirectCorrespondence

      public String getDirectCorrespondence(String source, ComparisonSide sourceSide, ComparisonSide targetSide)
      Description copied from interface: IComparisonSession
      Returns the symbolic link corresponding to the given source symbolic link in the direction defined by the specified comparison sides.

      The method will always return null if the source is excluded from the comparison in the specified direction.

      The method is symmetric in the sense that if A2 == getDirectCorrespondence(A1, side1, side2), then A1 == getDirectCorrespondence(A2, side2, side1).

      Specified by:
      getDirectCorrespondence in interface IComparisonSession
      Parameters:
      source - the string with the source symbolic link, not null
      sourceSide - the source side, not null
      targetSide - the target side, not null
      Returns:
      the string with the target symbolic link or null if no direct correspondence is set
    • isExcluded

      public boolean isExcluded(String source, ComparisonSide sourceSide, ComparisonSide targetSide)
      Description copied from interface: IComparisonSession
      Checks if the specified symbolic link is explicitly excluded from matching in the specified direction.
      Specified by:
      isExcluded in interface IComparisonSession
      Parameters:
      source - the source symbolic link, not null
      sourceSide - the source side, not null
      targetSide - the target side, not null
      Returns:
      true if the link is excluded from matching, and false otherwise
    • isThreeWay

      public boolean isThreeWay()
      Description copied from interface: IComparisonSession
      Checks whether the comparison session is three-way.
      Specified by:
      isThreeWay in interface IComparisonSession
      Returns:
      true if the comparison session is three-way, and false if it is two-way
    • areExplicitCorrespondencesSet

      public boolean areExplicitCorrespondencesSet(ComparisonSide sourceSide, ComparisonSide targetSide)
      Description copied from interface: IComparisonSession
      An optimization flag indicating whether explicit correspondence settings are set for the specified direction.
      Specified by:
      areExplicitCorrespondencesSet in interface IComparisonSession
      Parameters:
      sourceSide - the source side of the direction
      targetSide - the target side of the direction
      Returns:
      true if explicit correspondence are set, and false otherwise
    • addChild

      public void addChild(ComparisonNode parentNode, ComparisonNode childNode, IComparedObjects<?> comparedObjects)
      Description copied from interface: IComparisonSession
      Adds the specified child node to the specified parent node. If a triple of compared objects is given, it is stored in cache for future fast access by IComparisonSession.getComparedObjects(ComparisonNode, ComparisonContext) method.
      Specified by:
      addChild in interface IComparisonSession
      Parameters:
      parentNode - the parent node, cannot be null
      childNode - the child node to be added, cannot be null
      comparedObjects - the objects being compared by the child node to put in cache, can be null
    • setMustBeMerged

      public boolean setMustBeMerged(long nodeId, boolean mustBeMerged, boolean force)
      Description copied from interface: IComparisonSession
      Sets the "Merge" flag value to the specified node and to all its children. The flag can be set only when comparison process has been finished.
      Specified by:
      setMustBeMerged in interface IComparisonSession
      Parameters:
      nodeId - the node id
      mustBeMerged - the value to set
      force - true if we want to force change even if merge rule forbids this
      Returns:
      true if the flag set successfully, false otherwise
    • setMergeRule

      public boolean setMergeRule(long nodeId, MergeRule rule, ComparisonContext comparisonContext)
      Description copied from interface: IComparisonSession
      Sets the given merge rule to the specified node. The rule can be set only when comparison process has been finished.
      Specified by:
      setMergeRule in interface IComparisonSession
      Parameters:
      nodeId - the node id
      rule - the merge rule to set, cannot be null
      comparisonContext - current comparison operation context, cannot be null
      Returns:
      true if the rule set successfully, false otherwise
    • setOrderSide

      public boolean setOrderSide(long nodeId, ComparisonSide orderSide, ComparisonContext comparisonContext)
      Description copied from interface: IComparisonSession
      Sets the order side to be used for children ordering for the specified node. The node must support ordering of its children. The method should be called only when comparison process has been finished.
      Specified by:
      setOrderSide in interface IComparisonSession
      Parameters:
      nodeId - the node id
      orderSide - the order side to set, can be either MAIN or OTHER, cannot be null
      comparisonContext - current comparison operation context, cannot be null
      Returns:
      true if the side set successfully, false otherwise
    • setCustomMergeSettings

      public void setCustomMergeSettings(long nodeId, CustomMergeSettings settings, ComparisonContext comparisonContext)
      Description copied from interface: IComparisonSession
      Sets node's custom merge settings.
      Specified by:
      setCustomMergeSettings in interface IComparisonSession
      Parameters:
      nodeId - the node id
      settings - the custom merge settings to set, cannot be null
      comparisonContext - current comparison operation context, cannot be null
    • scheduleComparing

      public void scheduleComparing(TopComparisonNode node, boolean prioritize)
      Schedules top node comparing.
      Parameters:
      node - the node to compare
      prioritize - true if need to prioritize the node's comparison
    • addComparisonTreeListener

      public void addComparisonTreeListener(IComparisonSession.IComparisonTreeListener listener)
      Description copied from interface: IComparisonSession
      Adds a comparison result listener.
      Specified by:
      addComparisonTreeListener in interface IComparisonSession
      Parameters:
      listener - the result listener, not null
    • removeComparisonTreeListener

      public void removeComparisonTreeListener(IComparisonSession.IComparisonTreeListener listener)
      Description copied from interface: IComparisonSession
      Removes a comparison result listener.
      Specified by:
      removeComparisonTreeListener in interface IComparisonSession
      Parameters:
      listener - the result listener, not null
    • notifyNodeCompared

      public void notifyNodeCompared(long id)
      Notifies external listeners that the specified node has been compared.
      Parameters:
      id - id of the node that has been compared
    • getTopNodeStatus

      public ComparisonNodeStatus getTopNodeStatus(long nodeId)
      Description copied from interface: IComparisonSession
      Returns the comparison status of the specified top-level node.
      Specified by:
      getTopNodeStatus in interface IComparisonSession
      Parameters:
      nodeId - the node identifier to get status for, must specify the top-level node
      Returns:
      the node comparison status, never null
    • removeChild

      public void removeChild(ComparisonNode parentNode, ComparisonNode childNode)
      Description copied from interface: IComparisonSession
      Removes the specified child from the specified parent node.
      Specified by:
      removeChild in interface IComparisonSession
      Parameters:
      parentNode - the parent node from which to remove the child, not null
      childNode - the child node to remove from the parent node, not null
    • removeChildren

      public void removeChildren(ComparisonNode node)
      Description copied from interface: IComparisonSession
      Recursively removes all children of the specified node.
      Specified by:
      removeChildren in interface IComparisonSession
      Parameters:
      node - the node for which to remove all its children, not null
    • adoptExternalProperty

      public boolean adoptExternalProperty(ExternalPropertyComparisonData extPropData)
      Description copied from interface: IComparisonSession
      Adopts the given external property if possible. If adopting is possible, the method fills the provided comparison data container by data to be used for adoption.
      Specified by:
      adoptExternalProperty in interface IComparisonSession
      Parameters:
      extPropData - the data of the external property to be adopted, cannot be null
      Returns:
      true if adopting is possible, false otherwise
    • mainTopObjectUpdated

      public void mainTopObjectUpdated(String mainSymlink, org.eclipse.emf.ecore.EClass eClass)
      Processes updating of a current top object or constructing of a new top object from the MAIN side.
      Parameters:
      mainSymlink - the symbolic link of the top object from the MAIN side, cannot be null or empty
      eClass - EClass type of the target object, used to schedule updates for new top objects
    • mainTopObjectRenamed

      public void mainTopObjectRenamed(String oldMainSymlink, String newMainSymlink)
      Processes renaming of a top object from the MAIN side.
      Parameters:
      oldMainSymlink - the previous symbolic link of the top object from the MAIN side, cannot be null or empty
      newMainSymlink - the new symbolic link of the top object from the MAIN side, cannot be null or empty
      eClass - EClass type of the target object, used to schedule updates for new top objects
    • mainTopObjectRemoved

      public void mainTopObjectRemoved(String mainSymlink)
      Processes removing the a top object from the MAIN side.
      Parameters:
      mainSymlink - the symbolic link of removed top object from the MAIN side, cannot be null or empty
    • setCorrespondence

      public boolean setCorrespondence(String mainSymlink, String otherSymlink, String ancestorSymlink)
      Description copied from interface: IComparisonSession
      Sets correspondence between two symbolic links and common ancestor (optional). The correspondence can be set only when there is no active comparison process. The call of this method causes an automatic start of a new comparison process.
      Specified by:
      setCorrespondence in interface IComparisonSession
      Parameters:
      mainSymlink - the main symbolic link, may be null
      otherSymlink - the other symbolic link, may be null
      ancestorSymlink - the ancestor symbolic link (optional), may be null
      Returns:
      true if the correspondence set successfully, false otherwise
    • addProgressMonitor

      public void addProgressMonitor(org.eclipse.core.runtime.IProgressMonitor progressMonitor, org.eclipse.swt.widgets.Display display)
      Description copied from interface: IProgressMonitorContainer
      Adds the specified progress monitor and display that should be used for asynchronous communication with that monitor to this container.
      Specified by:
      addProgressMonitor in interface IProgressMonitorContainer
      Parameters:
      progressMonitor - the progress monitor to be set as contained in this container
      display - the display for asynchronous communication with the added progress monitor
    • addProgressMonitor

      public void addProgressMonitor(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
      Description copied from interface: IProgressMonitorContainer
      Adds the specified progress monitor working in the UI-less thread.
      Specified by:
      addProgressMonitor in interface IProgressMonitorContainer
      Parameters:
      progressMonitor - the progress monitor to be set as contained in this container
    • removeProgressMonitor

      public void removeProgressMonitor(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
      Description copied from interface: IProgressMonitorContainer
      Removes the specified progress monitor from the container.
      Specified by:
      removeProgressMonitor in interface IProgressMonitorContainer
      Parameters:
      progressMonitor - the progress monitor to remove
    • getSessionProgressMonitor

      public org.eclipse.core.runtime.IProgressMonitor getSessionProgressMonitor()
      Returns the progress monitor of this session.
      Returns:
      the progress monitor of this session
    • clearCaches

      public void clearCaches(ComparisonNode node)
      Description copied from interface: IComparisonSession
      Clears compared object cache for the specified node.
      Specified by:
      clearCaches in interface IComparisonSession
      Parameters:
      node - the node to clear the compared object cache for
    • runComparisonTreeReadonlyTask

      public <T> T runComparisonTreeReadonlyTask(IBmTask<T> task)
      Description copied from interface: IComparisonSession
      Executes the given read-only BM task for a comparison tree of the specified session.
      Specified by:
      runComparisonTreeReadonlyTask in interface IComparisonSession
      Parameters:
      task - the task to execute, cannot be null
      Returns:
      the result returned by IBmTask.execute(IBmTransaction, IProgressMonitor) method
    • getComparedObjects

      public IComparedObjects<?> getComparedObjects(ComparisonNode node, ComparisonContext comparisonContext)
      Description copied from interface: IComparisonSession
      Returns a triple of compared objects for the specified node. Note: it may work slower than #getComparedObjects(ComparisonNode, ComparedEmfObjects) because it has to obtain the top parents triple first. Use that method if the top parents triple is already known.
      Specified by:
      getComparedObjects in interface IComparisonSession
      Parameters:
      node - the node to get the triple of compared objects for, cannot be null
      comparisonContext - the comparison context, not null
      Returns:
      the compared objects triple, never null
    • getComparedObjects

      public IComparedObjects<?> getComparedObjects(ComparisonNode node, AbstractComparedEmfObjects<?> topParents, ComparisonContext comparisonContext)
      Description copied from interface: IComparisonSession
      Returns a triple of compared objects for the specified node. Uses triple of top parents if they are given to speed up objects obtaining.
      Specified by:
      getComparedObjects in interface IComparisonSession
      Parameters:
      node - the node to get the triple of compared objects for, cannot be null
      comparisonContext - the comparison context, not null
      Returns:
      the compared objects triple, never null
    • getResourceStore

      public IResourceStore getResourceStore()
      Description copied from interface: IComparisonSession
      Returns the resource store accessible within the session.
      Specified by:
      getResourceStore in interface IComparisonSession
      Returns:
      the resource store
    • getSymlinkTranslator

      public ISymlinkTranslator getSymlinkTranslator()
      Description copied from interface: IComparisonSession
      Returns the symbolic link translator serving this session.
      Specified by:
      getSymlinkTranslator in interface IComparisonSession
      Returns:
      the symbolic link translator
    • getSettings

      public IComparisonProcessSettings getSettings()
      Description copied from interface: IComparisonSession
      Returns the settings that were specified when the session was started.
      Specified by:
      getSettings in interface IComparisonSession
      Returns:
      the session settings
    • isGlobalScope

      public boolean isGlobalScope()
      Description copied from interface: IComparisonSession
      Checks whether the scope of comparison of the session is global, that is, its settings do not specify any scope object on any side.
      Specified by:
      isGlobalScope in interface IComparisonSession
      Returns:
      true if the session comparison scope is global, and false otherwise
    • isInScope

      public boolean isInScope(ComparisonNode node)
      Description copied from interface: IComparisonSession
      Checks whether the specified node lies within the scope of comparison of this session.
      Specified by:
      isInScope in interface IComparisonSession
      Parameters:
      node - the node to check, cannot be null
      Returns:
      true if the node is within scope, and false otherwise
    • isInScope

      public boolean isInScope(String symlink, ComparisonSide side)
      Description copied from interface: IComparisonSession
      Checks whether the specified symbolic link satisfies the scope of comparison on the specified side, that is, is leading to, included into, or coming from the scope of comparison.
      Specified by:
      isInScope in interface IComparisonSession
      Parameters:
      symlink - the symbolic link to check
      side - the side to which symbolic link relates to, not null
      Returns:
      true if the symbolic link is within scope, false otherwise
    • isInInputScope

      public boolean isInInputScope(ComparisonNode node)
      Description copied from interface: IComparisonSession
      Checks whether the specified node lies within the input comparison scope (before the scope was extended) of this session.
      Specified by:
      isInInputScope in interface IComparisonSession
      Parameters:
      node - the node to check, cannot be null
      Returns:
      true if the node is within the input scope, and false otherwise
    • isInInputScope

      public boolean isInInputScope(String symlink, ComparisonSide side)
      Description copied from interface: IComparisonSession
      Checks whether the specified symbolic link satisfies the input comparison scope (before the scope was extended) on the specified side.
      Specified by:
      isInInputScope in interface IComparisonSession
      Parameters:
      symlink - the symbolic link to check, cannot be null
      side - the side to which symbolic link relates to, cannot null
      Returns:
      true if the symbolic link is within the input scope, false otherwise
    • getEClassById

      public org.eclipse.emf.ecore.EClass getEClassById(int id)
      Description copied from interface: IComparisonSession
      Gets EClass by its identifier returned by IComparisonSession.getEClassId(org.eclipse.emf.ecore.EClass) method.
      Specified by:
      getEClassById in interface IComparisonSession
      Parameters:
      id - the identifier to get EClass by.
      Returns:
      the EClass identified by the specified id or null if doesn't exist
    • getEClassId

      public int getEClassId(org.eclipse.emf.ecore.EClass eClass)
      Description copied from interface: IComparisonSession
      Gets identifier assigned to the specified EClass.
      Specified by:
      getEClassId in interface IComparisonSession
      Parameters:
      eClass - the EClass to get identifier for, cannot be null
      Returns:
      the identifier assigned to the EClass
    • getMatchedObjectsEClass

      public org.eclipse.emf.ecore.EClass getMatchedObjectsEClass(long nodeId)
      Description copied from interface: IComparisonSession
      Returns EClass of model objects the node relates to.
      Specified by:
      getMatchedObjectsEClass in interface IComparisonSession
      Parameters:
      nodeId - the nodeId to return EClass for
      Returns:
      the EClass or null if the node doesn't relate to any model object
    • getMatchedObjectsEClass

      public org.eclipse.emf.ecore.EClass getMatchedObjectsEClass(ComparisonNode node)
      Description copied from interface: IComparisonSession
      Returns EClass of model objects the node relates to.
      Specified by:
      getMatchedObjectsEClass in interface IComparisonSession
      Parameters:
      node - the node to return feature for, may be null
      Returns:
      the EClass or null if the node is null or doesn't relate to any model object
    • getRelatedFeature

      public org.eclipse.emf.ecore.EStructuralFeature getRelatedFeature(long nodeId)
      Description copied from interface: IComparisonSession
      Returns EStructuralFeature the node relates to.
      Specified by:
      getRelatedFeature in interface IComparisonSession
      Parameters:
      nodeId - the nodeId to return feature for
      Returns:
      the feature or null if the node doesn't relate to any feature
    • getRelatedFeature

      public org.eclipse.emf.ecore.EStructuralFeature getRelatedFeature(ComparisonNode node)
      Description copied from interface: IComparisonSession
      Returns EStructuralFeature the node relates to.
      Specified by:
      getRelatedFeature in interface IComparisonSession
      Parameters:
      node - the node to return feature for, may be null
      Returns:
      the feature or null if the node doesn't relate to any feature
    • getParentCollectionFeature

      public org.eclipse.emf.ecore.EStructuralFeature getParentCollectionFeature(ComparisonNode node)
      Description copied from interface: IComparisonSession
      Returns EStructuralFeature of the collection containing the object related to the given comparison node.
      Specified by:
      getParentCollectionFeature in interface IComparisonSession
      Parameters:
      node - the node related to the collection element, may be be null
      Returns:
      the parent collection feature or null if the node doesn't relate to any collection element
    • isFeatureExcludedFromComparison

      public boolean isFeatureExcludedFromComparison(org.eclipse.emf.ecore.EStructuralFeature feature, AbstractComparedEmfObjects<?> comparedContextObjects)
      Description copied from interface: IComparisonSession
      Tells whether the feature is excluded from the comparison process.
      Specified by:
      isFeatureExcludedFromComparison in interface IComparisonSession
      Parameters:
      feature - the feature to check, cannot be null
      comparedContextObjects - the triple of compared objects, cannot be null
      Returns:
      true if the feature is excluded, false otherwise
    • buildFinalMergeSettings

      public void buildFinalMergeSettings(ComparisonSession session, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
      Calculates and sets final comparison flags and merge settings to all tree nodes. Must be run after building the comparison tree as a final stage of the comparison process.
      Parameters:
      session -
      progressMonitor - the monitor of the progress. May not be null
    • skipBuildFinalMergeSettings

      public void skipBuildFinalMergeSettings()
      Tells that building of final merge settings will be skipped. This clears cached map of top nodes to build merge settings for.
    • buildNodeMergeSettings

      public void buildNodeMergeSettings(TopComparisonNode node, List<Long> childrenToCompareLater, ComparisonContext comparisonContext)
      Calculates and sets comparison flags and merge settings to the specified top node and all its children. Must be run under active transaction.
      Parameters:
      node - the top node which settings to modify, cannot be null
      childrenToCompareLater - the list of node's children to be compared later, cannot be null
      comparisonContex - context of the current object comparison, cannot be null
    • getId

      public int getId()
      Description copied from interface: IComparisonSession
      Gets the id of this comparison session.
      Specified by:
      getId in interface IComparisonSession
      Returns:
      the comparison session id
    • getProjectName

      public String getProjectName(ComparisonSide side)
      Description copied from interface: IComparisonSession
      Returns the given side project name.
      Specified by:
      getProjectName in interface IComparisonSession
      Parameters:
      side - the comparison side, can not be null
      Returns:
      the given side project name, may be null
    • setIntegrationContext

      public void setIntegrationContext(IntegrationContext integrationContext)
      Description copied from interface: IComparisonSession
      Sets the integration settings context for the comparison session
      Specified by:
      setIntegrationContext in interface IComparisonSession
      Parameters:
      integrationContext - The integration settings context. Could be null
    • getIntegrationContext

      public IntegrationContext getIntegrationContext()
      Description copied from interface: IComparisonSession
      Gets the integration settings context being associated with the comparison session
      Specified by:
      getIntegrationContext in interface IComparisonSession
      Returns:
      The associated integration settings context, if any. null otherwise
    • hasExtendedComparisonSettings

      public boolean hasExtendedComparisonSettings(String symlink)
      Description copied from interface: IComparisonSession
      Checks if the provided symlink has an extended comparison settings associated with it. Extended settings are being supplied with external comparison configuration.
      Specified by:
      hasExtendedComparisonSettings in interface IComparisonSession
      Parameters:
      symlink - The target symlink, can be null
      Returns:
      True if the object pointed with the symlink has an extended comparison settings
    • adoptMainSideFeature

      public org.eclipse.emf.ecore.EStructuralFeature adoptMainSideFeature(org.eclipse.emf.ecore.EStructuralFeature mainSideFeature)
      Description copied from interface: IComparisonSession
      Converts, if possible, the main side feature into a other supported by the other side object. Returns the given main side feature if no convert was found.
      Specified by:
      adoptMainSideFeature in interface IComparisonSession
      Parameters:
      mainSideFeature - the main side feature to convert, cannot be null
      Returns:
      the converted feature applicable for other side object or given main side feature if no convert was found, never null
    • hasPotentialMergeProblems

      public boolean hasPotentialMergeProblems(long nodeId)
      Description copied from interface: IComparisonSession
      Tells whether the node may break the configuration if it is merged.
      Specified by:
      hasPotentialMergeProblems in interface IComparisonSession
      Parameters:
      nodeId - the node Id to check
      Returns:
      true if the node may break the configuration, false otherwise
    • getPotentialMergeProblemsDescriptions

      public List<PotentialMergeProblemDescription> getPotentialMergeProblemsDescriptions(long nodeId, ComparisonContext comparisonContext)
      Description copied from interface: IComparisonSession
      Returns human-readable descriptions of merge problems of the specified node.
      Specified by:
      getPotentialMergeProblemsDescriptions in interface IComparisonSession
      comparisonContext - the comparison context, cannot be null
      Returns:
      the list of descriptions, never null, can be empty if the node doesn't bring any merge problems
    • getPotentialMergeProblemsSourceNodes

      public Collection<Long> getPotentialMergeProblemsSourceNodes()
      Description copied from interface: IComparisonSession
      Returns collection of nodes that cause potential merge problems.
      Specified by:
      getPotentialMergeProblemsSourceNodes in interface IComparisonSession
      Returns:
      the collection of such nodes, can be empty, never null
    • checkForOverload

      public void checkForOverload()
      Checks the comparison for the memory overload. Throws a ComparisonMemoryOverloadException in case of check failure and the strict mode is being enabled.
      See Also:
    • setStrictOverloadCheckMode

      public void setStrictOverloadCheckMode(boolean strict)
      Sets/resets the strict mode for the memory overload checks
      Parameters:
      strict - The strict mode
    • getTracer

      public Tracer getTracer()
      Gets the tracer if enabled
      Returns:
      The tracer instance if applicable; null otherwise
    • setTracer

      public void setTracer(Tracer tracer)
      Sets the internal debug tracer
      Parameters:
      tracer - The tracer to set. Cannot be null
    • getComparedObjectsCorrespondences

      public Collection<ObjectsTriple<String>> getComparedObjectsCorrespondences()
      Description copied from interface: IComparisonSession
      Returns a collection of correspondences between compared objects.
      Specified by:
      getComparedObjectsCorrespondences in interface IComparisonSession
      Returns:
      general list of correspondences in the form of pairs (main symlink, other symlink), never null
    • getNodesWithChangedMergeSettings

      public Collection<Long> getNodesWithChangedMergeSettings()
      Description copied from interface: IComparisonSession
      Returns a comparison tree node with serializable merge settings.
      Specified by:
      getNodesWithChangedMergeSettings in interface IComparisonSession
      Returns:
      Collection of node BM identifiers, never null
    • getSerializableNodeMergeSettings

      public SerializableMergeSettings getSerializableNodeMergeSettings(ComparisonNode node)
      Description copied from interface: IComparisonSession
      Returns container of serializable merge settings of the given node.
      Specified by:
      getSerializableNodeMergeSettings in interface IComparisonSession
      Parameters:
      node - the node to get container for, cannot be null
      Returns:
      the container of serializable merge settings, never null
    • clearRestoredMergeSettings

      public void clearRestoredMergeSettings()
      Removes the restored merge settings used in the comparison process. It is necessary to call upon completion of the process of clearing to clear the memory.
    • notifyNodesUpdated

      public void notifyNodesUpdated(List<Long> nodeIds)
      Notifies external listeners that the specified nodes have been updated.
      Parameters:
      nodeIds - the identifiers of the nodes that have been updated, cannot be null
    • isFailedOnMergeUsingExternalTool

      public boolean isFailedOnMergeUsingExternalTool(long nodeId)
      Description copied from interface: IComparisonSession
      Tells whether the merge using external tool failed for the specified node.
      Specified by:
      isFailedOnMergeUsingExternalTool in interface IComparisonSession
      Parameters:
      nodeId - the node id to check
      Returns:
      true if the merge using external tool failed, false otherwise
    • getMergeProblems

      public List<MergeProblem> getMergeProblems()
      Returns a list of all found merge problems for this comparison session.
      Returns:
      the list of all found merge problems for this comparison session, never null
    • addMergeProblems

      public void addMergeProblems(Collection<? extends MergeProblem> mergeProblems)
      Adds a collection of merge problems.
      Parameters:
      mergeProblems - the collections of merge problems, cannot be null
    • clearMergeProblems

      public void clearMergeProblems()
      Cleares all found merge problems for this comparison session.
    • getBmEngine

      public IBmEngine getBmEngine()
      Gets BM engien.
      Returns:
      the bmEngine.