Bug 45465 [formatting] New Formatter does not respect non javadoc @tags lines
For example, given a javadoc with tags that are not recognized, (i.e., xdoclet tags for instance): /** * @hibernate.set * lazy="true" * table="GUJArticleCategorization" * cascade="save-update" * @hibernate.collection-key * column="articleId" * @hibernate.collection-many-to-many * class="br.com.guj.model.Category" * column="categoryId" * * @return categorias deste artigo */ public Category getCategory() { return this.category; } After reformatting: /** * @hibernate.set lazy="true" table="GUJArticleCategorization" * cascade="save-update" @hibernate.collection-key column="articleId" * @hibernate.collection-many-to-many class="br.com.guj.model.Category" * column="categoryId" * * @return categorias deste artigo */ public Category getCategory() { return this.category; } Everything in a single line until it reachs the line size limit And there is NO option that can prevent this reformat. XDoclet will not recognize tags like this, if there is some text before them! Tested in M4. linux motif and winXP
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/JavaDocRegion.java
private final boolean fFormatHtml;
	
	private final boolean fFormatSource;
	
	
	private boolean fSkipFormatting= false;
 	/**
 	 * Creates a new Javadoc region.
 	 * 
	 * @param document
	 *                   The document which contains the comment region
 	 * @param position
	 *                   The position of this comment region in the document
 	 * @param delimiter
	 *                   The line delimiter of this comment region
	 * @param preferences
	 *                   The formatting preferences for this region
	 * @param textMeasurement
	 *                   The text measurement. Can be <code>null</code>.
 	 */	
	protected JavaDocRegion(final IDocument document, final TypedPosition position, final String delimiter, final Map preferences, final ITextMeasurement textMeasurement) {
		super(document, position, delimiter, preferences, textMeasurement);
		fFormatSource= IPreferenceStore.TRUE.equals(preferences.get(PreferenceConstants.FORMATTER_COMMENT_FORMATSOURCE));
		fFormatHtml= IPreferenceStore.TRUE.equals(preferences.get(PreferenceConstants.FORMATTER_COMMENT_FORMATHTML));
	}
	/**
	 * @inheritDoc
	 */
	protected boolean canFormat(final CommentRange previous, final CommentRange next) {