/** * This method will save all dirty editors. It will prompt the user if the Compare preference to save * dirty editors before viewing a patch is <code>false</code>. Clients can use this or provide their own * implementation. */ protected void saveAllEditors(){ saveAllEditors = IDE.saveAllEditors(new IResource[]{ResourcesPlugin.getWorkspace().getRoot()}, !ComparePreferencePage.getSaveAllEditors()); }
composite.setLayout(layout); addCheckBox(composite, "ComparePreferencePage.synchronizeScrolling.label", SYNCHRONIZE_SCROLLING, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.initiallyShowAncestorPane.label", INITIALLY_SHOW_ANCESTOR_PANE, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.showPseudoConflicts.label", SHOW_PSEUDO_CONFLICTS, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.useSingleLine.label", USE_SINGLE_LINE, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.highlightTokenChanges.label", HIGHLIGHT_TOKEN_CHANGES, 0); //$NON-NLS-1$ fDisableCappingCheckBox = addCheckBox(composite, "ComparePreferencePage.disableCapping.label", CAPPING_DISABLED, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.swapped.label", SWAPPED, 0); //$NON-NLS-1$ previewLabel.setText(Utilities.getString("ComparePreferencePage.preview.label")); //$NON-NLS-1$ Control previewer= createPreviewer(composite); GridData gd= new GridData(GridData.FILL_BOTH); gd.widthHint= convertWidthInCharsToPixels(60); gd.heightHint= convertHeightInCharsToPixels(13); previewer.setLayoutData(gd); (IWorkbenchPreferenceContainer)getContainer(), "selectCategory:org.eclipse.compare.contentmergeviewer.TextMergeViewer"); //$NON-NLS-1$
@Override public void initializeDefaultPreferences() { IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore(); ComparePreferencePage.initDefaults(store); }
composite.setLayout(layout); addCheckBox(composite, "ComparePreferencePage.structureCompare.label", OPEN_STRUCTURE_COMPARE, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.structureOutline.label", USE_OUTLINE_VIEW, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.ignoreWhitespace.label", IGNORE_WHITESPACE, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.saveBeforePatching.label", PREF_SAVE_ALL_EDITORS, 0); //$NON-NLS-1$ String filters= fFilters.getText(); String message= CompareResourceFilter.validateResourceFilters(filters); setValid(message == null); setMessage(null); setErrorMessage(message); fOverlayStore.setValue(PATH_FILTER, filters);
protected Control createContents(Composite parent) { PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, ICompareContextIds.COMPARE_PREFERENCE_PAGE); fOverlayStore.load(); fOverlayStore.start(); TabFolder folder= new TabFolder(parent, SWT.NONE); folder.setLayout(new TabFolderLayout()); folder.setLayoutData(new GridData(GridData.FILL_BOTH)); TabItem item= new TabItem(folder, SWT.NONE); item.setText(Utilities.getString("ComparePreferencePage.generalTab.label")); //$NON-NLS-1$ //item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE)); item.setControl(createGeneralPage(folder)); item= new TabItem(folder, SWT.NONE); item.setText(Utilities.getString("ComparePreferencePage.textCompareTab.label")); //$NON-NLS-1$ //item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE)); item.setControl(createTextComparePage(folder)); initializeFields(); Dialog.applyDialogFont(folder); return folder; }
public ComparePreferencePage() { //setDescription(Utilities.getString("ComparePreferencePage.description")); //$NON-NLS-1$ setPreferenceStore(CompareUIPlugin.getDefault().getPreferenceStore()); fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), fKeys); fPreferenceChangeListener= new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { String key= event.getProperty(); if (key.equals(INITIALLY_SHOW_ANCESTOR_PANE)) { boolean b= fOverlayStore.getBoolean(INITIALLY_SHOW_ANCESTOR_PANE); if (fCompareConfiguration != null) { fCompareConfiguration.setProperty(INITIALLY_SHOW_ANCESTOR_PANE, new Boolean(b)); } } } }; fOverlayStore.addPropertyChangeListener(fPreferenceChangeListener); }
composite.setLayout(layout); addCheckBox(composite, "ComparePreferencePage.structureCompare.label", OPEN_STRUCTURE_COMPARE, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.structureOutline.label", USE_OUTLINE_VIEW, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.showMoreInfo.label", SHOW_MORE_INFO, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.ignoreWhitespace.label", IGNORE_WHITESPACE, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.saveBeforePatching.label", PREF_SAVE_ALL_EDITORS, 0); //$NON-NLS-1$
@Override public boolean performOk() { fOverlayStore.setValue(ADDED_LINES_REGEX, addedLinesRegex.getText()); fOverlayStore.setValue(REMOVED_LINES_REGEX, removedLinesRegex.getText()); editors.forEach(FieldEditor::store); fOverlayStore.propagate(); ComparePlugin.getDefault().setCappingDisabled( getPreferenceStore().getBoolean( ComparePreferencePage.CAPPING_DISABLED)); return true; }
@Override protected Control createContents(Composite parent) { PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, ICompareContextIds.COMPARE_PREFERENCE_PAGE); fOverlayStore.load(); fOverlayStore.start(); TabFolder folder= new TabFolder(parent, SWT.NONE); folder.setLayout(new TabFolderLayout()); folder.setLayoutData(new GridData(GridData.FILL_BOTH)); TabItem item= new TabItem(folder, SWT.NONE); item.setText(Utilities.getString("ComparePreferencePage.generalTab.label")); //$NON-NLS-1$ item.setControl(createGeneralPage(folder)); item= new TabItem(folder, SWT.NONE); item.setText(Utilities.getString("ComparePreferencePage.textCompareTab.label")); //$NON-NLS-1$ item.setControl(createTextComparePage(folder)); fTextCompareTab = item; initializeFields(); Dialog.applyDialogFont(folder); return folder; }
public ComparePreferencePage() { setPreferenceStore(CompareUIPlugin.getDefault().getPreferenceStore()); fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), fKeys); fPreferenceChangeListener= event -> { String key= event.getProperty(); if (key.equals(INITIALLY_SHOW_ANCESTOR_PANE)) { boolean b= fOverlayStore.getBoolean(INITIALLY_SHOW_ANCESTOR_PANE); if (fCompareConfiguration != null) { fCompareConfiguration.setProperty(INITIALLY_SHOW_ANCESTOR_PANE, Boolean.valueOf(b)); } } }; fOverlayStore.addPropertyChangeListener(fPreferenceChangeListener); }
composite.setLayout(layout); addCheckBox(composite, "ComparePreferencePage.synchronizeScrolling.label", SYNCHRONIZE_SCROLLING, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.initiallyShowAncestorPane.label", INITIALLY_SHOW_ANCESTOR_PANE, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.showPseudoConflicts.label", SHOW_PSEUDO_CONFLICTS, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.useSingleLine.label", USE_SINGLE_LINE, 0); //$NON-NLS-1$ addCheckBox(composite, "ComparePreferencePage.highlightTokenChanges.label", HIGHLIGHT_TOKEN_CHANGES, 0); //$NON-NLS-1$ previewLabel.setText(Utilities.getString("ComparePreferencePage.preview.label")); //$NON-NLS-1$ Control previewer= createPreviewer(composite); GridData gd= new GridData(GridData.FILL_BOTH); gd.widthHint= convertWidthInCharsToPixels(60); gd.heightHint= convertHeightInCharsToPixels(13); previewer.setLayoutData(gd); (IWorkbenchPreferenceContainer) getContainer(), null);
/** * This method will save all dirty editors. It will prompt the user if the Compare preference to save * dirty editors before viewing a patch is <code>false</code>. Clients can use this or provide their own * implementation. */ protected void saveAllEditors(){ saveAllEditors = IDE.saveAllEditors(new IResource[]{ResourcesPlugin.getWorkspace().getRoot()}, !ComparePreferencePage.getSaveAllEditors()); }
public void initializeDefaultPreferences() { IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore(); store.setDefault(ICompareUIConstants.PREF_NAVIGATION_END_ACTION, ICompareUIConstants.PREF_VALUE_PROMPT); store.setDefault(ICompareUIConstants.PREF_NAVIGATION_END_ACTION_LOCAL, ICompareUIConstants.PREF_VALUE_LOOP); ComparePreferencePage.initDefaults(store); }
/** * This method will save all dirty editors. It will prompt the user if the Compare preference to save * dirty editors before viewing a patch is <code>false</code>. Clients can use this or provide their own * implementation. */ protected void saveAllEditors(){ IDE.saveAllEditors(new IResource[]{ResourcesPlugin.getWorkspace().getRoot()}, !ComparePreferencePage.getSaveAllEditors()); }