Bug 573881 - Use syntax highlighting to allow for skipping comments in in-editor searches
Summary: Use syntax highlighting to allow for skipping comments in in-editor searches
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.19   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-01 04:37 EDT by Eyal Rozenberg CLA
Modified: 2021-06-02 06:51 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg CLA 2021-06-01 04:37:18 EDT
In the editor Find/Replace dialog (not the File Search dialog), it would be useful if an option were added to skip searching comment text.

While a piece of text being a comment is not a feature of the text itself - the Eclipse IDE editor supports syntax highlighting, which IIUC that it some black-box is telling it to mark some text as comment. On that level, I believe such a feature should be implementable without the need for deep semantic analysis. This would allow circumventing the language-agnosticism of the platform, brought up as an objection on this related issue:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=16426#c1

This would be very useful for two reasons:

1. In comment text, one often refers to the actual code using language reserved-words ("this function does X", "this class is Y"); also, one often uses them as pronouns and connectives: "this", "and", "or" etc.

2. When you have a bunch of code commented out, and you're only interested in finding a word which actually affects program behavior.