Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 132049 Details for
Bug 246832
[1.5][assist] Camel case completion not working with statically imported methods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Latest patch
bug_246832_2.txt (text/plain), 3.52 KB, created by
Jay Arthanareeswaran
on 2009-04-16 04:58:08 EDT
(
hide
)
Description:
Latest patch
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2009-04-16 04:58:08 EDT
Size:
3.52 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java,v >retrieving revision 1.393 >diff -u -r1.393 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 14 Apr 2009 13:57:11 -0000 1.393 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 16 Apr 2009 08:54:23 -0000 >@@ -7089,8 +7089,8 @@ > if(proposeMethod && !insideAnnotationAttribute) { > MethodBinding methodBinding = (MethodBinding)binding; > if ((exactMatch && CharOperation.equals(token, methodBinding.selector)) || >- !exactMatch && CharOperation.prefixEquals(token, methodBinding.selector)) { >- >+ !exactMatch && CharOperation.prefixEquals(token, methodBinding.selector) || >+ (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, methodBinding.selector))) { > findLocalMethodsFromStaticImports( > methodBinding.selector, > methodBinding.declaringClass.methods(), >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java,v >retrieving revision 1.112 >diff -u -r1.112 CompletionTests_1_5.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java 4 Mar 2009 11:57:11 -0000 1.112 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java 16 Apr 2009 08:54:44 -0000 >@@ -13576,5 +13576,47 @@ > "ThisClassIsNotFinal[TYPE_REF]{ThisClassIsNotFinal, test, Ltest.ThisClassIsNotFinal;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", > requestor.getResults()); > } >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=246832 >+ * To test whether camel case completion works for imported static methods >+ */ >+public void testCamelCaseStaticMethodImport() throws JavaModelException { >+ this.oldOptions = JavaCore.getOptions(); >+ this.workingCopies = new ICompilationUnit[2]; >+ try { >+ Hashtable options = new Hashtable(this.oldOptions); >+ options.put(JavaCore.CODEASSIST_CAMEL_CASE_MATCH, JavaCore.ENABLED); >+ JavaCore.setOptions(options); >+ >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/a/A.java", >+ "package a;\n" + >+ "public class A{\n" + >+ "public static void testMethodWithLongName(){}\n" + >+ "}}"); >+ >+ this.workingCopies[1] = getWorkingCopy( >+ "/Completion/src/b/B.java", >+ "import static a.A.testMethodWithLongName;\n" + >+ "public class B {\n" + >+ "public void b() {\n" + >+ "tMWLN \n" + >+ "}}"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2( >+ true); >+ String str = this.workingCopies[1].getSource(); >+ String completeBehind = "tMWLN"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[1].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ "testMethodWithLongName[METHOD_REF]{testMethodWithLongName(), La.A;, ()V, testMethodWithLongName, null, " >+ + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ENUM_CONSTANT + R_QUALIFIED + R_NON_RESTRICTED) >+ + "}", requestor.getResults()); >+ } finally { >+ JavaCore.setOptions(this.oldOptions); >+ } >+} > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 246832
:
132019
|
132049
|
132084
|
132185