After main #4b6d4545478d we cannot pass project==null.
1.1 --- a/autoproject.java/src/org/netbeans/modules/autoproject/java/LibrariesNode.java Thu Mar 03 00:03:37 2011 +0100
1.2 +++ b/autoproject.java/src/org/netbeans/modules/autoproject/java/LibrariesNode.java Wed Mar 16 13:47:14 2011 -0400
1.3 @@ -121,10 +121,12 @@
1.4
1.5 private static final Icon ARCHIVE_ICON =
1.6 ImageUtilities.image2Icon(ImageUtilities.loadImage("org/netbeans/modules/autoproject/java/jar.gif"));
1.7 + private final Project prj;
1.8 private final Sources sources;
1.9 private final PropertyChangeListener cpListener = WeakListeners.propertyChange(this, null);
1.10
1.11 private LibrariesChildren(Project prj) {
1.12 + this.prj = prj;
1.13 sources = ProjectUtils.getSources(prj);
1.14 sources.addChangeListener(WeakListeners.change(this, sources));
1.15 }
1.16 @@ -186,7 +188,7 @@
1.17 File jar = FileUtil.archiveOrDirForURL(u);
1.18 String label = jar != null && jar.isFile() ? jar.getName() : FileUtil.getFileDisplayName(root);
1.19 return new Node[] {PackageView.createPackageView(GenericSources.group(
1.20 - null, root, root.toString(), label, ARCHIVE_ICON,ARCHIVE_ICON))};
1.21 + prj, root, root.toString(), label, ARCHIVE_ICON,ARCHIVE_ICON))};
1.22 }
1.23
1.24 }