Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find usages in this hierarchy #56176

Open
marcglasberg opened this issue Jul 8, 2024 · 1 comment
Open

Find usages in this hierarchy #56176

marcglasberg opened this issue Jul 8, 2024 · 1 comment
Labels
area-intellij Tracking issues for the Dart IntelliJ plugin. type-enhancement A request for a change that isn't a bug

Comments

@marcglasberg
Copy link

In IntelliJ, if you press CTRL-ALT-F7 in a keyword that is used a lot, like a toString() declaration (in a large codebase), it will take FOREVER to finish. Actually I am not sure it would finish, I could never really wait enough to see it finish. I just see this:

194624662-5bb7122e-9a4d-46b6-885c-5776b3384fb4

As per @stevemessick suggestion (here: flutter/flutter-intellij#6346) I'm opening this to ask for a "Find usages in this hierarchy".

It should simply find the usages of the method on objects of that specific class and its subclasses.

It should not matter where it's defined. It matters the class of the method the caret was when I asked for Find Usages. It I was in MyClass.toString() then it finds toString() usages for MyClass and its subclasses. It should not find in superclasses. For example, it should not find this:

void logError(Object? obj) => obj.toString();

But it would find those:

void logError(MyClass? obj) => obj.toString();
void logError(MyClassSubclass? obj) => obj.toString();
@dart-github-bot
Copy link
Collaborator

Summary: The "Find Usages" feature in IntelliJ takes an extremely long time to complete when searching for usages of a widely used keyword like toString(). The user proposes a "Find Usages in this hierarchy" feature that would only search for usages within the current class and its subclasses, excluding superclasses.

@dart-github-bot dart-github-bot added area-intellij Tracking issues for the Dart IntelliJ plugin. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-enhancement A request for a change that isn't a bug labels Jul 8, 2024
@lrhn lrhn removed the triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-intellij Tracking issues for the Dart IntelliJ plugin. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants