Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 526741

Summary: Code assist does not suggest Non-enum class(factory) for enum method parameter
Product: [Eclipse Project] JDT Reporter: chamara caldera <chamaracal>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3    
Version: 4.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard: stalebug
Attachments:
Description Flags
Screeshot-enumMethod
none
Screenshot-StringMethod none

Description chamara caldera CLA 2017-11-01 22:40:42 EDT
Created attachment 271290 [details]
Screeshot-enumMethod

//enum class
public enum TestE
{
  T1, T2;
}

//factoty
public class TestEMapper
{
  static TestE map(String a)
  {
    return TestE.T1;
  }

}

public class Test
{  
  
  private void test1(TestE test)
  {
    
  }  
  
  private void test2(String test)
  {
    
  }
  
  public static void main(String[] args)
  {
    new Test().test1(TEM);//this does not give any suggestion
    new Test().test2(TEM);//this gives correct suggestion
  }

}

If these classes are in same file then it works
Comment 1 chamara caldera CLA 2017-11-01 22:41:14 EDT
Created attachment 271291 [details]
Screenshot-StringMethod
Comment 2 Eclipse Genie CLA 2020-04-06 19:40:06 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.