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
6.x
PC Linux
: P4 (vote)
: 6.x
Assigned To: Ondrej Vrabec
issues@platform
autoproject
:
Depends on:
Blocks:
  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
:


Attachments

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:
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.
Comment 3 Jesse Glick 2009-03-25 17:14:55 UTC
"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.
Comment 4 rmichalsky 2009-06-16 12:56:30 UTC
Reassigning


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