Is Alt-Enter SuppressWarnings In The Right Place?

For ages I didn't think that IDEA had the option to auto-insert annotations like: @SuppressWarnings("unchecked").
In this example the options you get from Alt-Enter are:

Change 'typedVector' type to 'java.util.Vector'
Split into declaration and assignment

    Vector<String> typedVector = getUntypedVector();

    public Vector getUntypedVector() {
        Vector untypedVector = new Vector();
        return untypedVector;

I only realised that the option was available (by pressing Right to see sub-options) when searching youtrack for a feature request.

Since inserting the annotation is a quick fix shouldn't it be at the top level?

1 comment
Comment actions Permalink


That 'suppress for method' is neither a quick fix nor is specific to 'unchecked warning' inspection. E.g. you can alt-enter->right arrow on every inspection/quick fix/intention from a menu and see it. That's why it lives at sub-menu.



Please sign in to leave a comment.