private Preference createWrapBeforeButton(int numColumns, String message, String setting) { Preference preference= createCheckboxPref(fOptionsGroup, 1, message, setting, FALSE_TRUE); Control control= preference.getControl(); control.setVisible(false); GridData layoutData= (GridData)control.getLayoutData(); layoutData.exclude= true; layoutData.horizontalAlignment= SWT.BEGINNING; layoutData.horizontalSpan= numColumns - 1; layoutData.grabExcessHorizontalSpace= false; return preference; }
createNumberPref(lineWidthGroup, numColumns, FormatterMessages.LineWrappingTabPage_width_indent_option_default_indent_wrapped, DefaultCodeFormatterConstants.FORMATTER_CONTINUATION_INDENTATION, 0, 9999); createNumberPref(lineWidthGroup, numColumns, FormatterMessages.LineWrappingTabPage_width_indent_option_default_indent_array, DefaultCodeFormatterConstants.FORMATTER_CONTINUATION_INDENTATION_FOR_ARRAY_INITIALIZER, 0, 9999); createCheckboxPref(lineWidthGroup, numColumns, FormatterMessages.LineWrappingTabPage_do_not_join_lines, DefaultCodeFormatterConstants.FORMATTER_JOIN_WRAPPED_LINES, TRUE_FALSE); createCheckboxPref(lineWidthGroup, numColumns, FormatterMessages.LineWrappingTabPage_wrap_outer_expressions_when_nested, DefaultCodeFormatterConstants.FORMATTER_WRAP_OUTER_EXPRESSIONS_WHEN_NESTED, FALSE_TRUE);
fForceSplit.setText(FormatterMessages.LineWrappingTabPage_force_split_checkbox_text); Preference expressionWrapPositionPreference= createCheckboxPref(fOptionsGroup, 1, FormatterMessages.LineWrappingTabPage_binary_expression_wrap_operator, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, FALSE_TRUE); Control control= expressionWrapPositionPreference.getControl(); control.setVisible(false);