Bug 246832

Summary: [1.5][assist] Camel case completion not working with statically imported methods
Product: [Eclipse Project] JDT Reporter: Mauro Molinari <mauromol>
Component: CoreAssignee: Jay Arthanareeswaran <jarthana>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david_audel
Version: 3.4   
Target Milestone: 3.5 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch
none
Latest patch
none
Latest patch
none
Latest patch david_audel: iplog+, david_audel: review+

Description Mauro Molinari CLA 2008-09-10 04:36:28 EDT
Suppose you have:

package a;

public class A
{
	public static void testMethodWithLongName()
	{
	}
}

And then:

package b;

import static a.A.testMethodWithLongName;

public class B
{
  public void b()
  {
  	tMWLN<= invoke code completion here
  }
}

Camel case completion does not work.
Instead, if you type "test<= invoke code completion", it does work.
Comment 1 Jay Arthanareeswaran CLA 2009-04-16 00:52:21 EDT
Created attachment 132019 [details]
Proposed patch

Added the appropriate check before calling findLocalMethodsFromStaticImports method to ensure that camel case is considered. Added the test case in CompletionTests_1_5.testCamelCaseStaticMethodImport.
Comment 2 Jay Arthanareeswaran CLA 2009-04-16 04:58:08 EDT
Created attachment 132049 [details]
Latest patch

Made corrections to the test case as suggested by David. Also excluded other changes that went along with the patch as part of a local merge.
Comment 3 Jay Arthanareeswaran CLA 2009-04-16 10:42:34 EDT
Created attachment 132084 [details]
Latest patch

Fix made to handle the following case also. Test case modified too.

package a;
public class A {
        public static void testMethodWithLongName(){}
        public static void testMethodWithLongName2(){}
}
-----
package b;
import static a.A.testMethodWithLongName;
public class B {
  public void b() {
        tMWLN<= invoke code completion here
  }
}
----
Comment 4 Jay Arthanareeswaran CLA 2009-04-17 04:12:31 EDT
Created attachment 132185 [details]
Latest patch

Removed the code that was commented out earlier.
Comment 5 David Audel CLA 2009-04-17 04:46:15 EDT
Comment on attachment 132185 [details]
Latest patch

This patch is good for me
Comment 6 David Audel CLA 2009-04-17 04:49:25 EDT
Released for 3.5M7.
Comment 7 David Audel CLA 2009-04-27 09:44:13 EDT
Verified for 3.5M7 using I20090426-2000