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();
        untypedVector.add("String");
        return untypedVector;
    }


I only realised that the option was available (by pressing Right to see sub-options) when searching youtrack for a feature request.
http://youtrack.jetbrains.com/issue/IDEABKL-6491#comment=27-378392

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

1 comment

Hello,

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.

Denis

0

Please sign in to leave a comment.