Community
Participate
Working Groups
Given a project containing the following example: class Test { Object test() { return Test.class; } } 1. Put the cursor over type 'Test' (either place it's mentioned). 2. Open the Java search (e.g. by pressing Ctrl+H). 3. Make sure Type is selected, and a type appears in the box. 4. Next to 'Match locations', click 'x of 15 selected', click 'Select All', then click 'OK'. 5. Click 'Search'. In the results, observe that 'Test.class' is not found. 6. Repeat the above, but in Step 4, choose 'References' instead of 'Match locations'. In the results, observe that 'Test.class' IS found. It would be good to be able to search for class literals like this one :)
You can achieve this by selecting "All occurrences" too. Agree, people might want to limit the search scope to the literals. But unfortunately, given how under-resourced we are, we are not going to be able to get to this any time soon. Copying Markus as this will involve UI work too.