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 239257 - Select identifier considers "_" (underscore) as a separator
Summary: Select identifier considers "_" (underscore) as a separator
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 7.4
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-09 09:13 UTC by attila.kelemen
Modified: 2019-02-12 13:41 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 attila.kelemen 2013-12-09 09:13:27 UTC
When I double click on an identifier (java) containing an underscore, not the whole identifier is selected but selection stops at the next underscore. I have a single pc on which this issue manifests but not on others and I couldn't find anything in the settings to fix this.

Product Version = NetBeans IDE 7.4 (Build 201310111528)
Operating System = Windows Vista version 6.0 running on amd64
Java; VM; Vendor = 1.7.0_15
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Comment 1 Milutin Kristofic 2014-02-12 15:57:09 UTC
I cannot reproduce it either. Do you have more informations? Do you have some plugins? An example of identifier? Do you changed some specific options?
Comment 2 attila.kelemen 2014-02-12 16:14:30 UTC
NB tells me that the following "User Installed Plugins" are installed (I've used the "All" installer for Windows):

- Subversion
- Change Line Endings on Save
- Gradle Support
- Mercurial
- JUnit
- Show and change line endings
- Dark Look And Feel Themes
- AngularJS Editor
- FindBugs Integration
- Git

I don't think that one of the plugins is the culprit because I have a pc with the same plugins installed and double click select works fine there.

This works with any Java variable (consistently without exceptions) but only in Java files and not in Groovy. Even with words within string literals.

Other than this, I'm not sure where to look. Can I configure the loggers so that there are logs help tracking down this issue? I'm puzzled because I have never experienced this behaviour anywhere else. I don't know any option that I had adjusted here but not elsewhere. Can you point me where the word selection is handled in NB's sources, so I can try to take a look at it?
Comment 3 Milutin Kristofic 2014-02-12 16:42:56 UTC
It is BaseKit actions BeginWordAction and EndWordAction. There is also similar action SelectIdentifier by Alt+Shift+J. I really don't have any idea how this can happen, only if some plugin can overwrite this actions.
Comment 4 attila.kelemen 2014-02-13 10:14:55 UTC
I have compared the configuration directory of the NB instance where it works and where it doesn't and found the relevant difference in "~/config/Editors/text/x-java/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml"

From this file removing the following line solved the issue:

    <entry name="identifier-acceptor" remove="true"/>

I could not find where this could be set in the options dialog however. Also, there are some other configuration entries which I don't know how they got set (and how to unset them in the options dialog):

    <entry name="abbrev-reset-acceptor" remove="true"/>
    <entry name="goto-class-case-sensitive" remove="true"/>
    <entry name="goto-class-show-inner-classes" remove="true"/>
    <entry name="goto-class-show-library-classes" remove="true"/>
    <entry name="guessMethodArguments" remove="true"/>
    <entry name="indent-hot-chars-acceptor" remove="true"/>
    <entry name="reindent-with-text-before" remove="true"/>
    <entry name="token-context-list" remove="true"/>
    <entry name="word-match-match-case" remove="true"/>

Anyway, this works for me know, I don't know if something is to be done about this in NB's part or I'm just missing something in the options dialog.
Comment 5 Milutin Kristofic 2014-02-13 10:52:06 UTC
Thank you very much for finding the culprit. I miss this code when I was looking on this actions.

These settings cannot be changed in options. They can be imported from exported settings. They can changed behavior of netbeans, like with identifierAcceptor, I can see in code how they change behavior. 

Maybe you changed in older Netbeans, maybe it could be modified before Netbeans 6.9, or you imported someone options where they manually set this in config files.
Comment 6 letrollpoilu 2019-02-12 13:41:19 UTC
Can you explain what does <entry name="identifier-acceptor" remove="true"/>
Is there a way to add delimiters like "_" or "-" in this config file?