I just upgraded my NetBeans from 12 to 13.
When i doubleclick a classname or variable name, she only selects part of it:
Refactor (Ctrl R) still works.
But if you think all my custom class file names have _ in it; not copying classnames (Ctrl C) at ease is a big deal for me.
Do you know how to change it back?
CodePudding user response:
I was unable to reproduce your problem with NetBeans 13, nor could I find any setting under Tools > Options > Editor that might be relevant.
However, an old NetBeans Bug Report Bug 239257 - Select identifier considers "_" (underscore) as a separator described your problem, and explained how to replicate it:
For your NetBeans 13 installation, locate the file org-netbeans-modules-editor-settings-CustomPreferences.xml
In my case the path to that file was under my NetBeans user directory, in C:\Users\johndoe\AppData\Roaming\NetBeans\13\config\Editors\text\x-java\Preferences
Open that file in any text editor.
To provoke the problem if it doesn't exist, insert the following line into that file under the
<editor-preferences>
element, save it, then restart NetBeans:<entry name="identifier-acceptor" remove="true"/>
To prevent the problem, which is what you want to do, remove that same line from the file, save it, then restart NetBeans. Selection should then work correctly.
Here's the complete content of my instance of org-netbeans-modules-editor-settings-CustomPreferences.xml after I added that entry on line 6 to replicate your problem:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE editor-preferences PUBLIC "-//NetBeans//DTD Editor Preferences 1.0//EN" "http://www.netbeans.org/dtds/EditorPreferences-1_0.dtd">
<editor-preferences>
<entry javaType="java.lang.Boolean" name="enable-indent" xml:space="preserve"><value><![CDATA[true]]></value></entry>
<entry javaType="java.lang.String" name="importGroupsOrder" xml:space="preserve"><value><![CDATA[*]]></value></entry>
<entry name="identifier-acceptor" remove="true"/>
<entry name="code-folding-collapse-innerclass" remove="true"/>
<entry name="code-folding-collapse-javadoc" remove="true"/>
<entry name="code-folding-collapse-method" remove="true"/>
<entry name="pair-characters-completion" remove="true"/>
<entry name="show-deprecated-members" remove="true"/>
</editor-preferences>
Notes:
- I have not imported old settings for my NetBeans 13 installation. If you did, then that may be what provoked the problem. I have no idea how that value could get set/unset other than by editing the file.
- If this does not resolve your problem update your question with the content of org-netbeans-modules-editor-settings-CustomPreferences.xml