Community
Participate
Working Groups
"Add Import" on a static method invocation wrongly removes the qualifier even if this causes a semantic change. Steps: - open ProjectionDocumentTest from http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=805de570454ef7bb1d956a147cdc9bc6b8faa0b9 - put caret into "assertEquals" of one of the "Assert.assertEquals(...)" calls - Source > Add Import (Ctrl+Shift+M) => Was: Compile error, because the method resolves to the conflicting private void assertEquals(DocumentEvent expected, DocumentEvent received) => Expected: No import added, and source not touched. Show an error in the status line "Import could not be added because a conflicting method is in scope". Add Import should not only be blocked when it causes a compile error, but also when it redirects the method call to a different method. Example with JUnit4: public class FileCharSequenceTests { @Test public void test1() throws Exception { Assert.assertEquals("msg", "a", "b"); // Add Import assertEquals("msg", "a", "b"); } private void assertEquals(String desc, CharSequence actual, CharSequence expected) { } }
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. If you have further information on the current state of the bug, please add it. 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.