Bug 16426 - [search] Search for text in comments / string literals separately
Summary: [search] Search for text in comments / string literals separately
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P5 enhancement with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 337173 485053 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-05-20 09:51 EDT by Jon Skeet CLA
Modified: 2021-10-13 14:52 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Skeet CLA 2002-05-20 09:51:40 EDT
Currently the only way to search for parts of comments and string literals is to
use the full text search. It would be great to be able to search just string
literals, or search just comments.
Comment 1 Erich Gamma CLA 2002-05-20 19:25:42 EDT
Text search is currently defined at platform level and doesn't know about Java.
Cannot address for 2.0
Comment 2 Dani Megert CLA 2002-08-19 10:23:35 EDT
There could be other/new Java "Search for" types:
- String literal
- Comment
- Javadoc comment
Comment 3 Dani Megert CLA 2002-08-19 10:24:02 EDT
Moving to J Core for comment about such a Search enginge extension
Comment 4 Philipe Mulet CLA 2002-10-28 10:58:45 EST
Not for 2.1 either.
Comment 5 Frederic Fusier CLA 2007-06-21 12:19:25 EDT
Reopen as LATER is deprecated...
Comment 6 Frederic Fusier CLA 2007-06-21 12:19:56 EDT
May be addressed while fixing bug 155013...
Comment 7 Frederic Fusier CLA 2007-08-14 05:04:52 EDT
After having worked on prototype for bug 155013, I realized that fine grain search only concern reference to java element, neither for string literal nor for text in comments...

So, put back to low priority (similar as LATER)...
Comment 8 Dani Megert CLA 2011-02-15 02:36:46 EST
*** Bug 337173 has been marked as a duplicate of this bug. ***
Comment 9 Markus Keller CLA 2011-02-15 06:53:24 EST
See also bug 337200.
Comment 10 Noopur Gupta CLA 2016-01-07 10:00:48 EST
*** Bug 485053 has been marked as a duplicate of this bug. ***
Comment 11 Julian Ruppel CLA 2021-10-13 14:52:16 EDT
It is hard to believe that this bug is reported in 2002, nevertheless, it is probably even more relevant now than it was back then...

Especially finding references of java classes, methods, constructors etc. in String literals is a frequent use case when you deal with e.g. JPA JPQL or Spring Caching annotations. There are probably more valid examples in other frameworks.

IntelliJ offers similar things https://stackoverflow.com/a/28720224/1239904