Class DtCompareEditorInput

  • All Implemented Interfaces:
    org.eclipse.compare.ICompareContainer, org.eclipse.compare.IPropertyChangeNotifier, org.eclipse.core.runtime.IAdaptable, org.eclipse.jface.operation.IRunnableContext, org.eclipse.jface.operation.IRunnableWithProgress, org.eclipse.ui.IEditorInput, org.eclipse.ui.ISaveablesSource
    Direct Known Subclasses:
    ReadOnlyCompareEditorInput

    public class DtCompareEditorInput
    extends org.eclipse.team.ui.synchronize.SaveableCompareEditorInput
    The extension of SaveableCompareEditorInput to set up compare configuration via typed elements.
    • Field Summary

      • Fields inherited from class org.eclipse.compare.CompareEditorInput

        DIRTY_STATE, PROP_SELECTED_EDITION, PROP_TITLE, PROP_TITLE_IMAGE
    • Constructor Summary

      Constructors 
      Constructor Description
      DtCompareEditorInput​(org.eclipse.compare.ITypedElement leftTypedElement, org.eclipse.compare.ITypedElement rightTypedElement, org.eclipse.compare.ITypedElement ancestorTypedElement, org.eclipse.ui.IWorkbenchPage page, org.eclipse.compare.CompareConfiguration compareConfiguration)
      Creates DtCompareEditorInput with the given parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.eclipse.compare.CompareViewerSwitchingPane createContentViewerSwitchingPane​(org.eclipse.compare.Splitter parent, int style, org.eclipse.compare.CompareEditorInput cei)  
      void fireInputChange()  
      org.eclipse.compare.ITypedElement getAncestor()
      Returns the ancestor typed element.
      org.eclipse.compare.ITypedElement getLeft()
      Returns the left typed element.
      String getOKButtonLabel()  
      org.eclipse.compare.ITypedElement getRight()
      Returns the right typed element.
      protected org.eclipse.compare.structuremergeviewer.ICompareInput prepareCompareInput​(org.eclipse.core.runtime.IProgressMonitor monitor)  
      void setAncestor​(org.eclipse.compare.ITypedElement ancestorTypedElement)
      Sets the ancestor typed element.
      void setLeft​(org.eclipse.compare.ITypedElement leftTypedElement)
      Sets the left typed element.
      void setRight​(org.eclipse.compare.ITypedElement rightTypedElement)
      Sets the right typed element.
      • Methods inherited from class org.eclipse.team.ui.synchronize.SaveableCompareEditorInput

        addCompareInputChangeListener, canRunAsJob, closeEditor, contentsCreated, createFileElement, createSaveable, findContentViewer, getActiveSaveables, getAdapter, getCompareInput, getImageDescriptor, getSaveable, getSaveables, getTitleImage, handleDispose, isDirty, prepareInput, registerContextMenu, removeCompareInputChangeListener
      • Methods inherited from class org.eclipse.compare.CompareEditorInput

        addPropertyChangeListener, belongsTo, cancelPressed, contributeToToolBar, createContents, createDiffViewer, createOutlineContents, createStructureInputPane, exists, findStructureViewer, firePropertyChange, flushLeftViewers, flushRightViewers, flushViewers, getActionBars, getCancelButtonLabel, getCompareConfiguration, getCompareResult, getContainer, getContentViewerDescriptor, getMessage, getName, getNavigator, getPersistable, getSelectedEdition, getServiceLocator, getStructureViewerDescriptor, getTitle, getToolTipText, getWorkbenchPart, isEditionSelectionDialog, isLeftSaveNeeded, isRightSaveNeeded, isSaveNeeded, okPressed, removePropertyChangeListener, run, run, runAsynchronously, save, saveChanges, setContainer, setContentViewerDescriptor, setDirty, setFocus, setFocus2, setHelpContextId, setLeftDirty, setMessage, setRightDirty, setStatusMessage, setStructureViewerDescriptor, setTitle
    • Constructor Detail

      • DtCompareEditorInput

        public DtCompareEditorInput​(org.eclipse.compare.ITypedElement leftTypedElement,
                                    org.eclipse.compare.ITypedElement rightTypedElement,
                                    org.eclipse.compare.ITypedElement ancestorTypedElement,
                                    org.eclipse.ui.IWorkbenchPage page,
                                    org.eclipse.compare.CompareConfiguration compareConfiguration)
        Creates DtCompareEditorInput with the given parameters. Left and right typed elements can not be null simultaneously.
        Parameters:
        leftTypedElement - the left typed element, may be null
        rightTypedElement - the right typed element, may not be null
        ancestorTypedElement - the ancestor typed element, may be null
        page - the IWorkbenchPage, can not be null
        compareConfiguration - the compare configuration, cannot be null
    • Method Detail

      • getLeft

        public org.eclipse.compare.ITypedElement getLeft()
        Returns the left typed element.
        Returns:
        the left typed element, can null
      • getRight

        public org.eclipse.compare.ITypedElement getRight()
        Returns the right typed element.
        Returns:
        the right typed element, can null
      • getAncestor

        public org.eclipse.compare.ITypedElement getAncestor()
        Returns the ancestor typed element.
        Returns:
        the ancestor typed element, may be null
      • setLeft

        public void setLeft​(org.eclipse.compare.ITypedElement leftTypedElement)
        Sets the left typed element.
        Parameters:
        leftTypedElement - the left typed element to set, cannot be null
      • setRight

        public void setRight​(org.eclipse.compare.ITypedElement rightTypedElement)
        Sets the right typed element.
        Parameters:
        rightTypedElement - the right typed element to set, cannot be null
      • setAncestor

        public void setAncestor​(org.eclipse.compare.ITypedElement ancestorTypedElement)
        Sets the ancestor typed element.
        Parameters:
        ancestorTypedElement - the ancestor typed element to set, cannot be null
      • fireInputChange

        public void fireInputChange()
        Specified by:
        fireInputChange in class org.eclipse.team.ui.synchronize.SaveableCompareEditorInput
      • getOKButtonLabel

        public String getOKButtonLabel()
        Overrides:
        getOKButtonLabel in class org.eclipse.compare.CompareEditorInput
      • createContentViewerSwitchingPane

        protected org.eclipse.compare.CompareViewerSwitchingPane createContentViewerSwitchingPane​(org.eclipse.compare.Splitter parent,
                                                                                                  int style,
                                                                                                  org.eclipse.compare.CompareEditorInput cei)
        Overrides:
        createContentViewerSwitchingPane in class org.eclipse.compare.CompareEditorInput