eclipse-jdt / eclipse-jdt/eclipse.jdt.ui

QuickFix for annotations import not enough grained

Open
#243 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
59
Forks
127
Avg merge
22h 47m
Merged PRs (30d)
28

Description

I want to describe a small bug/enhancement for Quick Fix function.

When we add an annotation for class/method/field we can see in proposes an imports, that a not applicable for given context.

For demonstration I have created [small project](https://github.com/bvfalcon/eclipse-ide-annotation-quickfix-test):

Creating a method and annotating it with `@Test` annotation. We have in classpath two annotations with such name, but they have different `@Target`. For our context applicable only one of these annotations - red arrow. Green arrow is not applicable and cannot be shown in Quick Fix

![screenshot-1](https://user-images.githubusercontent.com/49613576/187518356-38b7e122-36d3-4a0c-a8fb-ce0692a82edf.png)
Screenshot 1

![screenshot-2](https://user-images.githubusercontent.com/49613576/187518372-3026b89a-194c-48ef-92f6-28982691d5f1.png)
Screenshot 2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.