Package org.eclipse.compare

Examples of org.eclipse.compare.CompareConfiguration


     * Constructor for PerforceCompareEditorInput.
     * @param left element displayed on the left.
     * @param right element displayed on the right.
     */
    public BytecodeCompare(final TypedElement left, final TypedElement right) {
        super(new CompareConfiguration());
        this.left = left;
        this.right = right;
        toggleAsmifierModeAction = new DefaultToggleAction(
            BCOConstants.DIFF_SHOW_ASMIFIER_CODE, false) {

View Full Code Here


    /**
     * Sets up the title and pane labels for the comparison view.
     */
    private void initLabels() {
        CompareConfiguration cc = getCompareConfiguration();

        cc.setLeftLabel(left.getName());
        cc.setLeftImage(left.getImage());

        cc.setRightLabel(right.getName());
        cc.setRightImage(right.getImage());

        setTitle("Bytecode compare: "  //$NON-NLS-1$
            + left.getElementName() + " - " + right.getElementName()); //$NON-NLS-1$
    }
View Full Code Here

    }
   
    protected void createCompareView( Composite composite ){
        compareViewerPane = new CompareViewerSwitchingPane(horizontalSash, SWT.BORDER | SWT.FLAT) {
            protected Viewer getViewer(Viewer oldViewer, Object input) {
                CompareConfiguration cc = new CompareConfiguration();
                cc.setLeftEditable(false);
                cc.setRightEditable(false);
                return CompareUI.findContentViewer(oldViewer, input, this, cc);
            }
        };
        compareViewerPane.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
       
View Full Code Here

    private GuvnorResourceEdition left;
    private GuvnorResourceEdition right;

    public GuvnorCompareEditorInput(GuvnorResourceEdition left, GuvnorResourceEdition right) {
        super(new CompareConfiguration());
        this.left = left;
        this.right = right;
    }
View Full Code Here

            //Note, we could use the CompareUIPlugin.getDefault().getPreferenceStore() directly, but it's access
            //is restricted, so, we go to the preferences of the previously created compare configuration.
            stores.add(prefs);
        }

        CompareConfiguration cc = new CompareConfiguration(new ChainedPreferenceStore(
                stores.toArray(new IPreferenceStore[stores.size()])));
        cc.setAncestorImage(mp.getAncestorImage(null));
        cc.setAncestorLabel(mp.getAncestorLabel(null));

        cc.setLeftImage(mp.getLeftImage(null));
        cc.setLeftLabel(mp.getLeftLabel(null));
        cc.setLeftEditable(mp.isLeftEditable());

        cc.setRightImage(mp.getRightImage(null));
        cc.setRightLabel(mp.getRightLabel(null));
        cc.setRightEditable(mp.isRightEditable());

        try {
            cc.setContainer(mp.getContainer());
        } catch (Throwable e) {
            //Ignore: not available in Eclipse 3.2.
        }

        return cc;
View Full Code Here

    }

    final ApplyPatchOperation op;
    if (isPatch) {
      op = new ApplyPatchOperation(HandlerUtil.getActivePart(event),
          (IFile) resource, null, new CompareConfiguration());
    } else {
      op = new ApplyPatchOperation(HandlerUtil.getActivePart(event),
          resource);
    }
    BusyIndicator.showWhile(Display.getDefault(), op);
View Full Code Here

   * @param resources
   *            as selected by the user
   */
  public GitCompareEditorInput(String compareVersion, String baseVersion,
      IResource... resources) {
    super(new CompareConfiguration());
    this.resources = convertResourceInput(resources);
    this.baseVersion = baseVersion;
    this.compareVersion = compareVersion;
  }
View Full Code Here

   * @param repository
   *            as selected by the user
   */
  public GitCompareEditorInput(String compareVersion, String baseVersion,
      Repository repository) {
    super(new CompareConfiguration());
    this.resources = new IResource[0];
    this.baseVersion = baseVersion;
    this.compareVersion = compareVersion;
    this.repository = repository;
  }
View Full Code Here

      if (monitor.isCanceled())
        throw new InterruptedException();

      // set the labels
      CompareConfiguration config = getCompareConfiguration();
      config.setLeftLabel(compareVersion);
      config.setRightLabel(baseVersion);
      // set title and icon
      if (resources.length == 0) {
        Object[] titleParameters = new Object[] {
            Activator.getDefault().getRepositoryUtil()
                .getRepositoryName(repository),
View Full Code Here

   *            (i.e. the previous, non-merged version)
   * @param locations
   *            as selected by the user
   */
  public GitMergeEditorInput(boolean useWorkspace, IPath... locations) {
    super(new CompareConfiguration());
    this.useWorkspace = useWorkspace;
    this.locations = locations;
    CompareConfiguration config = getCompareConfiguration();
    config.setLeftEditable(true);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.compare.CompareConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.