View | Details | Raw Unified | Return to bug 231060
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java (+11 lines)
Lines 137-142 Link Here
137
			char previousChar = 0;
137
			char previousChar = 0;
138
			int invalidTagLineEnd = -1;
138
			int invalidTagLineEnd = -1;
139
			int invalidInlineTagLineEnd = -1;
139
			int invalidInlineTagLineEnd = -1;
140
			boolean lineHasStar = true;
140
			boolean pushText = (this.kind & TEXT_PARSE) != 0;
141
			boolean pushText = (this.kind & TEXT_PARSE) != 0;
141
			boolean verifText = (this.kind & TEXT_VERIF) != 0;
142
			boolean verifText = (this.kind & TEXT_VERIF) != 0;
142
			boolean isDomParser = (this.kind & DOM_PARSER) != 0;
143
			boolean isDomParser = (this.kind & DOM_PARSER) != 0;
Lines 273-278 Link Here
273
							}
274
							}
274
						}
275
						}
275
						this.lineStarted = false;
276
						this.lineStarted = false;
277
						lineHasStar = false;
276
						// Fix bug 51650
278
						// Fix bug 51650
277
						this.textStart = -1;
279
						this.textStart = -1;
278
						break;
280
						break;
Lines 332-337 Link Here
332
					case '*' :
334
					case '*' :
333
						// Store the star position as text start while formatting
335
						// Store the star position as text start while formatting
334
						this.starPosition = previousPosition;
336
						this.starPosition = previousPosition;
337
						if (isDomParser || isFormatterParser) {
338
							if (lineHasStar && !this.lineStarted) {
339
								this.lineStarted = true;
340
								this.textStart = previousPosition;
341
							}
342
							if (!this.lineStarted) {
343
								lineHasStar = true;
344
							}
345
						}
335
						break;
346
						break;
336
					case '\u000c' :	/* FORM FEED               */
347
					case '\u000c' :	/* FORM FEED               */
337
					case ' ' :			/* SPACE                   */
348
					case ' ' :			/* SPACE                   */
(-)src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsMassiveTests.java (-8 / +15 lines)
Lines 127-143 Link Here
127
 * <ul>
127
 * <ul>
128
 * 	<li>3.0 performance workspace (9951 units):<ul>
128
 * 	<li>3.0 performance workspace (9951 units):<ul>
129
 * 		<li>0 error</li>
129
 * 		<li>0 error</li>
130
 * 		<li>5 failures</li>
130
 * 		<li>0 failures</li>
131
 * 		<li>8 failures due to old formatter</li>
131
 * 		<li>8 failures due to old formatter</li>
132
 * 		<li>720 files have different lines leading spaces</li>
132
 * 		<li>726 files have different lines leading spaces</li>
133
 * 		<li>17 files have different spaces</li>
133
 * 		<li>9 files have different spaces</li>
134
 *		</ul></li>
135
 *		<li>ganymede M5 workspace (25819 units):<ul>
136
 * 		<li>0 error</li>
137
 * 		<li>17 files has still different output while reformatting!</li>
138
 * 		<li>15 failures due to old formatter</li>
139
 * 		<li>1373 files have different line leading spaces when reformatting!</li>
140
 * 		<li>14 files have different spaces when reformatting!</li>
134
 *		</ul></li>
141
 *		</ul></li>
135
 *		<li>ganymede M6a workspace (26336 units):<ul>
142
 *		<li>ganymede M6a workspace (26336 units):<ul>
136
 * 		<li>0 error</li>
143
 * 		<li>0 error</li>
137
 * 		<li>21 files has still different output while reformatting!</li>
144
 * 		<li>? files has still different output while reformatting!</li>
138
 * 		<li>17 failures due to old formatter</li>
145
 * 		<li>? failures due to old formatter</li>
139
 * 		<li>1469 files have different line leading spaces when reformatting!</li>
146
 * 		<li>? files have different line leading spaces when reformatting!</li>
140
 * 		<li>25 files have different spaces when reformatting!</li>
147
 * 		<li>? files have different spaces when reformatting!</li>
141
 *		</ul></li>
148
 *		</ul></li>
142
 * </ul>
149
 * </ul>
143
 */
150
 */
Lines 311-317 Link Here
311
	if (seFailures > 0) {
318
	if (seFailures > 0) {
312
		System.out.println("List of files with different output "+failuresType+" (due to old formatter bugs):");
319
		System.out.println("List of files with different output "+failuresType+" (due to old formatter bugs):");
313
		for (int i=0; i<sFailures; i++) {
320
		for (int i=0; i<sFailures; i++) {
314
			System.out.println("	- "+this.failures.get(i));
321
			System.out.println("	- "+this.expectedFailures.get(i));
315
		}
322
		}
316
	}
323
	}
317
	if (slwFailures > 0) {
324
	if (slwFailures > 0) {
(-)workspace/FormatterJavadoc/test/wksp/eclipse/X33.java (+11 lines)
Added Link Here
1
package test.wksp.eclipse;
2
3
public class X33 {
4
5
	void foo() {
6
		/**
7
		 * This example will put the star at the beginning of next line: R1 = X1 * 2
8
		 */
9
		int b;
10
	}
11
}
(-)workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X33.java (+12 lines)
Added Link Here
1
package test.wksp.eclipse;
2
3
public class X33 {
4
5
	void foo() {
6
		/**
7
		 * This example will put the star at the beginning of next line: R1 = X1
8
		 * * 2
9
		 */
10
		int b;
11
	}
12
}
(-)workspace/FormatterJavadoc/test/wksp/eclipse/out/default/X33b.java (+10 lines)
Added Link Here
1
package test.wksp.eclipse;
2
3
public class X33b {
4
5
	void foo() {
6
		if (true) {
7
			/** ** \r and \n are not valid in string literals *** */
8
		}
9
	}
10
}
(-)workspace/FormatterJavadoc/test/wksp/eclipse/X33b.java (+15 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package test.wksp.eclipse;
12
13
public class X33b {
14
15
}

Return to bug 231060