Summary: | [formatting] Code formatter shouldnt format pre tags in javadoc | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Robert (Kraythe) Simmons <robert.simmons> |
Component: | Text | Assignee: | JDT-Text-Inbox <jdt-text-inbox> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | Keywords: | needinfo |
Version: | 3.0 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Move to JDT/Text for comment. This is an option: per default we assume code fragments inside pre tags and format them as it would be Javadoc. You can disable this in the Code Formatter preferences: [] Format Java code snippets Get rid of deprecated state. . |
If I use a pre tag in my javadoc, the code formatter should leave the contents of the pre tag untouched. For example, the following shouldnt be changed. /** * Setter for endDateTime; The date and time that this event ends (§2.3.11). * * @param endDateTime The new value for endDateTime. * @preconditions * <pre> * endDateTime != null * and if startDateTime != null * then endDateTime > startDateTime * and endDateTime - startDateTime == duration * </pre> */ However, the code formatter currently reformats my pre to look like the following: /** * Setter for endDateTime; The date and time that this event ends * (§2.3.11). * * @param endDateTime The new value for endDateTime. @preconditions * * <pre> * endDateTime != null and if startDateTime != null then endDateTime > startDateTime and endDateTime - startDateTime == duration * </pre> */ This is clearly not the right thing to do.