1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 08:46:02 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-05-23 21:07:44 +00:00
parent a69e4f47a1
commit 25dd44749e

View file

@ -96,13 +96,11 @@ public class IndexerBlock extends AbstractCOptionPage {
initializeIndexerConfigMap();
}
@Override
public boolean isValid() {
return super.isValid() && (fCurrentPage == null || fCurrentPage.isValid());
}
@Override
public String getErrorMessage() {
String msg = super.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) {
@ -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<Object> 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<Object> collator = Collator.getInstance();
Arrays.sort(names, collator);
fBuildConfigComboBox.setItems(names);
@ -398,8 +390,7 @@ public class IndexerBlock extends AbstractCOptionPage {
if (getIndexerName(indexerId) == null) {
if (fCurrentProperties != null) {
props= fCurrentProperties;
}
else {
} else {
props= IndexerPreferences.getProperties(getProject(), IndexerPreferences.SCOPE_INSTANCE);
}
}
@ -479,7 +470,6 @@ public class IndexerBlock extends AbstractCOptionPage {
fCurrentPage= page;
}
/**
* Adds all the contributed Indexer Pages to a map
*/
@ -552,11 +542,10 @@ public class IndexerBlock extends AbstractCOptionPage {
ICProjectDescription prefs= prjDescMgr.getProjectDescription(getProject(), true);
if (scope == IndexerPreferences.SCOPE_INSTANCE) {
prefs.useDefaultConfigurationRelations();
}
else {
prefs.setConfigurationRelations(useActive
? ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE
: ICProjectDescriptionPreferences.CONFIGS_INDEPENDENT);
} else {
prefs.setConfigurationRelations(useActive ?
ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE :
ICProjectDescriptionPreferences.CONFIGS_INDEPENDENT);
}
if (!useActive) {
final ICConfigurationDescription config= prefs.getConfigurationByName(fBuildConfigComboBox.getText());
@ -575,8 +564,7 @@ public class IndexerBlock extends AbstractCOptionPage {
if (fPrefScopeBlock != null) {
fPrefScopeBlock.setInstanceScope();
onPreferenceScopeChange();
}
else {
} else {
fCurrentProperties= IndexerPreferences.getDefaultIndexerProperties();
updateForNewProperties(IndexerPreferences.SCOPE_INSTANCE);
}
@ -612,8 +600,7 @@ public class IndexerBlock extends AbstractCOptionPage {
if (container instanceof ICOptionContainerExtension) {
try {
return ((ICOptionContainerExtension) container).getProjectHandle();
}
catch (Exception e) {
} catch (Exception e) {
return null;
}
}