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 149478 - Go to declaration fails for variables that are used in strings
Summary: Go to declaration fails for variables that are used in strings
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-08 10:48 UTC by Alexandr Scherbatiy
Modified: 2009-10-08 09:28 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 Alexandr Scherbatiy 2008-10-08 10:48:12 UTC
JavaFX_NB_Plugin_NB65_daily: #291
  Product Version         = NetBeans IDE Dev (Build 200809151401)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.5.0_09; Java HotSpot(TM) Client VM 1.5.0_09-b03; Sun Microsystems Inc.

Steps to reproduce:

- Copy the code to the editor:
--------------------------------------
var a = 10;

java.lang.System.out.println("var = {a}");
--------------------------------------

- Hold <Ctrl> and click mouse on 'a' in "var = {a}" string
  Go to declaration does not work
Comment 1 Petr Nejedly 2008-11-05 11:46:55 UTC
This looks like a bug in parser. The parsed tree for <<"var = {a}">> looks like:
STRING_EXPRESSION [0,11]
 - STRING_LITERAL [0,8]
 - STRING_LITERAL [8,9]
 - IDENTIFIER [8,9]
 - STRING_LITERAL [9,11]

The second subtree (STRING_LITERAL [8,9]) shouldn't be there, makes no sense and breaks the identifier lookup.
Comment 2 Petr Nejedly 2009-10-07 14:35:30 UTC
This problem is gone now, it seems, though the compiler still generated an overlapping AST node....
Comment 3 Alexandr Scherbatiy 2009-10-08 09:28:59 UTC
verified in build netbeans-trunk-nightly-200910071536-javafx-full.zip