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.
Product Version: NetBeans IDE Dev (Build 200811011401) Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11 System: Linux version 2.6.24-21-generic running on i386; UTF-8; en_US (nb) Userdir: /tmp/ud ------------ - having autoproject with some jar subnodes of Libraries node - invoked Tools|Add to favorites on some JAR sunbode - entry with name "Root [/path/to/jar]" and content of JAR was added, expected is to add JAR file itself (as if you add it using favorites view)
It depends what data object is passed to Add to Favorites action.
I do not know what autoproject means. I tried with regular J2SE project where I have AbsoluteLayout.jar under Libraries in Projects tab. When I use add to project on jar file from Favorites tab I get node: org.netbeans.modules.favorites.Favorites$ProjectFilterNode@10cebf7[Name=cgoban, displayName=cgoban.jar] and data object: org.netbeans.modules.java.jarloader.JarDataObject@bd9607[/home/mslama/cgoban.jar] If I use Tools -> Add to Favorites from main menu on AbsoluteLayout.jar node just below Libraries I get node: org.openide.nodes.FilterNode@161df2a[Name=jar:file:/home/mslama/local/netbeans/hg-nbsrc/core-main/nbbuild/netbeans/java2/modules/ext/AbsoluteLayout.jar!/, displayName=Absolute Layout - AbsoluteLayout.jar] and data object: org.openide.loaders.DataFolder@cc80[AbstractFileObject@1fac189[root of /home/mslama/local/netbeans/hg-nbsrc/core-main/nbbuild/netbeans/java2/modules/ext/AbsoluteLayout.jar[org.openide.filesystems.JarFileSystem@1b814a5]]] So main difference is that in second data object is data folder. I do not know if it is solvable on Favorites side. Jarda? Closing for now. Please reopen if it is strong requirement.
"I do not know what autoproject means." - http://wiki.netbeans.org/AutomaticProjects It is solvable. See FileUtil.getArchiveFile. If it is not null, use it instead.
Reassigning