Skip to content

Omit code completions for methods that are marked @protected #35449

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

Closed
mit-mit opened this issue Dec 19, 2018 · 7 comments
Closed

Omit code completions for methods that are marked @protected #35449

mit-mit opened this issue Dec 19, 2018 · 7 comments
Assignees
Labels
devexp-completion Issues with the analysis server's code completion feature devexp-completion-correctness Issues with the correctness of the analysis server's code completion feature legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@mit-mit
Copy link
Member

mit-mit commented Dec 19, 2018

The meta package contains an @protected annotation for members that should only be invoked from within a class itself. #25841 added analyzer support to warn on all calls to @Protected methods from elsewhere. The present bug request going one step further: omit all @Protected methods from the code completion dialog. This seems like the desired UX given using such a code completion would result in an immediate warning, and this doesn't seem useful.

@mit-mit mit-mit added the legacy-area-analyzer Use area-devexp instead. label Dec 19, 2018
@devoncarew devoncarew added the devexp-completion Issues with the analysis server's code completion feature label Dec 19, 2018
@stereotype441 stereotype441 added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug labels Dec 19, 2018
@simc
Copy link

simc commented May 2, 2022

I feel like this should be a higher priority. Currently it is impossible to expose internal non-private methods to generated code but hide them from the user's auto complete 😔

@srawlins
Copy link
Member

Agree

@sigurdm
Copy link
Contributor

sigurdm commented Apr 20, 2023

I think this also affects @internal and @visibleForTesting

@jacob314 jacob314 added the devexp-completion-correctness Issues with the correctness of the analysis server's code completion feature label Feb 7, 2024
@bwilkerson bwilkerson self-assigned this Mar 4, 2024
@bwilkerson bwilkerson removed their assignment Mar 15, 2024
@scheglov scheglov self-assigned this Mar 16, 2024
@scheglov
Copy link
Contributor

copybara-service bot pushed a commit that referenced this issue Mar 18, 2024
…en not available.

Bug: #35449
Change-Id: Ie8d0b3ba354addbf42d2a4efe9c4dbf318e6c659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358120
Reviewed-by: Keerti Parthasarathy <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>
@scheglov
Copy link
Contributor

copybara-service bot pushed a commit that referenced this issue Mar 19, 2024
…n not available.

Bug: #35449
Change-Id: I9e65a0075a69e0bbc00e814272099a6810b82ed9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358261
Commit-Queue: Konstantin Shcheglov <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
@scheglov
Copy link
Contributor

copybara-service bot pushed a commit that referenced this issue Mar 20, 2024
…mbers when not available.

Bug: #35449
Change-Id: I7e02d7fbbc9477ad98dd87327adf3b562fc0fde8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358328
Commit-Queue: Konstantin Shcheglov <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
@westito
Copy link

westito commented May 1, 2024

It is also applicable for @visibleForOverriding. But this is special a little bit, placing between @protected and @visibleForTesting. Code complete should list this method right inside the sub-class body, but not inside an inner function nor outside the class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-completion Issues with the analysis server's code completion feature devexp-completion-correctness Issues with the correctness of the analysis server's code completion feature legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
No open projects
Development

No branches or pull requests

10 participants