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 122933 - double-click select too much character in editor
Summary: double-click select too much character in editor
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords: API
Depends on: 119659
Blocks:
  Show dependency tree
 
Reported: 2007-11-28 07:56 UTC by sam_work
Modified: 2016-07-07 07:26 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sam_work 2007-11-28 07:56:54 UTC
When doing a double-click on a variable (or other symbol) in ruby code, the editor select too much caracters.

Example for code : "my_variable=my_instance.my_method"
(" are not parts of the code)

If I double-click on "my_variable" NB select "my_variable=my_instance". It always stops at a ".", but not on the "=".
Comment 1 sam_work 2007-11-28 15:47:21 UTC
After more testing, the trouble seems to be with "=" character.

For (partial) code " :locals=>{ " the double-click on "locals" include also the "=".
But on "my_variable+=1" if can select just the "my_variable". The is no problem with operators not beginning with "=".

The problem never occurs if there are spaces before the "=".

I hope this helps.
Comment 2 Torbjorn Norbye 2007-11-28 16:06:00 UTC
Correct; the problem is that "=", "?" and "!" -can- be part of an identifier; for example
  
    def foo=
    end

Here "foo=" is the whole identifier. 

The bug here is that the above characters are only valid as the LAST character in an identifier, so the code needs to be
enhanced for that.

(This isn't a one-line-fix because the code around identifier selection is abstracted away elsewhere such that the
language plugin only specifies whether a particular character is an identifier character; it doesn't have a notion of
positional identifier characters yet. Shouldn't be hard to fix though.)
Comment 3 Erno Mononen 2009-09-17 09:31:56 UTC
Needs support in CSL first, then can be addressed in Ruby.
Comment 4 Vitezslav Stejskal 2009-09-22 15:55:14 UTC
Probably something not just CSL specific. There is an RFE for better API for identifiers detection, see issue #119659.
Comment 5 Martin Balin 2016-07-07 07:26:03 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss