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

Allow OverrideOnly method calls for delegation and wrapping in the same class hierarchy #1068

Merged
merged 31 commits into from
Mar 20, 2024

Conversation

novotnyr
Copy link
Collaborator

@novotnyr novotnyr commented Feb 29, 2024

Allow OverrideOnly method calls for delegation and wrapping in the same class hierarchy

For example, do not consider AnAction#update as a violation of OverrideOnly for delegation and wrapping.

  • Introduce bytecode detection for delegate calls with subclasses supported
  • Introduce bytecode detection for super calls with subclasses supported
  • Introduce ApiUsageFilter mechanism as a plug-in method to filter out unnecessary usages for ApiUsageProcessor
  • Add tests with specific samples of AnActions and ActionGroups.

Please note that this is a more general solution than proposed in the IDEA-336988/, as it supports arbitrary classes and methods.

See MP-6077
See IDEA-336988/

@novotnyr novotnyr force-pushed the mp-6076-override-only-delegation-wrapping branch from 3fedfb7 to dd6cb26 Compare March 12, 2024 11:56
@YannCebron
Copy link
Member

Please adjust the title and description of this PR (not AnAction specific)

@novotnyr novotnyr changed the title Do not consider AnAction#update as a violation of OverrideOnly for delegation and wrapping Allow OverrideOnly method calls for delegation and wrapping in the same class hierarchy Mar 13, 2024
@novotnyr novotnyr force-pushed the mp-6076-override-only-delegation-wrapping branch from 176a9bb to 89e2cee Compare March 18, 2024 15:43
@novotnyr novotnyr merged commit 1c6136c into master Mar 20, 2024
2 checks passed
@novotnyr novotnyr deleted the mp-6076-override-only-delegation-wrapping branch March 20, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants