diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerBlock.java index e893a3b2c1a..422d673de99 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerBlock.java @@ -6,8 +6,8 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM - Initial API and implementation - * Markus Schorn (Wind River Systems) + * IBM - Initial API and implementation + * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.ui.dialogs; @@ -77,7 +77,7 @@ public class IndexerBlock extends AbstractCOptionPage { private PreferenceScopeBlock fPrefScopeBlock; private Button fEnableIndexer; private Combo fIndexersComboBox; - private HashMap fIndexerConfigMap; + private HashMap fIndexerConfigMap; private String fTheOneIndexerID; private Composite fIndexerPageComposite; private AbstractIndexerPage fCurrentPage; @@ -95,13 +95,11 @@ public class IndexerBlock extends AbstractCOptionPage { setDescription(INDEXER_DESCRIPTION); initializeIndexerConfigMap(); } - @Override public boolean isValid() { return super.isValid() && (fCurrentPage == null || fCurrentPage.isValid()); } - @Override public String getErrorMessage() { @@ -112,7 +110,6 @@ public class IndexerBlock extends AbstractCOptionPage { return msg; } - /** * Create a profile page only on request */ @@ -133,8 +130,7 @@ public class IndexerBlock extends AbstractCOptionPage { if (fPage == null) { try { fPage= (AbstractIndexerPage) fElement.createExecutableExtension(ATTRIB_CLASS); - } - catch (Exception e) { + } catch (Exception e) { CUIPlugin.log(e); } if (fPage == null) { @@ -204,7 +200,7 @@ public class IndexerBlock extends AbstractCOptionPage { fEnableIndexer.addSelectionListener(indexerChangeListener); // add combo to select indexer - Group group= ControlFactory.createGroup(fPreferenceContent,INDEXER_COMBO_LABEL, 1); + Group group= ControlFactory.createGroup(fPreferenceContent, INDEXER_COMBO_LABEL, 1); gd= (GridData) group.getLayoutData(); gd.grabExcessHorizontalSpace= true; @@ -294,8 +290,7 @@ public class IndexerBlock extends AbstractCOptionPage { ICProjectDescription prefs= prjDescMgr.getProjectDescription(getProject(), false); selectBuildConfigInCombo(prefs.getActiveConfiguration().getName()); fBuildConfigComboBox.setEnabled(false); - } - else { + } else { // independent of the scope fBuildConfigComboBox.setEnabled(true); } @@ -310,8 +305,7 @@ public class IndexerBlock extends AbstractCOptionPage { } if (enable) { fEnableState= null; - } - else { + } else { fEnableState= ControlEnableState.disable(fPreferenceContent); } } @@ -345,7 +339,6 @@ public class IndexerBlock extends AbstractCOptionPage { names[j++]= fIndexerConfigMap.get(id).getName(); } } - @SuppressWarnings("unchecked") final Comparator collator = Collator.getInstance(); Arrays.sort(names, collator); fIndexersComboBox.setItems(names); @@ -371,7 +364,6 @@ public class IndexerBlock extends AbstractCOptionPage { ICConfigurationDescription config = configs[i]; names[i]= config.getName(); } - @SuppressWarnings("unchecked") final Comparator collator = Collator.getInstance(); Arrays.sort(names, collator); fBuildConfigComboBox.setItems(names); @@ -382,7 +374,7 @@ public class IndexerBlock extends AbstractCOptionPage { private void selectBuildConfigInCombo(String useName) { String[] names= fBuildConfigComboBox.getItems(); int selectedIndex = 0; - for (int i=0; i