From fb443eac630e9b5b8e7e3dd42da2417fcaf2d7da Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Mon, 18 May 2009 03:47:30 +0000 Subject: [PATCH] Adjusted appearance of the Indexer preference page. Bug 274777. --- .../ui/preferences/AbstractPreferencePage.java | 18 +++++------------- .../cdt/ui/dialogs/AbstractIndexerPage.java | 12 +----------- .../cdt/ui/dialogs/DialogsMessages.properties | 6 +++--- 3 files changed, 9 insertions(+), 27 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/AbstractPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/AbstractPreferencePage.java index e51614364b0..fdbc1c90799 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/AbstractPreferencePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/AbstractPreferencePage.java @@ -141,7 +141,7 @@ public abstract class AbstractPreferencePage extends PreferencePage implements I return checkBox; } - protected Group addGroupBox(Composite parent, String label, int nColumns ){ + protected Group addGroupBox(Composite parent, String label, int nColumns) { Group group = new Group(parent, SWT.NONE); group.setText(label); GridLayout layout = new GridLayout(); @@ -153,8 +153,8 @@ public abstract class AbstractPreferencePage extends PreferencePage implements I return group; } - protected Control addTextField(Composite composite, String label, String key, int textLimit, int indentation, boolean isNumber) { - + protected Control addTextField(Composite composite, String label, String key, int textLimit, + int indentation, boolean isNumber) { Label labelControl = new Label(composite, SWT.NONE); labelControl.setText(label); GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); @@ -177,8 +177,8 @@ public abstract class AbstractPreferencePage extends PreferencePage implements I return textControl; } - protected void addComboBox(Composite composite, String label, String key, int textLimit, int indentation) { - + protected void addComboBox(Composite composite, String label, String key, int textLimit, + int indentation) { Label labelControl = new Label(composite, SWT.NONE); labelControl.setText(label); GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); @@ -194,7 +194,6 @@ public abstract class AbstractPreferencePage extends PreferencePage implements I comboControl.setLayoutData(gd); fComboBoxes.put(comboControl, key); comboControl.addModifyListener(fComboBoxListener); // TODO: When will the listener be removed? - } protected void addFiller(Composite composite) { @@ -298,9 +297,6 @@ public abstract class AbstractPreferencePage extends PreferencePage implements I return composite; } - /** - * - */ public AbstractPreferencePage() { super(); setPreferenceStore(PreferenceConstants.getPreferenceStore()); @@ -310,7 +306,6 @@ public abstract class AbstractPreferencePage extends PreferencePage implements I protected abstract OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys(); protected void initializeFields() { - Iterator e = fColorButtons.keySet().iterator(); while (e.hasNext()) { ColorSelector c = (ColorSelector) e.next(); @@ -343,8 +338,6 @@ public abstract class AbstractPreferencePage extends PreferencePage implements I } } - - /* * (non-Javadoc) * @@ -384,5 +377,4 @@ public abstract class AbstractPreferencePage extends PreferencePage implements I } super.dispose(); } - } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractIndexerPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractIndexerPage.java index 58100987bb3..9bebf8a0c81 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractIndexerPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractIndexerPage.java @@ -28,7 +28,6 @@ import org.eclipse.cdt.utils.ui.controls.ControlFactory; import org.eclipse.cdt.internal.core.model.CProject; import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences; - /** * @author Bogdan Gheorghe */ @@ -198,15 +197,6 @@ public abstract class AbstractIndexerPage extends AbstractCOptionPage { fSkipMacroReferences.setEnabled(!skipReferences); } } - if (fAllSources != null) { - final boolean all= fAllSources.getSelection(); - if (fAllHeadersDefault != null) { - fAllHeadersDefault.setEnabled(all); - } - if (fAllHeadersAlt != null) { - fAllHeadersAlt.setEnabled(all); - } - } } private String getNotNull(Properties properties, String key) { @@ -219,7 +209,7 @@ public abstract class AbstractIndexerPage extends AbstractCOptionPage { private Text createParseUpFrontTextField(Composite page) { Label l= ControlFactory.createLabel(page, DialogsMessages.AbstractIndexerPage_indexUpFront); - ((GridData) l.getLayoutData()).verticalIndent=5; + ((GridData) l.getLayoutData()).verticalIndent= 5; return ControlFactory.createTextField(page); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/DialogsMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/DialogsMessages.properties index dbb11113516..6521ff61578 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/DialogsMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/DialogsMessages.properties @@ -14,10 +14,10 @@ PreferenceScopeBlock_enableProjectSettings=Enable project specific settings PreferenceScopeBlock_storeWithProject=Store settings with project PreferenceScopeBlock_preferenceLink=Configure Workspace Settings... AbstractIndexerPage_heuristicIncludes=Allow heuristic resolution of includes -AbstractIndexerPage_indexAllFiles=Index all sources, including files that are not part of the build +AbstractIndexerPage_indexAllFiles=Index source files not included in the build AbstractIndexerPage_indexAllHeaders=Index unused headers -AbstractIndexerPage_indexAllHeadersC=Index unused headers as c-files -AbstractIndexerPage_indexAllHeadersCpp=Index unused headers as c++-files +AbstractIndexerPage_indexAllHeadersC=Index unused headers as C files +AbstractIndexerPage_indexAllHeadersCpp=Index unused headers as C++ files AbstractIndexerPage_skipAllReferences=Skip all references (Call Hierarchy and Search will not work) AbstractIndexerPage_skipImplicitReferences=Skip implicit references (e.g. overloaded operators) AbstractIndexerPage_skipTypeReferences=Skip type references (Search for type references will not work)