This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[ BUILD # : 201110140600 ] [ JDK VERSION : 1.6.26 ] When pasting code in the editor that has been copied from another compilation unit, editor prompts to add imports to fix references that are not available in the new context. While this works for types, it does not work for methods referenced via static imports. To Reproduce: From the following class: import org.junit.Test; import static org.junit.Assert.*; public class MyTest { [@Test public void shouldDoSomethingWhenSomethingHappens() { assertTrue(true); }] } copy the text surrounded by the square brackets. Paste the code into the following class: public class MyImportlessTest { //paste the text here } Expected Behaviour: Ideally, the editor would prompt user to add an import for org.junit.Test, and also a static import for org.junit.Assert.assertTrue. Observed Behaviour: Only the type import is suggested (org.junit.Test)