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.

Bug 63166 - F.U. on manifest: cannot open usages
Summary: F.U. on manifest: cannot open usages
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 66808 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-26 13:51 UTC by Jesse Glick
Modified: 2005-11-30 10:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2005-08-26 13:51:52 UTC
If you get usages for a class from the NBM manifest, you cannot double-click it
to open in the editor.
Comment 1 Milos Kleint 2005-08-26 14:20:52 UTC
confirmed. I just don't know how to do it. AFAIK one needs to calculate some
kind of offsets within the Document.
hard to do when working with Manifest instances (or Layer's
FileSystem/FileObject instances)
Comment 2 Jesse Glick 2005-08-26 14:41:22 UTC
Hmm, just search the Document as text I guess, can't be that hard.
Comment 3 Milos Kleint 2005-10-03 19:54:47 UTC
for now, I've just added code to that opens the document with ofset equal to 0.

so it opens but not on the right place. it's ok for META-INF/services I
guess,manifest and especially layer.xml suffer however. unfortunately these are
also harder to figure as i'm working on top of models (java.util.jar.Manifest
and layer filesystem respectively). it seems to me non-trivial currently tofind
out reliably with the currect implementation. scheduling to "future".



Comment 4 Milos Kleint 2005-10-14 15:48:08 UTC
*** Issue 66808 has been marked as a duplicate of this issue. ***
Comment 5 Jesse Glick 2005-11-17 18:57:17 UTC
I have a patch for this. Tedious but works.
Comment 6 Jesse Glick 2005-11-18 05:50:21 UTC
Should be pretty accurate. Could be fooled by pathological cases such as:

X-Nonsense: p/C.class
OpenIDE-Module-Install: p/C.class

or

<file name="x.instance">
    <attr name="useless" stringvalue="p.C"/>
    <attr name="instanceClass stringvalue="p.C"/>
</file>

committed   * Up-To-Date  1.3        
apisupport/refactoring/src/org/netbeans/modules/apisupport/refactoring/AbstractRefactoringElement.java
committed   * Up-To-Date  1.8        
apisupport/refactoring/src/org/netbeans/modules/apisupport/refactoring/AbstractRefactoringPlugin.java
committed   * Up-To-Date  1.7        
apisupport/refactoring/src/org/netbeans/modules/apisupport/refactoring/NbRenameRefactoringPlugin.java
committed   * Up-To-Date  1.7        
apisupport/refactoring/src/org/netbeans/modules/apisupport/refactoring/NbSafeDeleteRefactoringPlugin.java
committed   * Up-To-Date  1.7        
apisupport/refactoring/src/org/netbeans/modules/apisupport/refactoring/NbWhereUsedRefactoringPlugin.java
Comment 7 pzajac 2005-11-30 10:46:14 UTC
cool :-))