Insert @Override when inserting methods

When making a class extend another class, then if the other class has some abstract methods, there appears a red line under my class, and I can press Alt+Enter and it gives an option "Implement Methods". This is handy! But is it possible to make it automatically add @Override in front of these methods? I only found a way to change what is inside those methods, and I also found a setting "Insert @Override Annotation" under "Code Style / Code Generation" in the settings, but that option was already enabled so has no effect on this situation appearantly.

Is there a way?

Thanks.

6 comments
Comment actions Permalink

Hi.

What IDEA version you are using? E.g. in the latest IDEA 9 the "Select methods to implement" dialog has a check box "Insert @Override".

Alexander.

0
Comment actions Permalink

It's version 8.1.

I guess I'll have to wait till they install a later version here then

0
Comment actions Permalink

Actually I have this check box in 8.1 too.

You could check Project structure dialog / your module / Sources / Language level setting. If it is too low (e.g. 1.4) then annotations are not suggested.

Alexander.

0
Comment actions Permalink

That was it! Thanks.


0

Please sign in to leave a comment.