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 48113 - Double-click should consider '_' as part of a word
Summary: Double-click should consider '_' as part of a word
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-29 00:18 UTC by ivan
Modified: 2007-09-06 18:06 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 ivan 2004-08-29 00:18:32 UTC
When I double-click in a _programming_ tool
I expcet that it understand identifiers, not
more generic words. 
Right now a double-click considers '_' as a 
word boundry, so many C and C++ variables and
identifiers become harder to select. This doesn't
affect Java as much, even though '_' is a valid Java
identifier constituent because '_' is rarely used 
in Java identifiers.
Comment 1 Martin Roskanin 2004-08-30 09:26:23 UTC
I cannot reproduce the behaviour you are describing.
I tried double-click in the following situations:

    /** 
     *  dsfsdf_dsafd_sdhbashdb_sdkad
     */
    public void one_two(){
	   int local_int_variable;
    }    

and it seems to work correctly. It means i.e. whole identifier
local_int_variable is selected upon double-click...

What JDK and build are you using?
Comment 2 Miloslav Metelka 2004-08-30 09:53:14 UTC
Mato, I've seen this too but I'm unable to reproduce it. What happened
was that I've experienced the symptoms that Ivan was describing. I
don't know however what caused this to happen.
I guess that the SettingsNames.IDENTIFIER_ACCEPTOR setting somehow
went wrong because IIRC (Ivan please correct me if I'w wrong) the
Alt+J which selects/deselects the word under the cursor also stopped
at "_".
We need to find out the way to reproduce. Ivan are you able to
reproduce this consistently?
Comment 3 ivan 2004-08-30 23:45:35 UTC
Ah, this could be specific to the 'cpp' editor.
Let me look into that.
Comment 4 Miloslav Metelka 2004-08-31 16:21:01 UTC
In java it's accomplished by

            settingsMap.put(SettingsNames.IDENTIFIER_ACCEPTOR,
JavaSettingsDefaults.defaultIdentifierAcceptor);

in JavaSettingsInitializer.
Comment 5 Miloslav Metelka 2004-09-06 17:00:00 UTC
Ivan, was the problem local to cpp editor? I will close this for now
please reopen if the problem persists for for non-cpp mime types as well.
Comment 6 ivan 2004-09-09 03:58:06 UTC
Transferring to cpp
Comment 7 Thomas Preisler 2006-05-11 19:16:26 UTC
Just tried this with NB5.0 and it works as it should. It must have been fixed in NB.
Comment 8 ivan 2006-05-11 20:39:22 UTC
Yup, it seems to work for both Java and C/C++.