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 159083 - off-by-one syntax highlighting of function() properties
Summary: off-by-one syntax highlighting of function() properties
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P4 blocker (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-24 16:58 UTC by unordained
Modified: 2009-08-21 06: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 unordained 2009-02-24 16:58:27 UTC
Syntax highlighter correctly 'bolds' the name of a property, if it detects it's a function (and not otherwise):

x = {
 onChange: function(params) { ... }
};

It incorrectly bolds it when the name of the property is quoted:

x = {
 'onChange': function(params) { ... }
};

It bolds the correct number of characters, but starts at the first quote mark (offset left 1 character), which leaves
the last character of the name, and the ending quote mark, un-bolded.

Detected in currently available NetBeans IDE 6.5 (Build 200811100001), editing a .js file.
Comment 1 Petr Pisl 2009-08-10 17:12:58 UTC
The problem is in the JS parser. It returns wrong offsets for the method names, which are in a quote.
Comment 2 Petr Pisl 2009-08-19 14:14:52 UTC
Fixed in web-main.
changeset:   141895:4afdff1b76d1
Comment 3 Quality Engineering 2009-08-21 06:14:51 UTC
Integrated into 'main-golden', will be available in build *200908210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4afdff1b76d1
User: Petr Pisl <ppisl@netbeans.org>
Log: issue #159083 - off-by-one syntax highlighting of function() properties