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

Summary: off-by-one syntax highlighting of function() properties
Product: javascript Reporter: unordained <unordained>
Component: EditorAssignee: Petr Pisl <ppisl>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

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