Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 152287 - "Add to favorites" action on JAR under Libraries node does not add JAR itself
"Add to favorites" action on JAR under Libraries node does not add JAR itself
Status: NEW
Product: platform
Classification: Unclassified
Component: Favorites
PC Linux
: P4 (vote)
: 6.x
Assigned To: Ondrej Vrabec
Depends on:
  Show dependency treegraph
Reported: 2008-11-04 10:54 UTC by Tomas Danek
Modified: 2010-10-07 10:59 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2008-11-04 10:54:00 UTC
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)
Comment 1 mslama 2008-11-12 13:25:47 UTC
It depends what data object is passed to Add to Favorites action.
Comment 2 mslama 2009-03-25 15:47:39 UTC
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:[/home/mslama/cgoban.jar]

If I use Tools -> Add to Favorites from main menu on AbsoluteLayout.jar node just below Libraries I get node:
displayName=Absolute Layout - AbsoluteLayout.jar]
and data object:
org.openide.loaders.DataFolder@cc80[AbstractFileObject@1fac189[root of

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.
Comment 3 Jesse Glick 2009-03-25 17:14:55 UTC
"I do not know what autoproject means." -

It is solvable. See FileUtil.getArchiveFile. If it is not null, use it instead.
Comment 4 rmichalsky 2009-06-16 12:56:30 UTC

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo