Lines 5413-5418
Link Here
|
5413 |
} |
5413 |
} |
5414 |
} |
5414 |
} |
5415 |
|
5415 |
|
|
|
5416 |
/* |
5417 |
* Ensures that the start position of an argument that has a previous sibbling with a comment is correct |
5418 |
* (regression test for bug 80904 Quick Fix "Assign parameter to new field" doesn't appear with commented type) |
5419 |
*/ |
5420 |
public void test0579() throws CoreException { |
5421 |
ICompilationUnit workingCopy = null; |
5422 |
try { |
5423 |
workingCopy = getWorkingCopy( |
5424 |
"/Converter/src/X.java", |
5425 |
"public class X {\n" + |
5426 |
" /*start*/void foo(Object/*first arg*/ arg1, Object arg2) {\n" + |
5427 |
" }/*end*/\n" + |
5428 |
"}", |
5429 |
true/*resolve*/); |
5430 |
MethodDeclaration method = (MethodDeclaration) buildAST(workingCopy); |
5431 |
SingleVariableDeclaration arg2 = (SingleVariableDeclaration) method.parameters().get(1); |
5432 |
int start = arg2.getStartPosition(); |
5433 |
assertEquals("Unexpected range for arg2", "Object arg2", workingCopy.getSource().substring(start, start+arg2.getLength())); |
5434 |
} finally { |
5435 |
if (workingCopy != null) |
5436 |
workingCopy.discardWorkingCopy(); |
5437 |
} |
5438 |
} |
5439 |
|
5416 |
public void test0606() throws JavaModelException { |
5440 |
public void test0606() throws JavaModelException { |
5417 |
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0606", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
5441 |
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0606", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
5418 |
ASTNode result = runConversion(sourceUnit, true); |
5442 |
ASTNode result = runConversion(sourceUnit, true); |