1

When I tell to Eclipse to generate methods (Add unimplemented methods popup) from inherited interface/abstract class, can I configure it to make these methods final by default ?

I'm aware of the Save actions hook in Eclipse but there's no preconfigured action to specify something like: "Add final modifier to method signature" or am I missing something ?

Also, when I create a class, is there a way to check the checkbox final by default ? I know it's not hard to do it by hand but it could be useful for me in case I forgot to check it. I'm aware of this similar question but in 2011 there was no answer (maybe now there's one !).

PS: you can assume I'm using the latest version of Eclipse (Mars - 4.5.0).

Community
  • 1
  • 1
Spotted
  • 4,021
  • 17
  • 33
  • No need to specify `final` on methods of a `final` class. They are implicitly final. --- If you forgot the one click to check the "final" box, it only takes 6 keystrokes to type the word. – Andreas Oct 16 '15 at 10:26
  • @Andreas I need to specify `final` on (non-abstract) methods in abstract classes – Spotted Oct 16 '15 at 10:49

1 Answers1

0

Since I assume you don't like the answer given in the link you specified, which is to create your own custom 'new class wizard' for Eclipse, the answer is: No

Community
  • 1
  • 1
Andreas
  • 154,647
  • 11
  • 152
  • 247
  • I'm not against creating my own wizard, but the answers in the link we made reference to are a bit vague... – Spotted Oct 16 '15 at 11:05