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
* 
	 * @param tags		the HTML tag which confines the HTML range
	 * @param attribute	the attribute to set if the comment range is in the HTML range
	 * @param html		<code>true</code> iff the HTML tags in this HTML range
	 *                  	should be marked too, <code>false</code> otherwise
	 */
	protected final void markTagRanges(final String[] tags, final int attribute, final boolean html) {
		
		int level= 0;
		int count= 0;
		String token= null;
		CommentRange current= null;
		
		for (int index= 0; index < tags.length; index++) {
			
			level= 0;
			for (final Iterator iterator= getRanges().iterator(); iterator.hasNext();) {
				
				current= (CommentRange)iterator.next();
				count= current.getLength();
				
				if (count > 0 || level > 0) { 
					
					token= getText(current.getOffset(), current.getLength());
					level= current.markTagRange(token, tags[index], level, attribute, html);
				}
			}
		}
	}
	/**