Bug 54658 Bug in Code Formatter > Line Wrapping
Code Formatter > Line Wrapping: The preview is not shown correctly from the beginning. The "Set line width for preview window" number has to be reset to another OR even THE SAME value to correct the display.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/LineWrappingTabPage.java
final Object normalSetting= fWorkingValues.get(LINE_SPLIT);
		fWorkingValues.put(LINE_SPLIT, fPreviewPreferences.get(LINE_SPLIT));
		fPreview.update();
		fWorkingValues.put(LINE_SPLIT, normalSetting);
	}
	
	protected void forceSplitChanged(boolean forceSplit) {
		String value;
		try {
			value= (String)fWorkingValues.get(fCurrentKey);
			value= DefaultCodeFormatterConstants.setForceWrapping(value, forceSplit);
			fWorkingValues.put(fCurrentKey, value); 
		} catch (Exception e) {
			fWorkingValues.put(fCurrentKey, DefaultCodeFormatterConstants.createAlignmentValue(forceSplit, DefaultCodeFormatterConstants.WRAP_NO_SPLIT, DefaultCodeFormatterConstants.INDENT_DEFAULT));
			JavaPlugin.log(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK, 
				FormatterMessages.getFormattedString("LineWrappingTabPage.error.invalid_value", fCurrentKey), e)); 
		} finally {
			doUpdatePreview();
		}
	}
	
	protected void wrappingStyleChanged(int wrappingStyle) {
		String value;
		try {
			value= (String)fWorkingValues.get(fCurrentKey);
			value= DefaultCodeFormatterConstants.setWrappingStyle(value, wrappingStyle);
			fWorkingValues.put(fCurrentKey, value);
		} catch (Exception e) {
			fWorkingValues.put(fCurrentKey, DefaultCodeFormatterConstants.createAlignmentValue(false, wrappingStyle, DefaultCodeFormatterConstants.INDENT_DEFAULT));
			JavaPlugin.log(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK,