Lines 13576-13580
Link Here
|
13576 |
"ThisClassIsNotFinal[TYPE_REF]{ThisClassIsNotFinal, test, Ltest.ThisClassIsNotFinal;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
13576 |
"ThisClassIsNotFinal[TYPE_REF]{ThisClassIsNotFinal, test, Ltest.ThisClassIsNotFinal;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
13577 |
requestor.getResults()); |
13577 |
requestor.getResults()); |
13578 |
} |
13578 |
} |
|
|
13579 |
/* |
13580 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=246832 |
13581 |
* To test whether camel case completion works for imported static methods |
13582 |
*/ |
13583 |
public void testCamelCaseStaticMethodImport() throws JavaModelException { |
13584 |
this.oldOptions = JavaCore.getOptions(); |
13585 |
this.workingCopies = new ICompilationUnit[2]; |
13586 |
try { |
13587 |
Hashtable options = new Hashtable(this.oldOptions); |
13588 |
options.put(JavaCore.CODEASSIST_CAMEL_CASE_MATCH, JavaCore.ENABLED); |
13589 |
JavaCore.setOptions(options); |
13590 |
|
13591 |
this.workingCopies[0] = getWorkingCopy( |
13592 |
"/Completion/src/a/A.java", |
13593 |
"package a;\n" + |
13594 |
"public class A{\n" + |
13595 |
"public static void testMethodWithLongName(){}\n" + |
13596 |
"}}"); |
13597 |
|
13598 |
this.workingCopies[1] = getWorkingCopy( |
13599 |
"/Completion/src/b/B.java", |
13600 |
"import static a.A.testMethodWithLongName;\n" + |
13601 |
"public class B {\n" + |
13602 |
"public void b() {\n" + |
13603 |
"tMWLN \n" + |
13604 |
"}}"); |
13605 |
|
13606 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2( |
13607 |
true); |
13608 |
String str = this.workingCopies[1].getSource(); |
13609 |
String completeBehind = "tMWLN"; |
13610 |
int cursorLocation = str.indexOf(completeBehind) + completeBehind.length(); |
13611 |
this.workingCopies[1].codeComplete(cursorLocation, requestor, this.wcOwner); |
13612 |
|
13613 |
assertResults( |
13614 |
"testMethodWithLongName[METHOD_REF]{testMethodWithLongName(), La.A;, ()V, testMethodWithLongName, null, " |
13615 |
+ (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ENUM_CONSTANT + R_QUALIFIED + R_NON_RESTRICTED) |
13616 |
+ "}", requestor.getResults()); |
13617 |
} finally { |
13618 |
JavaCore.setOptions(this.oldOptions); |
13619 |
} |
13620 |
} |
13579 |
|
13621 |
|
13580 |
} |
13622 |
} |