Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Customize extract methods(Can I have default annotation when doing extract method?)
Customize extract methods [message #903298] Thu, 23 August 2012 01:01 Go to next message
Carfield Yim is currently offline Carfield YimFriend
Messages: 30
Registered: July 2009
Member
HI, I would like to add "@ParametersAreNonnullByDefault" annotation every time when using the extract method refactoring?
Re: Customize extract methods [message #903749 is a reply to message #903298] Sat, 25 August 2012 12:08 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
How should the refactoring know? Other users do not want this, so always adding it would be wrong.

The annotation "@ParametersAreNonnullByDefault" is not known to the JDT.
The set of annotations understood by JDT (since Juno, see [1]) includes
@NonNullByDefault, which can be applied to packages, classes/interfaces and methods.
In this case there's no need to add the annotation to each individual method.

cheers,
Stephan

[1] http://eclipse.dzone.com/articles/eclipse-jdt-understands-null
Previous Topic:Importing Java Web EE Netbeans Project to Eclipse
Next Topic:LTK refactoring tutorial
Goto Forum:
  


Current Time: Thu Apr 18 13:36:20 GMT 2024

Powered by FUDForum. Page generated in 0.01563 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top