Bug 48975 Comment Formatter should compare values using equals()
Currently, the preference values are read and compared by reference, which only works in special circumstances.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/JavaDocRegion.java
protected static final String CODE_POSITION_CATEGORY= "__javadoc_code_position"; 
	
	private final boolean fFormatHtml;
	
	private final boolean fFormatSource;
	/**
	 * Creates a new javadoc region.
	 * 
	 * @param strategy
	 *                  The comment formatting strategy used to format this comment
	 *                  region
	 * @param position
	 *                  The typed position which forms this javadoc region
	 * @param delimiter
	 *                  The line delimiter to use in this javadoc region
	 */
	protected JavaDocRegion(final CommentFormattingStrategy strategy, final TypedPosition position, final String delimiter) {
		super(strategy, position, delimiter);
		final Map preferences= strategy.getPreferences();
		fFormatSource= preferences.get(PreferenceConstants.FORMATTER_COMMENT_FORMATSOURCE) == IPreferenceStore.TRUE;
		fFormatHtml= preferences.get(PreferenceConstants.FORMATTER_COMMENT_FORMATHTML) == IPreferenceStore.TRUE;
	}
	/*
	 * @see org.eclipse.jdt.internal.ui.text.comment.CommentRegion#applyRegion(java.lang.String,int)
	 */
	protected void applyRegion(final String indentation, final int width) {
		super.applyRegion(indentation, width);
		if (fFormatSource) {
			final ContentFormatter2 formatter= getStrategy().getFormatter();
			try {