if (PREF_FORMATTER_INDENTATION_SIZE.equals(changedKey)) {
try {
fIndentationSize = Integer.valueOf(newValue);
if (fIndentationSize < MIN_INDENT_SIZE
|| fIndentationSize > MAX_INDENT_SIZE) {
fFormatterStatus = new StatusInfo(
IStatus.ERROR,
PHPUIMessages.PHPFormatterConfigurationBlock_indentSizeErrorMessage);
} else {
setValue(PREF_FORMATTER_INDENTATION_SIZE,
String.valueOf(fIndentationSize));
fFormatterStatus = new StatusInfo();
}
} catch (NumberFormatException nfe) {
fFormatterStatus = new StatusInfo(
IStatus.ERROR,
PHPUIMessages.PHPFormatterConfigurationBlock_indentSizeErrorMessage);
}
}
if (PREF_FORMATTER_TAB_SIZE.equals(changedKey)) {
try {
fTabSize = Integer.valueOf(newValue);
if (fTabSize < MIN_INDENT_SIZE
|| fTabSize > MAX_INDENT_SIZE) {
fFormatterStatus = new StatusInfo(
IStatus.ERROR,
PHPUIMessages.PHPFormatterConfigurationBlock_tabSizeErrorMessage);
} else {
setValue(PREF_FORMATTER_TAB_SIZE,
String.valueOf(fTabSize));
fFormatterStatus = new StatusInfo();
}
} catch (NumberFormatException nfe) {
fFormatterStatus = new StatusInfo(
IStatus.ERROR,
PHPUIMessages.PHPFormatterConfigurationBlock_tabSizeErrorMessage);
}
}
if (PREF_FORMATTER_INDENTATION_WRAPPED_LINE_SIZE.equals(changedKey)) {
try {
fIndentationWrappedLineSize = Integer.valueOf(newValue);
if (fIndentationWrappedLineSize < MIN_INDENT_SIZE
|| fIndentationWrappedLineSize > MAX_INDENT_SIZE) {
fFormatterStatus = new StatusInfo(
IStatus.ERROR,
PHPUIMessages.PHPFormatterConfigurationBlock_indentSizeErrorMessage);
} else {
setValue(PREF_FORMATTER_INDENTATION_WRAPPED_LINE_SIZE,
String.valueOf(fIndentationWrappedLineSize));
fFormatterStatus = new StatusInfo();
}
} catch (NumberFormatException nfe) {
fFormatterStatus = new StatusInfo(
IStatus.ERROR,
PHPUIMessages.PHPFormatterConfigurationBlock_indentSizeErrorMessage);
}
}
if (PREF_FORMATTER_INDENTATION_ARRAY_INIT_SIZE.equals(changedKey)) {
try {
fIndentationArrayInitSize = Integer.valueOf(newValue);
if (fIndentationArrayInitSize < MIN_INDENT_SIZE
|| fIndentationArrayInitSize > MAX_INDENT_SIZE) {
fFormatterStatus = new StatusInfo(
IStatus.ERROR,
PHPUIMessages.PHPFormatterConfigurationBlock_indentSizeErrorMessage);
} else {
setValue(PREF_FORMATTER_INDENTATION_ARRAY_INIT_SIZE,
String.valueOf(fIndentationArrayInitSize));
fFormatterStatus = new StatusInfo();
}
} catch (NumberFormatException nfe) {
fFormatterStatus = new StatusInfo(
IStatus.ERROR,
PHPUIMessages.PHPFormatterConfigurationBlock_indentSizeErrorMessage);
}
} else {
return;
}
} else {
fFormatterStatus = new StatusInfo();
}
fContext.statusChanged(fFormatterStatus);
}