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

Clean up messages

This commit is contained in:
Andrew Gvozdev 2012-05-01 10:46:48 -04:00
parent b00af18d9b
commit 27d0a92f49
9 changed files with 28 additions and 15 deletions

View file

@ -47,7 +47,7 @@ public class WizardDefaultsTab extends AbstractCPropertyTab {
show_oth.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); show_oth.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
checkBoxTryNewSD = new Button(usercomp, SWT.CHECK); checkBoxTryNewSD = new Button(usercomp, SWT.CHECK);
checkBoxTryNewSD.setText(org.eclipse.cdt.internal.ui.newui.Messages.CDTMainWizardPage_TrySD90); checkBoxTryNewSD.setText(org.eclipse.cdt.internal.ui.newui.Messages.LanguageSettingsProviders_EnableForProject);
checkBoxTryNewSD.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); checkBoxTryNewSD.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
show_sup.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOSUPP)); show_sup.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOSUPP));

View file

@ -215,6 +215,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
buildInfo.setSelectedProfileId(id); buildInfo.setSelectedProfileId(id);
handleDiscoveryProfileChanged(); handleDiscoveryProfileChanged();
} }
showStatusLine();
} }
}); });
reportProblemsCheckBox = setupCheck(autoDiscoveryGroup, reportProblemsCheckBox = setupCheck(autoDiscoveryGroup,
@ -350,12 +351,8 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
} }
private void setEnablement() { private void setEnablement() {
IStatus status = null;
ICConfigurationDescription cfgDescription = page.getResDesc().getConfiguration(); ICConfigurationDescription cfgDescription = page.getResDesc().getConfiguration();
boolean isEnabled = !LanguageSettingsProvidersPage.isLanguageSettingsProvidersEnabled(getProject()) || ScannerDiscoveryLegacySupport.isMbsLanguageSettingsProviderOn(cfgDescription); boolean isEnabled = !LanguageSettingsProvidersPage.isLanguageSettingsProvidersEnabled(getProject()) || ScannerDiscoveryLegacySupport.isMbsLanguageSettingsProviderOn(cfgDescription);
if (!isEnabled) {
status = new Status(IStatus.INFO, CUIPlugin.PLUGIN_ID, "Managed Build language settings provider is not enabled.");
}
scopeComboBox.setEnabled(isEnabled); scopeComboBox.setEnabled(isEnabled);
resTable.setEnabled(isEnabled); resTable.setEnabled(isEnabled);
@ -365,6 +362,20 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
autoDiscoveryGroup.setEnabled(isEnabled); autoDiscoveryGroup.setEnabled(isEnabled);
clearButton.setEnabled(isEnabled); clearButton.setEnabled(isEnabled);
showStatusLine();
}
private void showStatusLine() {
ICConfigurationDescription cfgDescription = page.getResDesc().getConfiguration();
boolean isEnabled = !LanguageSettingsProvidersPage.isLanguageSettingsProvidersEnabled(getProject()) || ScannerDiscoveryLegacySupport.isMbsLanguageSettingsProviderOn(cfgDescription);
IStatus status = null;
if (isEnabled) {
if (autoDiscoveryCheckBox.getSelection()) {
status = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, "This discovery method is deprecated, use 'Preprocessor Include Paths' instead.");
}
} else {
status = new Status(IStatus.INFO, CUIPlugin.PLUGIN_ID, "Managed Build language settings provider is not enabled (see 'Preprocessor Include Paths' page).");
}
fStatusLine.setErrorStatus(status); fStatusLine.setErrorStatus(status);
} }

View file

@ -95,7 +95,7 @@ public class NewMakeProjFromExistingPage extends WizardPage {
addToolchainSelector(comp); addToolchainSelector(comp);
checkBoxTryNewSD = new Button(comp, SWT.CHECK); checkBoxTryNewSD = new Button(comp, SWT.CHECK);
checkBoxTryNewSD.setText(org.eclipse.cdt.internal.ui.newui.Messages.CDTMainWizardPage_TrySD90); checkBoxTryNewSD.setText(org.eclipse.cdt.internal.ui.newui.Messages.LanguageSettingsProviders_EnableForProject);
GridData gd = new GridData(GridData.FILL_HORIZONTAL); GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2; gd.horizontalSpan = 2;
checkBoxTryNewSD.setLayoutData(gd); checkBoxTryNewSD.setLayoutData(gd);

View file

@ -97,7 +97,7 @@ public class LanguageSettingEntryDialog extends AbstractPropertyDialog {
private static final int COMBO_PATH_INDEX_FILESYSTEM = 2; private static final int COMBO_PATH_INDEX_FILESYSTEM = 2;
final private String [] pathCategories = { final private String [] pathCategories = {
Messages.LanguageSettingEntryDialog_ProjectRelative, Messages.LanguageSettingEntryDialog_ProjectPath,
Messages.LanguageSettingEntryDialog_WorkspacePath, Messages.LanguageSettingEntryDialog_WorkspacePath,
Messages.LanguageSettingEntryDialog_Filesystem, Messages.LanguageSettingEntryDialog_Filesystem,
}; };

View file

@ -451,7 +451,7 @@ public class LanguageSettingsEntriesTab extends AbstractCPropertyTab {
private void createEnableProvidersCheckBox() { private void createEnableProvidersCheckBox() {
// take the flag from master page if available (normally for resource properties) // take the flag from master page if available (normally for resource properties)
if (masterPropertyPage != null) { if (masterPropertyPage != null) {
enableProvidersCheckBox = setupCheck(usercomp, Messages.CDTMainWizardPage_TrySD90, 2, GridData.FILL_HORIZONTAL); enableProvidersCheckBox = setupCheck(usercomp, Messages.LanguageSettingsProviders_EnableForProject, 2, GridData.FILL_HORIZONTAL);
enableProvidersCheckBox.addSelectionListener(new SelectionAdapter() { enableProvidersCheckBox.addSelectionListener(new SelectionAdapter() {
@Override @Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {

View file

@ -615,7 +615,7 @@ public class LanguageSettingsProviderTab extends AbstractCPropertyTab {
private void createEnableProvidersCheckBox() { private void createEnableProvidersCheckBox() {
// take the flag from master page if available (normally for resource properties) // take the flag from master page if available (normally for resource properties)
if (masterPropertyPage != null) { if (masterPropertyPage != null) {
enableProvidersCheckBox = setupCheck(usercomp, Messages.CDTMainWizardPage_TrySD90, 2, GridData.FILL_HORIZONTAL); enableProvidersCheckBox = setupCheck(usercomp, Messages.LanguageSettingsProviders_EnableForProject, 2, GridData.FILL_HORIZONTAL);
enableProvidersCheckBox.addSelectionListener(new SelectionAdapter() { enableProvidersCheckBox.addSelectionListener(new SelectionAdapter() {
@Override @Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {

View file

@ -84,7 +84,6 @@ public class Messages extends NLS {
public static String CDTCommonProjectWizard_creatingProject; public static String CDTCommonProjectWizard_creatingProject;
public static String CDTMainWizardPage_0; public static String CDTMainWizardPage_0;
public static String CDTMainWizardPage_1; public static String CDTMainWizardPage_1;
public static String CDTMainWizardPage_TrySD90;
public static String CLocationOutputTab_0; public static String CLocationOutputTab_0;
public static String CLocationSourceTab_0; public static String CLocationSourceTab_0;
public static String CLocationTab_0; public static String CLocationTab_0;
@ -202,7 +201,7 @@ public class Messages extends NLS {
public static String LanguageSettingEntryDialog_Path; public static String LanguageSettingEntryDialog_Path;
public static String LanguageSettingEntryDialog_PreporocessorMacro; public static String LanguageSettingEntryDialog_PreporocessorMacro;
public static String LanguageSettingEntryDialog_PreprocessorMacroFile; public static String LanguageSettingEntryDialog_PreprocessorMacroFile;
public static String LanguageSettingEntryDialog_ProjectRelative; public static String LanguageSettingEntryDialog_ProjectPath;
public static String LanguageSettingEntryDialog_SelectKind; public static String LanguageSettingEntryDialog_SelectKind;
public static String LanguageSettingEntryDialog_Value; public static String LanguageSettingEntryDialog_Value;
public static String LanguageSettingEntryDialog_WorkspacePath; public static String LanguageSettingEntryDialog_WorkspacePath;
@ -211,6 +210,7 @@ public class Messages extends NLS {
public static String LanguageSettingsImages_FileDoesNotExist; public static String LanguageSettingsImages_FileDoesNotExist;
public static String LanguageSettingsImages_FolderDoesNotExist; public static String LanguageSettingsImages_FolderDoesNotExist;
public static String LanguageSettingsImages_UsingRelativePathsNotRecommended; public static String LanguageSettingsImages_UsingRelativePathsNotRecommended;
public static String LanguageSettingsProviders_EnableForProject;
public static String LanguageSettingsProvidersLabelProvider_TextDecorator_Shared; public static String LanguageSettingsProvidersLabelProvider_TextDecorator_Shared;
public static String LanguageSettingsProviderTab_AreYouSureToResetProviders; public static String LanguageSettingsProviderTab_AreYouSureToResetProviders;
public static String LanguageSettingsProviderTab_Clear; public static String LanguageSettingsProviderTab_Clear;

View file

@ -167,7 +167,7 @@ IncludeDialog_1=File:
IncludeDialog_2=Add to all configurations IncludeDialog_2=Add to all configurations
IncludeDialog_3=Add to all languages IncludeDialog_3=Add to all languages
LanguageSettingEntryDialog_Add=Add LanguageSettingEntryDialog_Add=Add
LanguageSettingEntryDialog_BuiltInFlag=Treat as Built-In (Ignore during build) LanguageSettingEntryDialog_BuiltInFlag=Treat as built-in
LanguageSettingEntryDialog_Directory=Dir: LanguageSettingEntryDialog_Directory=Dir:
LanguageSettingEntryDialog_File=File: LanguageSettingEntryDialog_File=File:
LanguageSettingEntryDialog_Filesystem=Filesystem LanguageSettingEntryDialog_Filesystem=Filesystem
@ -180,7 +180,7 @@ LanguageSettingEntryDialog_Name=Name:
LanguageSettingEntryDialog_Path=Path: LanguageSettingEntryDialog_Path=Path:
LanguageSettingEntryDialog_PreporocessorMacro=Preprocessor Macro LanguageSettingEntryDialog_PreporocessorMacro=Preprocessor Macro
LanguageSettingEntryDialog_PreprocessorMacroFile=Preprocessor Macros File LanguageSettingEntryDialog_PreprocessorMacroFile=Preprocessor Macros File
LanguageSettingEntryDialog_ProjectRelative=Project-Relative LanguageSettingEntryDialog_ProjectPath=Project Path
LanguageSettingEntryDialog_SelectKind=Select Kind: LanguageSettingEntryDialog_SelectKind=Select Kind:
LanguageSettingEntryDialog_Value=Value: LanguageSettingEntryDialog_Value=Value:
LanguageSettingEntryDialog_WorkspacePath=Workspace Path LanguageSettingEntryDialog_WorkspacePath=Workspace Path
@ -189,6 +189,8 @@ LanguageSettingsEntriesTab_Entries_Not_Editable=Setting entries for this provide
LanguageSettingsImages_FileDoesNotExist=The selected file does not exist or not accessible. LanguageSettingsImages_FileDoesNotExist=The selected file does not exist or not accessible.
LanguageSettingsImages_FolderDoesNotExist=The selected folder does not exist or not accessible. LanguageSettingsImages_FolderDoesNotExist=The selected folder does not exist or not accessible.
LanguageSettingsImages_UsingRelativePathsNotRecommended=Using relative paths is ambiguous and not recommended. It can cause unexpected effects. LanguageSettingsImages_UsingRelativePathsNotRecommended=Using relative paths is ambiguous and not recommended. It can cause unexpected effects.
LanguageSettingsProviders_EnableForProject=Enable language settings providers for this project
LanguageSettingsProvidersLabelProvider_TextDecorator_Shared=\ \ \ [ Shared ] LanguageSettingsProvidersLabelProvider_TextDecorator_Shared=\ \ \ [ Shared ]
LanguageSettingsProviderTab_AreYouSureToResetProviders=Are you sure you want to reset all customized language settings providers?\nPlease note that providers may regain entries on their own schedule. LanguageSettingsProviderTab_AreYouSureToResetProviders=Are you sure you want to reset all customized language settings providers?\nPlease note that providers may regain entries on their own schedule.
LanguageSettingsProviderTab_Clear=Clear Entries LanguageSettingsProviderTab_Clear=Clear Entries
@ -202,6 +204,7 @@ LanguageSettingsProviderTab_ShareProviders=Share setting entries between project
LanguageSettingsProviderTab_StoreEntriesInsideProject=Store entries in project settings folder (easing project miration) LanguageSettingsProviderTab_StoreEntriesInsideProject=Store entries in project settings folder (easing project miration)
LanguageSettingsProviderTab_TitleResetProviders=Reset Language Settings Providers LanguageSettingsProviderTab_TitleResetProviders=Reset Language Settings Providers
LanguageSettingsProviderTab_WorkspaceSettings=Workspace Settings LanguageSettingsProviderTab_WorkspaceSettings=Workspace Settings
LanguagesTab_0=Content type LanguagesTab_0=Content type
LanguagesTab_1=Language LanguagesTab_1=Language
LibraryPathTab_1=Add... LibraryPathTab_1=Add...
@ -304,7 +307,6 @@ StringVariableSelectionDialog_message=&Choose a variable (? = any character, * =
StringVariableSelectionDialog_columnDescription=&Variable Description: StringVariableSelectionDialog_columnDescription=&Variable Description:
CDTMainWizardPage_0=Project name cannot contain '\#' symbol CDTMainWizardPage_0=Project name cannot contain '\#' symbol
CDTMainWizardPage_1=Project category is selected. Expand the category and select a concrete project type. CDTMainWizardPage_1=Project category is selected. Expand the category and select a concrete project type.
CDTMainWizardPage_TrySD90=I want to try new upcoming version of Scanner Discovery in CDT 9.0 (sd90 v.0.9.0)
CProjectWizard_0=Add C Project Nature CProjectWizard_0=Add C Project Nature
CCProjectWizard_0=Add CC Project Nature CCProjectWizard_0=Add CC Project Nature
GeneralMessages_InternalError_ReportLogToCdtTeam=Internal error happened, report application log to CDT team. GeneralMessages_InternalError_ReportLogToCdtTeam=Internal error happened, report application log to CDT team.

View file

@ -158,7 +158,7 @@ import org.eclipse.cdt.internal.ui.newui.Messages;
show_sup.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOSUPP)); show_sup.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOSUPP));
checkBoxTryNewSD = new Button(c, SWT.CHECK); checkBoxTryNewSD = new Button(c, SWT.CHECK);
checkBoxTryNewSD.setText(Messages.CDTMainWizardPage_TrySD90); checkBoxTryNewSD.setText(Messages.LanguageSettingsProviders_EnableForProject);
/* GridData */gd = new GridData(GridData.FILL_HORIZONTAL); /* GridData */gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2; gd.horizontalSpan = 2;
checkBoxTryNewSD.setLayoutData(gd); checkBoxTryNewSD.setLayoutData(gd);