Community
Participate
Working Groups
Steps to reproduce: 1. Create a scrapbook page with the following trivial code: System.out.println(new ArrayList<String>()); 2. Add the java.util package as an import for the scrapbook page (by right clicking and selecting "Set Imports...") 3. Select the line of code in the scrapbook page and execute it Expected results: The scrapbook page successfully executes and "[]" is output to the console. Actual results: The scrapbook page fails to execute and the text "The import java.util is never used" is inserted at the top of the scrapbook page If I use the fully qualified classname for ArrayList in the scrapbook page code and remove the java.util package import the code executes as expected. -- Configuration Details -- Product: Eclipse 4.6.1.20161007-1200 (org.eclipse.epp.package.java.product) Installed Features: org.eclipse.jdt 3.12.1.v20160907-1200
This regression is still in Eclipse version 2023-12. :-( To reproduce create a new project with a trivial class, create Scrapbook, then try importing with the "Java Snippet Imports" icon, and attempt to reference the class. Get a missing class error.