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 17271 - Editor-Bar jumps to TOP of Javadoc, not method
Summary: Editor-Bar jumps to TOP of Javadoc, not method
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P4 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-03 07:16 UTC by rsk
Modified: 2007-09-26 09:14 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 rsk 2001-11-03 07:16:12 UTC
In Netbeans 3.3 Beta 3, I noticed that using the editor-toolbar that
allows you to quick-jump to methods from within the editor window, 
jumps you to the TOP of the javadoc instead of the method itself, 
could this behavior be changed to jump you to the method itself? I'm 
asking because javadoc editing takes place A LOT less frequently than 
code editing, and you are probably using the editor-toolbar to jump to 
methods so you can editing them, instead of their javadoc statements. 
So if you have a 10 line javadoc statement, that means the tool will 
jump you to the javadoc, but you STILL need to arrow down or click 
10-lines lower to actually get ready to change things.


The editor-bar should jump you to the method declaration, since that is what 
is listed in its drop down.
Comment 1 Svata Dedic 2001-11-03 09:21:11 UTC
Sorry, OpenAPIs do not contain a way how to obtain a position for 
method parts (javadoc, declaration, body); so I can only locate the 
beginning of the method element definition at this point.
PLEASE try to distinguish what is an `enhancement request' and what 
is really a bug - ask yourself if this issue is really a defect.
Comment 2 rsk 2001-11-03 18:20:31 UTC
I did ask myself, and he said it was a defect :)

In all seriousness, if I want to jump to a method, and I'm getting 
taken to the Javadoc statement, seems like a bug to me and not an 
enhancement... 
Comment 3 Svata Dedic 2001-11-04 08:42:33 UTC
In all seriousness, it is an enhancement of what the IDE thinks is a 
method :-\ The method text area spans from the beginning of its 
javadoc (if it has one) to the closing curly bracket, inclusive. 
Given the definition "what is a method's text block" used by the IDE, 
the behaviour is correct.
Since you insist on fixing it in 3.3 timeframe (and I can't change 
APIs before release) I will have to hack it somehow. It's nice to 
hear the customer say "do it this way, even at the expense of 
potentional bugs and inconsistencies in the future".

Comment 4 rsk 2001-11-04 09:15:38 UTC
Hack it somehow? I've started using 3.2.1 for my main development 
and the behavior I requested to be "fixed" is the behavior that is 
in 3.2.1. Regardless of the Javadoc, the quick-browse will take you 
to the top of the method.

Why all the sudden are the facilities to do this not there anymore? 
At any rate, no I don't want you to hack something to get it to 
work. It just seemed strange that it was there, now its not.
Comment 5 Svata Dedic 2001-11-05 06:48:31 UTC
It's dead simple. In 3.2.*, the quickbrowse worked using "Open"
action. That was fine, except that the open action was not tied to the
editor window the quickbrowse was docked in (in the case you cloned
the editor window), always worked on the "default" window and that
behaviour was reported as a bug. It is definitely not good and was
fixed -- but there's no suitable API, which would actually expose the
location of method decl start.
In this context "hack it" means introducing a specialized intra-module
API to deal specifically with this situation, which is a very ugly
thing - it ties unrelated parts of the system together, for a minor gain.
I am trying not to be impolite, but does not work the way you expect
does not mean it is a bug.
Comment 6 Svata Dedic 2001-11-05 06:50:32 UTC
Sorry, the last sentence should read "if something does not work as
you've expected, it does not always mean that it is a defect".
Comment 7 Svata Dedic 2001-11-08 16:05:48 UTC
Fixed in trunk.

/cvs/java/src/org/netbeans/modules/java/JavaParserGlue.java,v  <-- 
JavaParserGlue.java
new revision: 1.27; previous revision: 1.26
/cvs/java/src/org/netbeans/modules/java/codegen/TextBinding.java,v 
<--  TextBinding.java
new revision: 1.4; previous revision: 1.3
/cvs/java/src/org/netbeans/modules/java/ui/NavigationView.java,v  <--
 NavigationView.java
new revision: 1.10; previous revision: 1.9

Comment 8 Jan Becicka 2002-01-09 12:56:45 UTC
Verified
Comment 9 Quality Engineering 2003-07-01 13:20:48 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.