View | Details | Raw Unified | Return to bug 232466 | Differences between
and this patch

Collapse All | Expand All

(-)formatter/org/eclipse/jdt/internal/formatter/Scribe.java (-8 / +11 lines)
Lines 2411-2424 Link Here
2411
				switch (token) {
2411
				switch (token) {
2412
					case TerminalTokens.TokenNameWHITESPACE:
2412
					case TerminalTokens.TokenNameWHITESPACE:
2413
						if (previousToken != -1 || tokenLength > 1 || this.scanner.currentCharacter != ' ') needFormat = true;
2413
						if (previousToken != -1 || tokenLength > 1 || this.scanner.currentCharacter != ' ') needFormat = true;
2414
						if (previousToken == -1) { // space before reference
2414
						switch (previousToken) {
2415
							buffer.append(' ');
2415
							case TerminalTokens.TokenNameMULTIPLY :
2416
							this.column++;
2416
							case TerminalTokens.TokenNameLPAREN:
2417
						}
2417
								break;
2418
						if (previousToken == TerminalTokens.TokenNameCOMMA) { // space between method arguments
2418
							default:	// space between method arguments
2419
							spacePosition = buffer.length();
2419
								spacePosition = buffer.length();
2420
							buffer.append(' ');
2420
								// fall through next case
2421
							this.column++; // space before reference
2421
							case -1:
2422
								buffer.append(' ');
2423
								this.column++;
2424
								break;
2422
						}
2425
						}
2423
						break;
2426
						break;
2424
					case TerminalTokens.TokenNameMULTIPLY:
2427
					case TerminalTokens.TokenNameMULTIPLY:
(-)src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java (+14 lines)
Lines 174-177 Link Here
174
	this.preferences.comment_line_length = 40;
174
	this.preferences.comment_line_length = 40;
175
	formatUnit("bugs.b232488", "X01.java");
175
	formatUnit("bugs.b232488", "X01.java");
176
}
176
}
177
178
/**
179
 * @bug 232466: [formatter] References of inlined tags are still split in certain circumstances
180
 * @test Insure that new formatter do not add/remove stars in header and footer
181
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=232466"
182
 */
183
public void testBug233466a() throws JavaModelException {
184
	this.preferences.comment_line_length = 40;
185
	formatUnit("bugs.b232466", "X01.java");
186
}
187
public void testBug233466b() throws JavaModelException {
188
	this.preferences.comment_line_length = 40;
189
	formatUnit("bugs.b232466", "X02.java");
190
}
177
}
191
}
(-)workspace/FormatterJavadoc/test/bugs/b232466/out/X01.java (+6 lines)
Added Link Here
1
/**
2
 * {@link SearchEngine#searchAllTypeNames(char[] packageName, int packageMatchRule, char[] typeName, int typeMatchRule, int searchFor, IJavaSearchScope scope, TypeNameMatchRequestor nameMatchRequestor, int waitingPolicy, org.eclipse.core.runtime.IProgressMonitor monitor)}
3
 */
4
public class X01 {
5
6
}
(-)workspace/FormatterJavadoc/test/bugs/b232466/X02.java (+18 lines)
Added Link Here
1
/**
2
 * {@link LocalClass02#searchAllTypeNames(
3
 *		char[] 
4
 *			packageName, 
5
 *		int 
6
 *			packageMatchRule, 
7
 *		char[] 
8
 *			typeName)}
9
 */
10
public class X02 {
11
12
}
13
14
class LocalClass02 {
15
	void searchAllTypeNames(char[] packageName, int packageMatchRule,
16
			char[] typeName) {
17
	}
18
}
(-)workspace/FormatterJavadoc/test/bugs/b232466/X01.java (+15 lines)
Added Link Here
1
/**
2
 * {@link SearchEngine#searchAllTypeNames(
3
 *		char[] packageName, 
4
 *		int packageMatchRule, 
5
 *		char[] typeName,
6
 *		int typeMatchRule, 
7
 *		int searchFor, 
8
 *		IJavaSearchScope scope, 
9
 *		TypeNameMatchRequestor nameMatchRequestor,
10
 *		int waitingPolicy,
11
 * 		org.eclipse.core.runtime.IProgressMonitor monitor)}
12
 */
13
public class X01 {
14
15
}
(-)workspace/FormatterJavadoc/test/bugs/b232466/out/X02.java (+12 lines)
Added Link Here
1
/**
2
 * {@link LocalClass02#searchAllTypeNames(char[] packageName, int packageMatchRule, char[] typeName)}
3
 */
4
public class X02 {
5
6
}
7
8
class LocalClass02 {
9
	void searchAllTypeNames(char[] packageName, int packageMatchRule,
10
			char[] typeName) {
11
	}
12
}

Return to bug 232466