Class CompareUiUtils

java.lang.Object
com._1c.g5.v8.dt.compare.ui.util.CompareUiUtils

public class CompareUiUtils extends Object
Utility methods of Comparison UI.
  • Constructor Details

    • CompareUiUtils

      public CompareUiUtils()
  • Method Details

    • getComparisonSideTitle

      public static String getComparisonSideTitle(ComparisonSide side)
      Returns the title of the specified comparison side.
      Parameters:
      side - the comparison side, not null
      Returns:
      the title of the side, never null
    • getParentSkippingVirtual

      public static IPartialModelNode getParentSkippingVirtual(IPartialModelNode node)
      Returns partial node's parent skipping virtual ones if they are.
      Parameters:
      node - the node to get parent for, cannot be null
      Returns:
      the parent partial node found or null
    • syncExec

      public static void syncExec(Runnable runnable)
      Synchronously executes given runnable.
      Parameters:
      runnable - the runnable, cannot be null.
    • findOtherObject

      public static org.eclipse.emf.ecore.EObject findOtherObject(IPartialModelNode node, ComparisonContext comparisonContext)
      Gets OTHER-side model object for the specified partial node. This method can be used to obtain OTHER object even for equal nodes. It walks from the given node up to the parent that has non-null comparison node and then goes back by OTHER-side model using remembered path.
      Parameters:
      node - the node to get OTHER-side model object for, cannot be null
      comparisonContext - the comparison context, cannot be null
      Returns:
      the OTHER model object found or null if no such object
    • findComparisonNode

      public static <T extends FeatureComparisonNode> T findComparisonNode(ComparisonNode parent, org.eclipse.emf.ecore.EStructuralFeature feature, IComparisonSession session)
      Finds child comparison node with the given feature. Searches only for containment child nodes skipping all top ones.
      Parameters:
      parent - the parent comparison node to search in, cannot be null
      feature - the feature to search the child for, cannot be null
      session - the comparison session, cannot be null
      Returns:
      the child comparison node found or null
    • findChildPartialFeatureNode

      public static IPartialFeatureNode findChildPartialFeatureNode(IPartialModelNode parent, org.eclipse.emf.ecore.EStructuralFeature feature)
      Find child partial node related to the given feature.
      Parameters:
      parent - the parent partial node to search in, cannot be null
      feature - the feature to search the child for, cannot be null
      Returns:
      the child partial node found or null
    • getCommitShortMessage

      public static String getCommitShortMessage(org.eclipse.jgit.revwalk.RevCommit commit)
      Gets shortened commit message.
      Parameters:
      commit - commit to get message for, cannot be null
      Returns:
      shortened commit message, never null