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.
When performing a find/replace in a .rb file, the underscore character (_) is treated as a word delimiter. Does: 0) open .rb file for editing 1) from the Edit menu, choose Replace 2) in the Find What textbox, type @exercises 3) in the Replace With textbox, type @exercises_current 4) note the Whole Words checkbox is enabled (checked) 5) click the Find button Note that @exercises_xyz is replaced with @exercises_current_xyz. The Whole Words feature does not appear to work as expected. Should: When Whole Words is enabled (checked), words containing underscore characters are treated as whole words). The underscore character (_) should not be treated as a word delimiter.
Reproduced. Also happens for other files, e.g. Java. Reassigning to core editor.
moving opened issues from TM <= 6.1 to TM=Dev
'_' character is a word delimiter. And it's treated as a word delimiter in other popular editors as well. Just check with gedit and Open Office - the behavior is identical to NetBeans.
Sorry - OpenOffice and gedit aren't code editors. The Java spec is very clear that _ is a -part- of a name, not a delimiter. foo_bar is one word in Java. It makes sense for possibly vi and emacs to treat this as two words, by an IDE should not. The IDE has facilities to let each language determine what a word is -- there are finders for looking up the end of the word (used for next word, prev word etc. navigation, double click selection, etc). The search/replace mechanism really should be using the same facility to determine wholewordness.
You are right. Just checked the word boundary definition in case of Java and it doesn't include '_'.
changeset 8b06184dddca