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 99332 - ISE: "cannot match the tag: @param:" from JavadocUtilities.moveToTag
Summary: ISE: "cannot match the tag: @param:" from JavadocUtilities.moveToTag
Status: RESOLVED DUPLICATE of bug 99229
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Miloslav Metelka
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2007-03-29 02:10 UTC by Jesse Glick
Modified: 2007-04-10 17:48 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace (2.54 KB, text/plain)
2007-03-29 02:11 UTC, Jesse Glick
Details
Sample of corrupted syntax coloring (61.45 KB, image/png)
2007-04-09 23:29 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2007-03-29 02:10:49 UTC
070328. Not sure how to reproduce. Syntax coloring in Javadoc has been messed up
today, with most of the Javadoc grey but seemingly random characters blue.
Comment 1 Jesse Glick 2007-03-29 02:11:13 UTC
Created attachment 40117 [details]
Stack trace
Comment 2 Jan Pokorsky 2007-03-29 09:34:25 UTC
Honzo are you aware of any changes that could affect this? Javadoc module has
not been modified within last 2 weeks.
Comment 3 Jesse Glick 2007-03-29 21:18:07 UTC
BTW I noticed this just above the exception in the log:

space/src/versionability_89629/ant/project/src/org/netbeans/modules/project/ant/ProjectLibraryProvider.java:0:
warning - @param tag has no arguments.

To clarify: the bad syntax coloring was in and around the methods that I was
editing at the time, all in new code.
Comment 4 Jan Pokorsky 2007-03-30 12:02:02 UTC
The warning is generated by javadoc tool logger that is out of control of the
javadoc module. It does not relate to ISE.

ISE was thrown due to impossibility to find the tag @param returned by javadoc
tool in lexer token sequence.

Bad syntax coloring could indicate some lexer issue. But without steps to
reproduce it, it is just my guess unfortunately.
Comment 5 Jan Lahoda 2007-03-30 14:46:44 UTC
Sorry Honzo, no idea offhand. According to cvsps, the last change in java/lexer
was elimination of part token IDs on 5 March. Jesse, if it happens again, could
you please attach the source code? Thanks.
Comment 6 Jesse Glick 2007-03-30 17:22:46 UTC
Perhaps you can put a hook in the code to detect this case and trigger a source
dump to the log directory. Even if this happened to me again, it is unlikely I
would stop typing the exact instant this exception was thrown and remember to
copy and paste the source text.
Comment 7 Jan Pokorsky 2007-04-02 11:01:15 UTC
improved diagnostics

/cvs/javadoc/src/org/netbeans/modules/javadoc/hints/JavadocUtilities.java,v  <--
 JavadocUtilities.java
new revision: 1.4; previous revision: 1.3
Comment 8 Jesse Glick 2007-04-04 17:40:35 UTC
I just had a similar problem in today's build. Working on RequestProcessor.java,
I accepted the hint to add a return value to RP.Task.getPriority. I started typing:

@return the priority level (see e.g. {@link Thread#

Now the "ad" in "Thread" are in blue, like "@return". Same once I complete the
sentence - just those two letters blue:

@return the priority level (see e.g. {@link Thread#NORM_PRIORITY}

But when I edit it to say

@return the priority level (see e.g. {@link Thr ead#NORM_PRIORITY}

then it is the "ea" which is blue.

Log says

space/src/nb_all/openide/util/src/org/openide/util/RequestProcessor.java:0:
warning - @return tag has no arguments.

When I later accept the hint to add a @param tag to setPriority:

/** Changes the priority the task will be performed with. 
 * @param priority the priority level (see e.g. {@link Thread#NORM_PRIORITY}
 */
public void setPriority(int priority) {

then "@link" is correctly blue - but the hint remains on the setPriority line.

Both issues are fixed after I close and reopen the file.
Comment 9 Jan Pokorsky 2007-04-05 11:22:14 UTC
IMO the token hierarchy of the java source is out of sync after document
changes. Bad syntax highlighting and not recomputed hints are consequences of
it. Reassigning to java/source.
Comment 10 Jesse Glick 2007-04-09 23:29:08 UTC
Created attachment 40643 [details]
Sample of corrupted syntax coloring
Comment 11 Jesse Glick 2007-04-09 23:30:42 UTC
Happens quite routinely for newly added code with Javadoc. Rather disconcerting.

BTW is there no way to suppress the messages such as

..../Clazz.java:0: warning - @return tag has no arguments.

from being printed in the log file? They clutter the log with meaningless lines.
This should be fixed before release, IMHO.
Comment 12 Jan Pokorsky 2007-04-10 13:36:08 UTC
suppressing javadoc warnings will require to patch JSR199, there is no api
Comment 13 Jesse Glick 2007-04-10 16:15:48 UTC
I filed issue #100488 for the warnings in the log file, so as to keep this issue
clearly about the corrupted syntax coloring (and perhaps the one ISE, which I
have not seen again).
Comment 14 Jan Lahoda 2007-04-10 16:42:36 UTC
The broken coloring is covered by issue #99229. Not sure about the ISE - Honza
P. AFAIK added some logging because of it. May be related to the fact that we do
not use snapshots for the token hieararchy (we have issue(s) for this, but I do
not have them handy). Sorry for slow response.
Comment 15 Miloslav Metelka 2007-04-10 17:48:31 UTC
IMHO this is a dup of issue 99229 which could lead to an incorrect offset (and
thus a wrong text) of an embedded javadoc token.

*** This issue has been marked as a duplicate of 99229 ***