Bug 246832 - [1.5][assist] Camel case completion not working with statically imported methods
Summary: [1.5][assist] Camel case completion not working with statically imported methods
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-10 04:36 EDT by Mauro Molinari CLA
Modified: 2009-04-27 09:44 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (7.00 KB, patch)
2009-04-16 00:52 EDT, Jay Arthanareeswaran CLA
no flags Details | Diff
Latest patch (3.52 KB, patch)
2009-04-16 04:58 EDT, Jay Arthanareeswaran CLA
no flags Details | Diff
Latest patch (5.18 KB, patch)
2009-04-16 10:42 EDT, Jay Arthanareeswaran CLA
no flags Details | Diff
Latest patch (4.97 KB, patch)
2009-04-17 04:12 EDT, Jay Arthanareeswaran CLA
david_audel: iplog+
david_audel: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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