Bug 97199 - [formatting] Code formatting activation in comments (using <PRE>) is case sensitive
Summary: [formatting] Code formatting activation in comments (using <PRE>) is case sen...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 trivial (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-30 05:37 EDT by Christopher Oezbek CLA
Modified: 2007-03-20 08:50 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Oezbek CLA 2005-05-30 05:37:15 EDT
The formatter only recognizes "pre" and not other capatilization like "Pre" or 
"PRE".

If...
 
/**
 * <pre>
 * public Object[] getChildren(Object parentElement) {
 *     if (parentElement instanceof MovingBox) {
 *         MovingBox box = (MovingBox) parentElement;
 *         return concat(box.getBoxes().toArray(), box.getBooks().toArray(), box
 *                 .getGames().toArray());
 *     }
 *     return EMPTY_ARRAY;
 * }
 * </pre>
 */
 
...is changed into...
 
/**
 * <Pre>
 * public Object[] getChildren(Object parentElement) {
 *     if (parentElement instanceof MovingBox) {
 *         MovingBox box = (MovingBox) parentElement;
 *         return concat(box.getBoxes().toArray(), box.getBooks().toArray(), box
 *                 .getGames().toArray());
 *     }
 *     return EMPTY_ARRAY;
 * }
 * </pre>
 */
 
The formatter turns it into:
 
/**
 * <Pre>
 *
 * public Object[] getChildren(Object parentElement) { if (parentElement
 * instanceof MovingBox) { MovingBox box = (MovingBox) parentElement; return
 * concat(box.getBoxes().toArray(), box.getBooks().toArray(), box
 * .getGames().toArray()); } return EMPTY_ARRAY; }
 *
 * </pre>
 */
Comment 1 Dani Megert CLA 2005-10-10 12:45:55 EDT
Ownership changed.
Comment 2 Olivier Thomann CLA 2007-02-17 07:32:34 EST
Released for 3.3M6.
Regression tests added in org.eclipse.jdt.core.tests.formatter.comment.JavaDocTestCase
#testMultiLineCommentCodeSnippet5/testMultiLineCommentCodeSnippet6
Comment 3 David Audel CLA 2007-03-20 08:50:15 EDT
Verified for 3.3 M6 using build I20070320-0010