Skip to content

Limit type proposals for Class<T> annotation elements to T or subtypes of T #419

@eric-milles

Description

@eric-milles

When completing on annotation like JUnit's @RunWith, proposals should be filtered to Types and Static Members that are assignable to Runner.

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Inherited
public @interface RunWith {
    /**
     * @return a Runner class (must have a constructor that takes a single Class to run)
     */
    Class<? extends Runner> value();
}
import org.junit.runner.RunWith
import org.mockito.runners.MockitoJUnitRunner

@RunWith(MockitoJUnitRunner) // propose only classes and static final fields with matching type here
class SomeTests {
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions