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.
I tried the new Java 1.7 try-with-resources statement in Netbeans 7 with the following sample code: try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, "*.*")) { for (Path entry : stream) { System.out.println(entry.getFileName()); } } The code works fine, but autocomplete doesn't work for the 'stream' variable inside the try block!
reproducible the 'stream' is not provided among available variables. Getting code completion for content of stream clas (eg stream.<invoke cc here>) works fine. Product Version: NetBeans IDE 7.0.1 (Build 201107282000) Java: 1.7.0; Java HotSpot(TM) 64-Bit Server VM 21.0-b17 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) Userdir: C:\Users\jprox\.netbeans\7.0
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/0089c8a554d1
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/0089c8a554d1 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #200513: try-with code completion problem - fixed.