private CompareConfiguration getCompareConfiguration() { return fCompareEditorInput.getCompareConfiguration(); }
private CompareConfiguration getCompareConfiguration() { return fCompareEditorInput.getCompareConfiguration(); }
/* package */ CompareConfiguration getCompareConfiguration() { IEditorInput input= getEditorInput(); if (input instanceof CompareEditorInput) return ((CompareEditorInput)input).getCompareConfiguration(); return null; }
/** * Return whether the compare editor input of this dialog is editable. * By default, the input is editable if the compare configuration * indicates that either the left or right sides are editable. * Subclasses may override. * @return whether the compare editor input of this dialog is editable * @see CompareConfiguration#isLeftEditable() * @see CompareConfiguration#isRightEditable() */ protected boolean isInputEditable() { return fCompareEditorInput.getCompareConfiguration().isLeftEditable() || fCompareEditorInput.getCompareConfiguration().isRightEditable(); }
private boolean isShowStructureInOutlineView() { Object object= getCompareConfiguration().getProperty(CompareConfiguration.USE_OUTLINE_VIEW); return (object instanceof Boolean && ((Boolean)object).booleanValue()); }
CompareConfiguration getCompareConfiguration() { IEditorInput input= getEditorInput(); if (input instanceof CompareEditorInput) return ((CompareEditorInput)input).getCompareConfiguration(); return null; }
private boolean isEditable() { return getCompareConfiguration().isLeftEditable() || getCompareConfiguration().isRightEditable(); }
/** * Return whether the compare editor input of this dialog is editable. * By default, the input is editable if the compare configuration * indicates that either the left or right sides are editable. * Subclasses may override. * @return whether the compare editor input of this dialog is editable * @see CompareConfiguration#isLeftEditable() * @see CompareConfiguration#isRightEditable() */ protected boolean isInputEditable() { return fCompareEditorInput.getCompareConfiguration().isLeftEditable() || fCompareEditorInput.getCompareConfiguration().isRightEditable(); }
private boolean isShowStructureInOutlineView() { Object object= getCompareConfiguration().getProperty(CompareConfiguration.USE_OUTLINE_VIEW); return object instanceof Boolean && ((Boolean)object).booleanValue(); }
private boolean isEditable() { return getCompareConfiguration().isLeftEditable() || getCompareConfiguration().isRightEditable(); }
/* package */ void internalCompareAsText(Object input) { Set set = (Set)getCompareConfiguration().getProperty(ICompareAsText.PROP_TEXT_INPUTS); if (set == null) { set = new HashSet(); getCompareConfiguration().setProperty(ICompareAsText.PROP_TEXT_INPUTS, set); } set.add(input); if (fContentInputPane.getInput().equals(input)) { // We need to null the input and then reset it so we get the text merge viewer fContentInputPane.setInput(null); fContentInputPane.setInput(input); } }
protected Control createDialogArea(Composite parent2) { Composite parent= (Composite) super.createDialogArea(parent2); Control c= fCompareEditorInput.createContents(parent); c.setLayoutData(new GridData(GridData.FILL_BOTH)); IPreferenceStore store= fCompareEditorInput.getCompareConfiguration().getPreferenceStore(); if (store != null) { if (store.getBoolean(ComparePreferencePage.SHOW_MORE_INFO)) { statusLabel = new Label(parent, SWT.NONE); statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); } } Shell shell= c.getShell(); shell.setText(fCompareEditorInput.getTitle()); shell.setImage(fCompareEditorInput.getTitleImage()); applyDialogFont(parent); return parent; }
/** * Adds standard actions to the given <code>ToolBarManager</code>. * <p> * Subclasses may override to add their own actions. * </p> * * @param toolBarManager the <code>ToolBarManager</code> to which to contribute */ public void contributeToToolBar(ToolBarManager toolBarManager) { ResourceBundle bundle= CompareUI.getResourceBundle(); ChangePropertyAction ignoreWhitespace= ChangePropertyAction.createIgnoreWhiteSpaceAction(bundle, getCompareConfiguration()); toolBarManager.getControl().addDisposeListener(ignoreWhitespace); ChangePropertyAction showPseudoConflicts= ChangePropertyAction.createShowPseudoConflictsAction(bundle, getCompareConfiguration()); toolBarManager.getControl().addDisposeListener(showPseudoConflicts); toolBarManager.add(new Separator()); toolBarManager.add(ignoreWhitespace); toolBarManager.add(showPseudoConflicts); }
/** * Adds standard actions to the given <code>ToolBarManager</code>. * <p> * Subclasses may override to add their own actions. * </p> * * @param toolBarManager the <code>ToolBarManager</code> to which to contribute */ public void contributeToToolBar(ToolBarManager toolBarManager) { ResourceBundle bundle= CompareUI.getResourceBundle(); ChangePropertyAction ignoreWhitespace= ChangePropertyAction.createIgnoreWhiteSpaceAction(bundle, getCompareConfiguration()); toolBarManager.getControl().addDisposeListener(ignoreWhitespace); ChangePropertyAction showPseudoConflicts= ChangePropertyAction.createShowPseudoConflictsAction(bundle, getCompareConfiguration()); toolBarManager.getControl().addDisposeListener(showPseudoConflicts); toolBarManager.add(new Separator()); toolBarManager.add(ignoreWhitespace); toolBarManager.add(showPseudoConflicts); }
/** * Performs the comparison described by the given input and opens a * compare editor on the result. * * @param input the input on which to open the compare editor * @param page the workbench page on which to create a new compare editor * @param editor if not null the input is opened in this editor * @see CompareEditorInput */ public void openCompareEditor(final CompareEditorInput input, final IWorkbenchPage page, final IReusableEditor editor) { CompareConfiguration configuration = input.getCompareConfiguration(); if (configuration != null) { IPreferenceStore ps= configuration.getPreferenceStore(); if (ps != null) configuration.setProperty( CompareConfiguration.USE_OUTLINE_VIEW, Boolean.valueOf(ps.getBoolean(ComparePreferencePage.USE_OUTLINE_VIEW))); } if (input.canRunAsJob()) { openEditorInBackground(input, page, editor); } else { if (compareResultOK(input, null)) { internalOpenEditor(input, page, editor); } } }
final IWorkbenchPage page, final IReusableEditor editor, final boolean activate) { CompareConfiguration configuration = input.getCompareConfiguration(); if (configuration != null) { IPreferenceStore ps= configuration.getPreferenceStore();
&& ((CompareEditorInput) input).getCompareConfiguration() != null) { Object filterActions = ((CompareEditorInput) input) .getCompareConfiguration() .getProperty( ChangeCompareFilterPropertyAction.COMPARE_FILTER_ACTIONS);