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 177721

Summary: Function name that is treated as keyword in JavaFX is not properly highlighted
Product: javafx Reporter: Alexandr Scherbatiy <sunflower>
Component: EditorAssignee: issues@javafx <issues>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description Alexandr Scherbatiy 2009-11-27 03:12:26 UTC
Product Version         = NetBeans IDE Dev (Build 200911171401) (#d7b3ad6247f5)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun
Microsystems Inc.


Steps to reproduce:
- Copy the code to the editor
-----------------------------------------
function r(str:String) {
    str.replace(" ", "&nbsp;");
}
-----------------------------------------

The 'replace' is highlighted as a keyword and has the Blue color.
But it is a function name in this case and should be highlighted as function.


 -------  Comment #1 From  Anton Chechel   2009-11-26 07:06:40  -------  
Unlike Java in JavaFX there are non-reserved keywords like "replace" which can be identifiers as well.

Please create issue for semantic highlighting: all non-reserved keywords which
are identifiers incorrectly highlighted.

===
// ---------------------
// Non-reserved keywords
//
// Some tokens are returned by the lexer as keywords for the grammar
// but are not reserved words in the language. These can be used as
// identifiers and are basically the set of keywords that cannot
// possibly start a statement/expression, such as 'to' but not those
// that are not sensible to allow as identifiers, such as 'true'.
//
keyword
    : FIRST     | IN    | INIT      | INTO
    | INVERSE   | LAST  | ON        | POSTINIT      
    | REPLACE   | STEP  | TRIGGER   | TWEEN
    | WHERE     | WITH  | INVALIDATE
    ;
===
Comment 1 David Strupl 2011-05-16 13:50:25 UTC
Closing all bugs filed against JavaFX 1.x as wontfix. We will support JavaFX 2.0 - please keep opened only bugs against the new release. Thanks.