Bug 562768 - [code mining] Don't show "find references" code minings for methods from java.lang.Object
Summary: [code mining] Don't show "find references" code minings for methods from java...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.16   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-04 07:04 EDT by Till Brychcy CLA
Modified: 2023-01-11 07:37 EST (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 Till Brychcy CLA 2020-05-04 07:04:56 EDT
Extracted from bug 560139 comment 7:

> I haven't tried, but from a quick look at the example, I guess the problem
> is that "find references" is done for multiple equals and toString methods.
> 
> Doing this kind of search even for a single method is very slow in Eclipse
> (unless the search scope is small). IIRC Eclipse just has a simple text
> index to find candidate classes that use methods with that method name at
> all, and then parses and creates bindings for all the candidate classes
> (which for equals and toString often means almost all classes that are in
> the search scope)
Comment 1 Mickael Istria CLA 2020-05-04 10:33:31 EDT
Condition on JavaElementCodeMiningProvider L155 (just before minings.add(new JavaReferenceCodeMining(....)) can be refined to exclude the case of element being a field of Object.
Comment 2 Mickael Istria CLA 2020-05-04 10:34:52 EDT
@Henrik @Floris: this seems like an easy fix (see previous comment). Care to give it  a try?
Comment 3 Mickael Istria CLA 2020-06-04 12:16:12 EDT
This is still a valid and good thing to implement.
Comment 4 Roland Grunberg CLA 2021-01-05 12:33:02 EST
Marking as ASSIGNED (to the jdt-inbox). This just indicates it has been triaged and deemed something worth pursuing should anyone find the time to work on it.
Comment 5 Eclipse Genie CLA 2023-01-11 07:37:59 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.