createStringField(generalGroup,
CodeFormatterConstants.FORMATTER_TAB_SIZE.key,
createNumberField(FormatterMessages.IndentationGroup_tab_size, 2)
);
final NumberField indentationSizeField = createNumberField(
FormatterMessages.IndentationGroup_indent_size, 2);
createStringField(generalGroup,
CodeFormatterConstants.FORMATTER_INDENTATION_SPACES_SIZE.key,
indentationSizeField
);
IFieldValueListener indentModeValueListener = new IFieldValueListener() {
@Override
public void fieldValueChanged() {
boolean enabled = !areEqual(indentModeField.getFieldValue(), CodeFormatterConstants.TAB);
indentationSizeField.setEnabled(enabled);
}
};
indentModeField.addValueChangedListener(indentModeValueListener);
indentModeValueListener.fieldValueChanged();
}