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 134824 - JS parser will incorrectly identify an "=" as a part of a variable.
Summary: JS parser will incorrectly identify an "=" as a part of a variable.
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-11 17:30 UTC by alosii
Modified: 2009-02-27 14:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
After double-clicking the variable AND the equals sign is selected (25.67 KB, text/plain)
2008-05-11 17:31 UTC, alosii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alosii 2008-05-11 17:30:46 UTC
Sometimes the JS parser will incorrectly identify an "=" as a part of a variable. Double clicking (to select the variable) will also select the equals sign.
Comment 1 alosii 2008-05-11 17:31:41 UTC
Created attachment 61228 [details]
After double-clicking the variable AND the equals sign is selected
Comment 2 Martin Schovanek 2008-05-12 09:34:20 UTC
Reproducible in case there is not a space between the var-name and '=', .java treats this case correctly.
Comment 3 Torbjorn Norbye 2008-05-30 17:35:18 UTC
I can't reproduce this with the current dev builds. Perhaps it's fixed by related bug fixes recently?

If not, can you provide a testcase? I tried typing in the code I saw in the screenshot but that fragment worked
correctly for me.
Comment 4 alosii 2008-05-31 21:07:19 UTC
The new patches DID NOT fix the bug. To reproduce it create a WebProject and a JS file, then type:

var test=3;

double click on "test" and you select "test=3" instead of the desired result: "test"

Perhaps this is a Mac OS specific bug?
Comment 5 Torbjorn Norbye 2008-06-02 18:52:47 UTC
Sorry, I misread the bug earlier! I was fixing another bug (136162) related to the "selection", but of course I was
looking at mark occurrences, not the actual identifier-selection code which runs on double click. Whoops!

Anyway, this is fixed now (as of an integration saturday).  It was included in changeset bdfe4bba83c1 (which is
otherwise unrelated to this fix; only the modifications to JsUtils.java are related.)
Comment 6 polan 2008-06-13 15:00:24 UTC
Verified.