1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

2005-04-11 Alain Magloire

Fix PR 91000: NPE in CEditorHoverConfigurationBlock
	* src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java
	* src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties
This commit is contained in:
Alain Magloire 2005-04-11 17:29:30 +00:00
parent 033cc2b06d
commit e4ecea9c92
3 changed files with 18 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2005-04-11 Alain Magloire
Fix PR 91000: NPE in CEditorHoverConfigurationBlock
* src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java
* src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties
2005-04-11 Vladimir Hirsl
Fix for PR 90193: Scanner faililng on Local/User paths as provided in Std. Make
User specified include paths (through the UI) are now created with

View file

@ -266,16 +266,18 @@ public class CEditorHoverConfigurationBlock {
if (id == null)
return;
CEditorTextHoverDescriptor[] descriptors= getContributedHovers();
HoverConfig hoverConfig = null;
int i= 0, length= fHoverConfigs.length;
while (i < length) {
if (id.equals(descriptors[i].getId())) {
fHoverConfigs[i].fIsEnabled= event.getChecked();
hoverConfig = fHoverConfigs[i];
hoverConfig.fIsEnabled= event.getChecked();
fModifierEditor.setEnabled(event.getChecked());
break;
}
i++;
}
updateStatus();
updateStatus(hoverConfig);
}
});
@ -431,7 +433,7 @@ public class CEditorHoverConfigurationBlock {
fStatus= new StatusInfo();
restoreFromPreferences();
initializeFields();
updateStatus();
updateStatus(null);
}
private void restoreFromPreferences() {
@ -501,7 +503,7 @@ public class CEditorHoverConfigurationBlock {
// update table
fHoverTableViewer.refresh(getContributedHovers()[i]);
updateStatus();
updateStatus(fHoverConfigs[i]);
}
void handleHoverListSelection() {
@ -528,7 +530,12 @@ public class CEditorHoverConfigurationBlock {
return fStatus;
}
void updateStatus() {
void updateStatus(HoverConfig hoverConfig) {
if (hoverConfig != null && hoverConfig.fIsEnabled && hoverConfig.fStateMask == -1)
fStatus= new StatusInfo(IStatus.ERROR, PreferencesMessages.getFormattedString("CEditorHoverConfigurationBlock.modifierIsNotValid", hoverConfig.fModifierString)); //$NON-NLS-1$
else
fStatus= new StatusInfo();
int i= 0;
HashMap stateMasks= new HashMap(fHoverConfigs.length);
while (fStatus.isOK() && i < fHoverConfigs.length) {

View file

@ -230,7 +230,7 @@ PathEntryVariableDialog.dialogTitle.existingVariable = Edit an Existing PathEntr
PathEntryVariableDialog.message.newVariable = Enter a new PathEntry variable name and its associated location.
PathEntryVariableDialog.message.existingVariable = Edit PathEntry variable's name and path value.
PathEntryVariableDialog.variableName = &Name:
PathEntryVariableDialog.variableName = &Name:overConfigurationBlock
PathEntryVariableDialog.variableValue = &Location:
PathEntryVariableDialog.variableNameEmptyMessage = You must provide a variable name.
PathEntryVariableDialog.variableValueEmptyMessage = You must provide a file or folder path as variable value.