mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
2004-08-26 Alain Magloire
Be on the same length as the Java Editor and Ant Editor for the Preference page. Misc warning removes, when raising the level of warnings from the compiler. * src/org/eclipse/cdt/internal/ui/preference/CEditorPreferencePage.java * src/org/eclipse/cdt/internal/ui/preference/PreferencesMessages.properties
This commit is contained in:
parent
7d8a22cfd5
commit
017a326017
20 changed files with 87 additions and 92 deletions
|
@ -1,3 +1,11 @@
|
|||
2004-08-26 Alain Magloire
|
||||
Be on the same length as the Java Editor and Ant Editor
|
||||
for the Preference page. Misc warning removes, when
|
||||
raising the level of warnings from the compiler.
|
||||
|
||||
* src/org/eclipse/cdt/internal/ui/preference/CEditorPreferencePage.java
|
||||
* src/org/eclipse/cdt/internal/ui/preference/PreferencesMessages.properties
|
||||
|
||||
2004-08-25 Chris Wiebe
|
||||
|
||||
better handling of enclosing type
|
||||
|
|
|
@ -6,7 +6,6 @@ package org.eclipse.cdt.internal.ui;
|
|||
*/
|
||||
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
import org.eclipse.cdt.ui.wizards.NewCProjectWizard;
|
||||
import org.eclipse.search.ui.SearchUI;
|
||||
import org.eclipse.ui.IFolderLayout;
|
||||
import org.eclipse.ui.IPageLayout;
|
||||
|
|
|
@ -60,7 +60,7 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS
|
|||
private TogglePresentationAction fTogglePresentation;
|
||||
private String fContextMenuId;
|
||||
|
||||
private OpenIncludeAction fOpenIncludeAction;
|
||||
OpenIncludeAction fOpenIncludeAction;
|
||||
private ToggleLinkingAction fToggleLinkingAction;
|
||||
private IncludeGroupingAction fIncludeGroupingAction;
|
||||
|
||||
|
|
|
@ -97,15 +97,15 @@ public class CEditorActionContributor extends TextEditorActionContributor {
|
|||
ResourceBundle bundle = CEditorMessages.getResourceBundle();
|
||||
|
||||
fShiftRight= new SelectionAction("ShiftRight.", ITextOperationTarget.SHIFT_RIGHT); //$NON-NLS-1$
|
||||
fShiftRight.setActionDefinitionId(ICEditorActionDefinitionIds.SHIFT_RIGHT);
|
||||
fShiftRight.setActionDefinitionId(ITextEditorActionDefinitionIds.SHIFT_RIGHT);
|
||||
CPluginImages.setImageDescriptors(fShiftRight, CPluginImages.T_LCL, CPluginImages.IMG_MENU_SHIFT_RIGHT);
|
||||
|
||||
fShiftLeft= new SelectionAction("ShiftLeft.", ITextOperationTarget.SHIFT_LEFT); //$NON-NLS-1$
|
||||
fShiftLeft.setActionDefinitionId(ICEditorActionDefinitionIds.SHIFT_LEFT);
|
||||
fShiftLeft.setActionDefinitionId(ITextEditorActionDefinitionIds.SHIFT_LEFT);
|
||||
CPluginImages.setImageDescriptors(fShiftLeft, CPluginImages.T_LCL, CPluginImages.IMG_MENU_SHIFT_LEFT);
|
||||
|
||||
fContentAssist = new RetargetTextEditorAction(bundle, "ContentAssistProposal."); //$NON-NLS-1$
|
||||
fContentAssist.setActionDefinitionId(ICEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
|
||||
fContentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
|
||||
|
||||
fAddInclude = new RetargetTextEditorAction(bundle, "AddIncludeOnSelection."); //$NON-NLS-1$
|
||||
fAddInclude.setActionDefinitionId(ICEditorActionDefinitionIds.ADD_INCLUDE);
|
||||
|
|
|
@ -170,7 +170,7 @@ public class DocumentAdapter implements IBuffer, IDocumentListener {
|
|||
private IOpenable fOwner;
|
||||
private IFile fFile;
|
||||
private ITextFileBuffer fTextFileBuffer;
|
||||
private IDocument fDocument;
|
||||
IDocument fDocument;
|
||||
|
||||
private DocumentSetCommand fSetCmd= new DocumentSetCommand();
|
||||
private DocumentReplaceCommand fReplaceCmd= new DocumentReplaceCommand();
|
||||
|
|
|
@ -60,13 +60,13 @@ public class CustomFiltersDialog extends SelectionDialog {
|
|||
private String[] fPatterns;
|
||||
private String[] fEnabledFilterIds;
|
||||
|
||||
private FilterDescriptor[] fBuiltInFilters;
|
||||
FilterDescriptor[] fBuiltInFilters;
|
||||
|
||||
private CheckboxTableViewer fCheckBoxList;
|
||||
private Button fEnableUserDefinedPatterns;
|
||||
private Text fUserDefinedPatterns;
|
||||
CheckboxTableViewer fCheckBoxList;
|
||||
Button fEnableUserDefinedPatterns;
|
||||
Text fUserDefinedPatterns;
|
||||
|
||||
private Stack fFilterDescriptorChangeHistory;
|
||||
Stack fFilterDescriptorChangeHistory;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -212,8 +212,9 @@ public class CustomFiltersDialog extends SelectionDialog {
|
|||
Object element= event.getElement();
|
||||
if (element instanceof FilterDescriptor) {
|
||||
// renew if already touched
|
||||
if (fFilterDescriptorChangeHistory.contains(element))
|
||||
if (fFilterDescriptorChangeHistory.contains(element)) {
|
||||
fFilterDescriptorChangeHistory.remove(element);
|
||||
}
|
||||
fFilterDescriptorChangeHistory.push(element);
|
||||
}
|
||||
}});
|
||||
|
@ -238,8 +239,9 @@ public class CustomFiltersDialog extends SelectionDialog {
|
|||
public void widgetSelected(SelectionEvent e) {
|
||||
fCheckBoxList.setAllChecked(true);
|
||||
fFilterDescriptorChangeHistory.clear();
|
||||
for (int i= 0; i < fBuiltInFilters.length; i++)
|
||||
for (int i= 0; i < fBuiltInFilters.length; i++) {
|
||||
fFilterDescriptorChangeHistory.push(fBuiltInFilters[i]);
|
||||
}
|
||||
}
|
||||
};
|
||||
selectButton.addSelectionListener(listener);
|
||||
|
|
|
@ -61,7 +61,7 @@ public class FilterDescriptor implements Comparable {
|
|||
private static FilterDescriptor[] fgFilterDescriptors;
|
||||
|
||||
|
||||
private IConfigurationElement fElement;
|
||||
IConfigurationElement fElement;
|
||||
|
||||
/**
|
||||
* Returns all contributed Java element filters.
|
||||
|
@ -92,7 +92,7 @@ public class FilterDescriptor implements Comparable {
|
|||
/**
|
||||
* Creates a new filter descriptor for the given configuration element.
|
||||
*/
|
||||
private FilterDescriptor(IConfigurationElement element) {
|
||||
FilterDescriptor(IConfigurationElement element) {
|
||||
fElement= element;
|
||||
// it is either a pattern filter or a custom filter
|
||||
Assert.isTrue(isPatternFilter() ^ isCustomFilter(), "An extension for extension-point org.eclipse.cdt.ui.CElementFilters does not specify a correct filter"); //$NON-NLS-1$
|
||||
|
|
|
@ -124,7 +124,7 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
|
|||
return result;
|
||||
}
|
||||
|
||||
private void doDialogFieldChanged(DialogField field) {
|
||||
void doDialogFieldChanged(DialogField field) {
|
||||
updateStatus(getValidationStatus());
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ import org.eclipse.ui.help.WorkbenchHelp;
|
|||
* CEditorHoverConfigurationBlock
|
||||
*/
|
||||
public class CEditorHoverConfigurationBlock {
|
||||
private static final String DELIMITER= PreferencesMessages.getString("CEditorHoverConfigurationBlock.delimiter"); //$NON-NLS-1$
|
||||
static final String DELIMITER= PreferencesMessages.getString("CEditorHoverConfigurationBlock.delimiter"); //$NON-NLS-1$
|
||||
|
||||
private static final int ENABLED_PROP= 0;
|
||||
private static final int MODIFIER_PROP= 1;
|
||||
|
@ -73,9 +73,9 @@ public class CEditorHoverConfigurationBlock {
|
|||
// Data structure to hold the values which are edited by the user
|
||||
private static class HoverConfig {
|
||||
|
||||
private String fModifierString;
|
||||
private boolean fIsEnabled;
|
||||
private int fStateMask;
|
||||
String fModifierString;
|
||||
boolean fIsEnabled;
|
||||
int fStateMask;
|
||||
|
||||
private HoverConfig(String modifier, int stateMask, boolean enabled) {
|
||||
fModifierString= modifier;
|
||||
|
@ -142,11 +142,11 @@ public class CEditorHoverConfigurationBlock {
|
|||
}
|
||||
|
||||
|
||||
private OverlayPreferenceStore fStore;
|
||||
private HoverConfig[] fHoverConfigs;
|
||||
private Text fModifierEditor;
|
||||
private Table fHoverTable;
|
||||
private TableViewer fHoverTableViewer;
|
||||
OverlayPreferenceStore fStore;
|
||||
HoverConfig[] fHoverConfigs;
|
||||
Text fModifierEditor;
|
||||
Table fHoverTable;
|
||||
TableViewer fHoverTableViewer;
|
||||
private TableColumn fNameColumn;
|
||||
private TableColumn fModifierColumn;
|
||||
private Text fDescription;
|
||||
|
@ -157,7 +157,7 @@ public class CEditorHoverConfigurationBlock {
|
|||
|
||||
private StatusInfo fStatus;
|
||||
|
||||
private Map fCheckBoxes= new HashMap();
|
||||
Map fCheckBoxes= new HashMap();
|
||||
private SelectionListener fCheckBoxListener= new SelectionListener() {
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
Button button= (Button) e.widget;
|
||||
|
@ -370,7 +370,7 @@ public class CEditorHoverConfigurationBlock {
|
|||
layouter.addColumnData(new ColumnWeightData(60, true));
|
||||
}
|
||||
|
||||
private CEditorTextHoverDescriptor[] getContributedHovers() {
|
||||
CEditorTextHoverDescriptor[] getContributedHovers() {
|
||||
CEditorTextHoverDescriptor[] hoverDescriptors= CUIPlugin.getDefault().getCEditorTextHoverDescriptors();
|
||||
|
||||
// Move Best Match hover to front
|
||||
|
@ -509,7 +509,7 @@ public class CEditorHoverConfigurationBlock {
|
|||
}
|
||||
}
|
||||
|
||||
private void handleModifierModified() {
|
||||
void handleModifierModified() {
|
||||
int i= fHoverTable.getSelectionIndex();
|
||||
String modifiers= fModifierEditor.getText();
|
||||
fHoverConfigs[i].fModifierString= modifiers;
|
||||
|
@ -525,7 +525,7 @@ public class CEditorHoverConfigurationBlock {
|
|||
updateStatus();
|
||||
}
|
||||
|
||||
private void handleHoverListSelection() {
|
||||
void handleHoverListSelection() {
|
||||
int i= fHoverTable.getSelectionIndex();
|
||||
|
||||
if (i < 0) {
|
||||
|
@ -549,7 +549,7 @@ public class CEditorHoverConfigurationBlock {
|
|||
return fStatus;
|
||||
}
|
||||
|
||||
private void updateStatus() {
|
||||
void updateStatus() {
|
||||
int i= 0;
|
||||
HashMap stateMasks= new HashMap(fHoverConfigs.length);
|
||||
while (fStatus.isOK() && i < fHoverConfigs.length) {
|
||||
|
|
|
@ -60,6 +60,7 @@ import org.eclipse.ui.IWorkbench;
|
|||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||
import org.eclipse.ui.help.WorkbenchHelp;
|
||||
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
|
||||
import org.eclipse.ui.texteditor.AbstractTextEditor;
|
||||
|
||||
/*
|
||||
* The page for setting the editor options.
|
||||
|
@ -133,7 +134,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
|
||||
protected List fAppearanceColorList;
|
||||
protected ColorEditor fAppearanceColorEditor;
|
||||
private Button fAppearanceColorDefault;
|
||||
Button fAppearanceColorDefault;
|
||||
private CEditorHoverConfigurationBlock fCEditorHoverConfigurationBlock;
|
||||
private FoldingConfigurationBlock fFoldingConfigurationBlock;
|
||||
|
||||
|
@ -146,10 +147,10 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
|
||||
private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys() {
|
||||
ArrayList overlayKeys = new ArrayList();
|
||||
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CEditor.PREFERENCE_COLOR_FOREGROUND));
|
||||
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,CEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT));
|
||||
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CEditor.PREFERENCE_COLOR_BACKGROUND));
|
||||
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,CEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT));
|
||||
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND));
|
||||
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT));
|
||||
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND));
|
||||
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT));
|
||||
|
||||
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SELECTION_FOREGROUND_COLOR));
|
||||
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SELECTION_FOREGROUND_DEFAULT_COLOR));
|
||||
|
@ -224,9 +225,9 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN, 80);
|
||||
PreferenceConverter.setDefault(store, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR, new RGB(176, 180, 185));
|
||||
|
||||
store.setDefault(CEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT, true);
|
||||
store.setDefault(AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT, true);
|
||||
|
||||
store.setDefault(CEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, true);
|
||||
store.setDefault(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, true);
|
||||
|
||||
store.setDefault(CSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 4);
|
||||
|
||||
|
@ -285,16 +286,16 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
*
|
||||
*/
|
||||
private void initializeDefaultColors() {
|
||||
if (!getPreferenceStore().contains(CEditor.PREFERENCE_COLOR_FOREGROUND)) {
|
||||
if (!getPreferenceStore().contains(AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND)) {
|
||||
RGB rgb= getControl().getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND).getRGB();
|
||||
PreferenceConverter.setDefault(fOverlayStore, CEditor.PREFERENCE_COLOR_FOREGROUND, rgb);
|
||||
PreferenceConverter.setDefault(getPreferenceStore(), CEditor.PREFERENCE_COLOR_FOREGROUND, rgb);
|
||||
PreferenceConverter.setDefault(fOverlayStore, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND, rgb);
|
||||
PreferenceConverter.setDefault(getPreferenceStore(), AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND, rgb);
|
||||
}
|
||||
|
||||
if (!getPreferenceStore().contains(CEditor.PREFERENCE_COLOR_BACKGROUND)) {
|
||||
if (!getPreferenceStore().contains(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND)) {
|
||||
RGB rgb= getControl().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB();
|
||||
PreferenceConverter.setDefault(fOverlayStore, CEditor.PREFERENCE_COLOR_BACKGROUND, rgb);
|
||||
PreferenceConverter.setDefault(getPreferenceStore(), CEditor.PREFERENCE_COLOR_BACKGROUND, rgb);
|
||||
PreferenceConverter.setDefault(fOverlayStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, rgb);
|
||||
PreferenceConverter.setDefault(getPreferenceStore(), AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, rgb);
|
||||
}
|
||||
|
||||
if (!getPreferenceStore().contains(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SELECTION_BACKGROUND_COLOR)) {
|
||||
|
@ -332,29 +333,22 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
fBoldCheckBox.setSelection(fOverlayStore.getBoolean(key + "_bold")); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
private Control createColorPage(Composite parent) {
|
||||
private Control createSyntaxPage(Composite parent) {
|
||||
|
||||
Composite colorComposite = new Composite(parent, SWT.NULL);
|
||||
colorComposite.setLayout(new GridLayout());
|
||||
|
||||
Composite backgroundComposite = new Composite(colorComposite, SWT.NULL);
|
||||
Group backgroundComposite= new Group(colorComposite, SWT.SHADOW_ETCHED_IN);
|
||||
GridLayout layout = new GridLayout();
|
||||
layout.marginHeight = 0;
|
||||
layout.marginWidth = 0;
|
||||
layout.numColumns = 2;
|
||||
layout.numColumns = 3;
|
||||
backgroundComposite.setLayout(layout);
|
||||
|
||||
Label label = new Label(backgroundComposite, SWT.NULL);
|
||||
label.setText(PreferencesMessages.getString("CEditorPreferencePage.colorPage.backgroundColor")); //$NON-NLS-1$
|
||||
GridData gd = new GridData();
|
||||
gd.horizontalSpan = 2;
|
||||
label.setLayoutData(gd);
|
||||
backgroundComposite.setText(PreferencesMessages.getString("CEditorPreferencePage.colorPage.backgroundColor"));//$NON-NLS-1$
|
||||
|
||||
SelectionListener backgroundSelectionListener = new SelectionListener() {
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
boolean custom = fBackgroundCustomRadioButton.getSelection();
|
||||
fBackgroundColorButton.setEnabled(custom);
|
||||
fOverlayStore.setValue(CEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, !custom);
|
||||
fOverlayStore.setValue(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, !custom);
|
||||
}
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
}
|
||||
|
@ -362,9 +356,6 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
|
||||
fBackgroundDefaultRadioButton = new Button(backgroundComposite, SWT.RADIO | SWT.LEFT);
|
||||
fBackgroundDefaultRadioButton.setText(PreferencesMessages.getString("CEditorPreferencePage.colorPage.systemDefault")); //$NON-NLS-1$
|
||||
gd = new GridData();
|
||||
gd.horizontalSpan = 2;
|
||||
fBackgroundDefaultRadioButton.setLayoutData(gd);
|
||||
fBackgroundDefaultRadioButton.addSelectionListener(backgroundSelectionListener);
|
||||
|
||||
fBackgroundCustomRadioButton = new Button(backgroundComposite, SWT.RADIO | SWT.LEFT);
|
||||
|
@ -373,11 +364,8 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
|
||||
fBackgroundColorEditor = new ColorEditor(backgroundComposite);
|
||||
fBackgroundColorButton = fBackgroundColorEditor.getButton();
|
||||
gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||
gd.horizontalAlignment = GridData.BEGINNING;
|
||||
fBackgroundColorButton.setLayoutData(gd);
|
||||
|
||||
label = new Label(colorComposite, SWT.LEFT);
|
||||
Label label = new Label(colorComposite, SWT.LEFT);
|
||||
label.setText(PreferencesMessages.getString("CEditorPreferencePage.colorPage.foreground")); //$NON-NLS-1$
|
||||
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
|
||||
|
@ -387,7 +375,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
layout.marginHeight = 0;
|
||||
layout.marginWidth = 0;
|
||||
editorComposite.setLayout(layout);
|
||||
gd = new GridData(GridData.FILL_BOTH);
|
||||
GridData gd = new GridData(GridData.FILL_BOTH);
|
||||
editorComposite.setLayoutData(gd);
|
||||
|
||||
fList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL);
|
||||
|
@ -460,7 +448,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
public void widgetSelected(SelectionEvent e) {
|
||||
PreferenceConverter.setValue(
|
||||
fOverlayStore,
|
||||
CEditor.PREFERENCE_COLOR_BACKGROUND,
|
||||
AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND,
|
||||
fBackgroundColorEditor.getColorValue());
|
||||
}
|
||||
});
|
||||
|
@ -502,8 +490,8 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
fOverlayStore.addPropertyChangeListener(new IPropertyChangeListener() {
|
||||
public void propertyChange(PropertyChangeEvent event) {
|
||||
String p = event.getProperty();
|
||||
if (p.equals(CEditor.PREFERENCE_COLOR_BACKGROUND)
|
||||
|| p.equals(CEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)) {
|
||||
if (p.equals(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND)
|
||||
|| p.equals(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)) {
|
||||
initializeViewerColors(fPreviewViewer);
|
||||
}
|
||||
|
||||
|
@ -531,9 +519,9 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
|
||||
// ---------- background color ----------------------
|
||||
Color color =
|
||||
store.getBoolean(CEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)
|
||||
store.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)
|
||||
? null
|
||||
: createColor(store, CEditor.PREFERENCE_COLOR_BACKGROUND, styledText.getDisplay());
|
||||
: createColor(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, styledText.getDisplay());
|
||||
styledText.setBackground(color);
|
||||
|
||||
if (fBackgroundColor != null)
|
||||
|
@ -604,7 +592,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
}
|
||||
}
|
||||
|
||||
private Control createBehaviorPage(Composite parent) {
|
||||
private Control createAppearancePage(Composite parent) {
|
||||
|
||||
Composite behaviorComposite = new Composite(parent, SWT.NONE);
|
||||
GridLayout layout = new GridLayout();
|
||||
|
@ -839,11 +827,11 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
|
||||
TabItem item = new TabItem(folder, SWT.NONE);
|
||||
item.setText(PreferencesMessages.getString("CEditorPreferencePage.generalTabTitle")); //$NON-NLS-1$
|
||||
item.setControl(createBehaviorPage(folder));
|
||||
item.setControl(createAppearancePage(folder));
|
||||
|
||||
item = new TabItem(folder, SWT.NONE);
|
||||
item.setText(PreferencesMessages.getString("CEditorPreferencePage.colorsTabTitle")); //$NON-NLS-1$
|
||||
item.setControl(createColorPage(folder));
|
||||
item.setControl(createSyntaxPage(folder));
|
||||
|
||||
item = new TabItem(folder, SWT.NONE);
|
||||
item.setText(PreferencesMessages.getString("CEditorPreferencePage.contentAssistTabTitle")); //$NON-NLS-1$
|
||||
|
@ -938,10 +926,10 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
t.setText(fOverlayStore.getString(key));
|
||||
}
|
||||
|
||||
RGB rgb = PreferenceConverter.getColor(fOverlayStore, CEditor.PREFERENCE_COLOR_BACKGROUND);
|
||||
RGB rgb = PreferenceConverter.getColor(fOverlayStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND);
|
||||
fBackgroundColorEditor.setColorValue(rgb);
|
||||
|
||||
boolean default_ = fOverlayStore.getBoolean(CEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT);
|
||||
boolean default_ = fOverlayStore.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT);
|
||||
fBackgroundDefaultRadioButton.setSelection(default_);
|
||||
fBackgroundCustomRadioButton.setSelection(!default_);
|
||||
fBackgroundColorButton.setEnabled(!default_);
|
||||
|
|
|
@ -128,11 +128,11 @@ public class CFileTypeDialog extends Dialog {
|
|||
return CCorePlugin.getDefault().getResolverModel();
|
||||
}
|
||||
|
||||
private Button getOkayButton() {
|
||||
Button getOkayButton() {
|
||||
return getButton(IDialogConstants.OK_ID);
|
||||
}
|
||||
|
||||
private String getPatternFromControl() {
|
||||
String getPatternFromControl() {
|
||||
return fTextPattern.getText().trim();
|
||||
}
|
||||
|
||||
|
|
|
@ -10,12 +10,8 @@
|
|||
***********************************************************************/
|
||||
package org.eclipse.cdt.internal.ui.preferences;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.filetype.ICFileTypeAssociation;
|
||||
import org.eclipse.cdt.core.filetype.ICFileTypeResolver;
|
||||
import org.eclipse.cdt.core.filetype.IResolverModel;
|
||||
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||
|
|
|
@ -41,7 +41,7 @@ public class CSearchPreferencePage extends PreferencePage
|
|||
implements
|
||||
IWorkbenchPreferencePage {
|
||||
|
||||
private Combo fExternLinks;
|
||||
Combo fExternLinks;
|
||||
private Button fExternEnabled;
|
||||
|
||||
protected OverlayPreferenceStore fOverlayStore;
|
||||
|
|
|
@ -340,7 +340,7 @@ public class EditTemplateDialog extends StatusDialog {
|
|||
|
||||
control.getAccessible().addAccessibleListener(new AccessibleAdapter() {
|
||||
public void getName(AccessibleEvent e) {
|
||||
e.result = TemplateMessages.getString("EditTemplateDialog.pattern");
|
||||
e.result = TemplateMessages.getString("EditTemplateDialog.pattern"); //$NON-NLS-1$
|
||||
}});
|
||||
|
||||
viewer.addTextListener(new ITextListener() {
|
||||
|
|
|
@ -61,9 +61,9 @@ TodoTaskInputDialog.error.noSpace=Name can not start or end with a whitespace.
|
|||
|
||||
CEditorPreferencePage.cCommentTaskTags=Task Tags
|
||||
|
||||
CEditorPreferencePage.generalTabTitle=&General
|
||||
CEditorPreferencePage.generalTabTitle=Appeara&nce
|
||||
CEditorPreferencePage.annotationTabTitle= &Annotations
|
||||
CEditorPreferencePage.colorsTabTitle=&Colors
|
||||
CEditorPreferencePage.colorsTabTitle=Synta&x
|
||||
CEditorPreferencePage.contentAssistTabTitle=Content A&ssist
|
||||
|
||||
CEditorPreferencePage.invalid_input=Invalid input.
|
||||
|
|
|
@ -319,7 +319,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
|
||||
control.getAccessible().addAccessibleListener(new AccessibleAdapter() {
|
||||
public void getName(AccessibleEvent e) {
|
||||
e.result = TemplateMessages.getString("TemplatePreferencePage.preview");
|
||||
e.result = TemplateMessages.getString("TemplatePreferencePage.preview"); //$NON-NLS-1$
|
||||
}});
|
||||
|
||||
return viewer;
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.eclipse.swt.widgets.Table;
|
|||
|
||||
import org.eclipse.jface.viewers.ITableLabelProvider;
|
||||
import org.eclipse.jface.viewers.LabelProvider;
|
||||
import org.eclipse.jface.window.Window;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.CCorePreferenceConstants;
|
||||
|
@ -288,14 +289,14 @@ public class TodoTaskConfigurationBlock extends OptionsConfigurationBlock {
|
|||
fWorkingValues.put(PREF_TRANSLATION_TASK_PRIORITIES, prios.toString());
|
||||
}
|
||||
|
||||
private void doTodoButtonPressed(int index) {
|
||||
void doTodoButtonPressed(int index) {
|
||||
TodoTask edited= null;
|
||||
if (index != 0) {
|
||||
edited= (TodoTask) fTodoTasksList.getSelectedElements().get(0);
|
||||
}
|
||||
|
||||
TodoTaskInputDialog dialog= new TodoTaskInputDialog(getShell(), edited, fTodoTasksList.getElements());
|
||||
if (dialog.open() == TodoTaskInputDialog.OK) {
|
||||
if (dialog.open() == Window.OK) {
|
||||
if (edited != null) {
|
||||
fTodoTasksList.replaceElement(edited, dialog.getResult());
|
||||
} else {
|
||||
|
|
|
@ -135,7 +135,7 @@ public class TodoTaskInputDialog extends StatusDialog {
|
|||
return composite;
|
||||
}
|
||||
|
||||
private void doValidation() {
|
||||
void doValidation() {
|
||||
StatusInfo status= new StatusInfo();
|
||||
String newText= fNameDialogField.getText();
|
||||
if (newText.length() == 0) {
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.eclipse.jface.preference.IPreferencePage;
|
|||
import org.eclipse.jface.preference.PreferenceDialog;
|
||||
import org.eclipse.jface.preference.PreferenceManager;
|
||||
import org.eclipse.jface.preference.PreferenceNode;
|
||||
import org.eclipse.jface.window.Window;
|
||||
|
||||
import org.eclipse.ui.dialogs.PropertyPage;
|
||||
import org.eclipse.ui.help.WorkbenchHelp;
|
||||
|
@ -53,7 +54,7 @@ public class TodoTaskPropertyPage extends PropertyPage {
|
|||
private SelectionButtonDialogField fUseWorkspaceSettings;
|
||||
private SelectionButtonDialogField fChangeWorkspaceSettings;
|
||||
private SelectionButtonDialogField fUseProjectSettings;
|
||||
private IStatus fBlockStatus;
|
||||
IStatus fBlockStatus;
|
||||
|
||||
|
||||
public TodoTaskPropertyPage() {
|
||||
|
@ -139,7 +140,7 @@ public class TodoTaskPropertyPage extends PropertyPage {
|
|||
return fUseProjectSettings.isSelected();
|
||||
}
|
||||
|
||||
private void doDialogFieldChanged(DialogField field) {
|
||||
void doDialogFieldChanged(DialogField field) {
|
||||
if (field == fChangeWorkspaceSettings) {
|
||||
TodoTaskPreferencePage page= new TodoTaskPreferencePage();
|
||||
showPreferencePage(TodoTaskPreferencePage.ID, page);
|
||||
|
@ -151,7 +152,7 @@ public class TodoTaskPropertyPage extends PropertyPage {
|
|||
/**
|
||||
* Method statusChanged.
|
||||
*/
|
||||
private void doStatusChanged() {
|
||||
void doStatusChanged() {
|
||||
updateStatus(useProjectSettings() ? fBlockStatus : new StatusInfo());
|
||||
}
|
||||
|
||||
|
@ -210,7 +211,7 @@ public class TodoTaskPropertyPage extends PropertyPage {
|
|||
public void run() {
|
||||
dialog.create();
|
||||
dialog.setMessage(targetNode.getLabelText());
|
||||
result[0]= (dialog.open() == PreferenceDialog.OK);
|
||||
result[0]= (dialog.open() == Window.OK);
|
||||
}
|
||||
});
|
||||
return result[0];
|
||||
|
|
|
@ -49,7 +49,7 @@ public class SourceViewerInformationControl implements IInformationControl, IInf
|
|||
/** Border thickness in pixels. */
|
||||
private static final int BORDER= 1;
|
||||
/** The control's shell */
|
||||
private Shell fShell;
|
||||
Shell fShell;
|
||||
/** The control's text widget */
|
||||
private StyledText fText;
|
||||
/** The control's source viewer */
|
||||
|
|
Loading…
Add table
Reference in a new issue