Community
Participate
Working Groups
Build ID: M20071023-1652 Steps To Reproduce: 1. add EasyMock and EasyMock Class Extension to your projects' libraries (http://www.easymock.org) 2. under Window/Preferences/Java/Editor/Content Assist/Favorites add new types org.easymock.EasyMock and org.easymock.classextension.EasyMock 3. create a class, write a main method (f.e.) and type "replay" and press ctrl space to start content assist 4. Only one Method "replay(Object... mocks) void - EasyMock" is shown, both types configured above have a method matching this, but you can't choose between them since there is only one row More information: org.easymock.EasyMock is choosen, but there is no possibility to change this but changing the generated import statement by hand. When writing Tests with EasyMock you sometimes need the classextension and sometimes not, so you should choose when writing the actual test. The bug in eclipse makes this unnecessarily hard.
Simple test case: 1) create test/p/ZZZA.java package test.p; public class ZZZA { public static int foo(int i){return 0;}; } 2) create test/p/ZZZB.java package test.p; public class ZZZB { public static int foo(int i){return 0;}; } 3) add ot favorites "test.p.ZZZA.*" and "test.p.ZZZB.*". 4) create test/Test.java package test; public class Test { public void method() { foo| // do ctrl+space at | } } 5) do ctrl+space at | only one method is proposed.
Created attachment 94359 [details] Proposed fix
Released for 3.4M7. Tests added CompletionTests#testFavoriteImports032() -> testFavoriteImports033()
Verified for 3.4M7 using I20080427-2000.