Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use Intellij annotations in Eclipse IDE?

Is there a way we can use the jetbrains annotations @notnull and @nullable in eclipse ? i tried to search for jars online but could not find them. any help is appreciated.

like image 875
user2707760 Avatar asked Dec 12 '13 16:12

user2707760


People also ask

How do I enable annotations in IntelliJ?

Enable external annotationsPress Ctrl+Alt+S to open the IDE settings and select Editor | Code Style | Java | Code Generation. Select the Use external annotations checkbox.

How do I set annotation processing in IntelliJ?

Configure an annotation profilePress Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment | Compiler | Annotation Processors.


1 Answers

From the JetBrains website:

These annotations are proprietary ones and included in the bundled JAR. We at JetBrains suggested to include these annotations in the standard Java SDK. The issue is still pending.

Currently the annotations are distributed under the Apache license. The source code is supplied as well.

So, not only you can use them in Eclipse, you can do so without violating some commercial license. And they're even available in Maven.

However, you may want to read some related questions here on SO:

@Nullable/@NotNull with IntelliJ IDEA, Maven & JSR 305

like image 100
fvu Avatar answered Oct 16 '22 03:10

fvu