/** * Create an operation for the given part and resource. This method is a convenience * method that calls {@link #ApplyPatchOperation(IWorkbenchPart, IStorage, IResource, CompareConfiguration)} * with appropriate defaults for the other parameters. * @param targetPart an IResource which the patch is to be applied to or <code>null</code> * @param resource an IResource which the patch is to be applied to or <code>null</code> * @see #ApplyPatchOperation(IWorkbenchPart, IStorage, IResource, CompareConfiguration) */ public ApplyPatchOperation(IWorkbenchPart targetPart, IResource resource) { this(targetPart, null, resource, new CompareConfiguration()); }
/** * Create an operation for the given part and resource. This method is a convenience * method that calls {@link #ApplyPatchOperation(IWorkbenchPart, IStorage, IResource, CompareConfiguration)} * with appropriate defaults for the other parameters. * @param targetPart an IResource which the patch is to be applied to or <code>null</code> * @param resource an IResource which the patch is to be applied to or <code>null</code> * @see #ApplyPatchOperation(IWorkbenchPart, IStorage, IResource, CompareConfiguration) */ public ApplyPatchOperation(IWorkbenchPart targetPart, IResource resource) { this(targetPart, null, resource, new CompareConfiguration()); }
private static CompareConfiguration getDefaultCompareConfiguration() { CompareConfiguration cc = new CompareConfiguration(); //cc.setProperty(CompareConfiguration.USE_OUTLINE_VIEW, true); return cc; }
public SaveablesCompareEditorInput(ITypedElement ancestor, ITypedElement left, ITypedElement right, IWorkbenchPage page) { super(new CompareConfiguration()); this.page = page; this.fAncestorElement = ancestor; this.fLeftElement = left; this.fRightElement = right; }
private static CompareConfiguration getDefaultCompareConfiguration() { CompareConfiguration cc = new CompareConfiguration(); //cc.setProperty(CompareConfiguration.USE_OUTLINE_VIEW, true); return cc; }
/** * Creates a new viewer for the given SWT tree control with the specified configuration. * * @param tree the tree control * @param configuration the configuration for this viewer */ public DiffTreeViewer(Tree tree, CompareConfiguration configuration) { super(tree); initialize(configuration == null ? new CompareConfiguration() : configuration); }
/** * Creates a new viewer for the given SWT tree control with the specified configuration. * * @param tree the tree control * @param configuration the configuration for this viewer */ public DiffTreeViewer(Tree tree, CompareConfiguration configuration) { super(tree); initialize(configuration == null ? new CompareConfiguration() : configuration); }
private static CompareConfiguration createCompareConfiguration(ISynchronizePageConfiguration pageConfiguration) { CompareConfiguration compareConfiguration = new CompareConfiguration(); Object o = pageConfiguration.getProperty(IGNORE_WHITSPACE_PAGE_PROPERTY); if (o != null && (o.equals(Boolean.TRUE) || o.equals(Boolean.FALSE))) { compareConfiguration.setProperty(CompareConfiguration.IGNORE_WHITESPACE, o); } return compareConfiguration; }
private static CompareConfiguration createCompareConfiguration(ISynchronizePageConfiguration pageConfiguration) { CompareConfiguration compareConfiguration = new CompareConfiguration(); Object o = pageConfiguration.getProperty(IGNORE_WHITSPACE_PAGE_PROPERTY); if (o != null && (o.equals(Boolean.TRUE) || o.equals(Boolean.FALSE))) { compareConfiguration.setProperty(CompareConfiguration.IGNORE_WHITESPACE, o); } return compareConfiguration; }
/** * Creates a new CompareFileRevisionEditorInput. * @param left * @param right * @param page */ public CompareFileRevisionEditorInput(ITypedElement left, ITypedElement right, IWorkbenchPage page) { super(new CompareConfiguration(), page); this.left = left; this.right = right; setTitle(NLS.bind(TeamUIMessages.SyncInfoCompareInput_title, new String[] { left.getName() })); }
/** * Creates a new CompareFileRevisionEditorInput. * @param left * @param right * @param page */ public CompareFileRevisionEditorInput(ITypedElement left, ITypedElement right, IWorkbenchPage page) { super(new CompareConfiguration(), page); this.left = left; this.right = right; setTitle(NLS.bind(TeamUIMessages.SyncInfoCompareInput_title, new String[] { left.getName() })); }
/** * Creates a new viewer under the given SWT parent and with the specified configuration. * * @param parent the SWT control under which to create the viewer * @param configuration the configuration for this viewer */ public DiffTreeViewer(Composite parent, CompareConfiguration configuration) { super(new Tree(parent, SWT.MULTI)); initialize(configuration == null ? new CompareConfiguration() : configuration); }
CompareDialog(Shell parent, ResourceBundle bundle) { super(parent, bundle); fCompareConfiguration= new CompareConfiguration(); fCompareConfiguration.setLeftEditable(false); fCompareConfiguration.setRightEditable(false); }
CompareDialog(Shell parent, ResourceBundle bundle) { super(parent, bundle); fCompareConfiguration= new CompareConfiguration(); fCompareConfiguration.setLeftEditable(false); fCompareConfiguration.setRightEditable(false); }
CompareDialog(Shell parent, ResourceBundle bundle) { super(parent, bundle); fCompareConfiguration= new CompareConfiguration(); fCompareConfiguration.setLeftEditable(false); fCompareConfiguration.setRightEditable(false); }
/** * Creates a new viewer under the given SWT parent and with the specified configuration. * * @param parent the SWT control under which to create the viewer * @param configuration the configuration for this viewer */ public DiffTreeViewer(Composite parent, CompareConfiguration configuration) { super(new Tree(parent, SWT.MULTI)); initialize(configuration == null ? new CompareConfiguration() : configuration); }
protected boolean isEnabled(ISelection selection) { if (fInput == null) { CompareConfiguration cc= new CompareConfiguration(); // buffered merge mode: don't ask for confirmation // when switching between modified resources cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, new Boolean(false)); // uncomment following line to have separate outline view //cc.setProperty(CompareConfiguration.USE_OUTLINE_VIEW, new Boolean(true)); fInput= new ResourceCompareInput(cc); } return fInput.isEnabled(selection); }
public ProfileCompareEditorInput(RollbackProfileElement[] rpe) { super(new CompareConfiguration()); Assert.isTrue(rpe.length == 2); l = new ProvElementNode(rpe[0]); r = new ProvElementNode(rpe[1]); }
@Override protected boolean isEnabled(ISelection selection) { if (fInput == null) { CompareConfiguration cc= new CompareConfiguration(); // buffered merge mode: don't ask for confirmation // when switching between modified resources cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, Boolean.FALSE); // uncomment following line to have separate outline view //cc.setProperty(CompareConfiguration.USE_OUTLINE_VIEW, Boolean.TRUE); fInput= new ResourceCompareInput(cc); } return fInput.isEnabled(selection); }
private boolean isComparePossible() { IResource[] resources; if (ancestorPanel.getResource() == null) resources = new IResource[] { leftPanel.getResource(), rightPanel.getResource() }; else resources = new IResource[] { ancestorPanel.getResource(), leftPanel.getResource(), rightPanel.getResource() }; ResourceCompareInput r = new ResourceCompareInput(new CompareConfiguration()); return r.isEnabled(new StructuredSelection(resources)); }