From 3ca2907b072a0747e0af03f2d70becec0c837f33 Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Wed, 11 Jan 2023 17:25:23 +0100 Subject: [PATCH 1/6] Update version to 24.0.0 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fdc6e28..de6fd54 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The annotations are published on [Maven Central](https://repo1.maven.org/maven2/ using gradle write the following in the `build.gradle` file: ``` dependencies { - compileOnly 'org.jetbrains:annotations:23.1.0' + compileOnly 'org.jetbrains:annotations:24.0.0' } ``` @@ -25,7 +25,7 @@ To add a dependency using Maven, write the following in `pom.xml`: org.jetbrains annotations - 23.1.0 + 24.0.0 provided ``` From c36487a61ea833c057b62ea43d934478ba4c545a Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Thu, 12 Jan 2023 11:36:13 +0100 Subject: [PATCH 2/6] Changelog updated --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ec418d..fe02b6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog === +Version 24.0.0 +--- +* Added new annotation: `@CheckReturnValue`. + Version 23.1.0 --- * Added new annotation: `@ApiStatus.Obsolete`. From cc01843e18adfa80d05a396828f3079d7690020a Mon Sep 17 00:00:00 2001 From: "Joseph T. McQuigg" Date: Fri, 10 Feb 2023 22:56:32 -0500 Subject: [PATCH 3/6] Add to README.md kotlin DSL --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index de6fd54..5c7393f 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,21 @@ interpreted by IDEs and static analysis tools to improve code analysis. ## Using the annotations The annotations are published on [Maven Central](https://repo1.maven.org/maven2/org/jetbrains/annotations/). To add a dependency -using gradle write the following in the `build.gradle` file: +using gradle write the following in the +`build.gradle` file (Goovy DSL) ``` dependencies { compileOnly 'org.jetbrains:annotations:24.0.0' } +``` + +or in the `build.gradle.kts` file (Kotlin DSL) +``` +dependencies { + compileOnly("org.jetbrains:annotations:24.0.0") +} + ``` To add a dependency using Maven, write the following in `pom.xml`: ```xml From f0a5f5c9e28e3feec5dd68f31462124e05585324 Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Mon, 13 Feb 2023 14:50:02 +0100 Subject: [PATCH 4/6] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c7393f..0b6c71b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ interpreted by IDEs and static analysis tools to improve code analysis. ## Using the annotations The annotations are published on [Maven Central](https://repo1.maven.org/maven2/org/jetbrains/annotations/). To add a dependency using gradle write the following in the -`build.gradle` file (Goovy DSL) +`build.gradle` file (Groovy DSL) ``` dependencies { compileOnly 'org.jetbrains:annotations:24.0.0' From e575d984fb998b5bf5d42b6d68c87242e771addd Mon Sep 17 00:00:00 2001 From: Thijs Koppen Date: Thu, 16 Feb 2023 18:48:25 +0100 Subject: [PATCH 5/6] Add @Documented where it's currently missing --- .../src/main/java/org/intellij/lang/annotations/Language.java | 2 ++ .../main/java/org/intellij/lang/annotations/MagicConstant.java | 1 + .../src/main/java/org/intellij/lang/annotations/Pattern.java | 2 ++ .../main/java/org/intellij/lang/annotations/PrintFormat.java | 3 +++ common/src/main/java/org/intellij/lang/annotations/RegExp.java | 2 ++ .../main/java/org/jetbrains/annotations/CheckReturnValue.java | 2 ++ gradle.properties | 2 +- 7 files changed, 13 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/org/intellij/lang/annotations/Language.java b/common/src/main/java/org/intellij/lang/annotations/Language.java index e71e0bb..f0322d1 100644 --- a/common/src/main/java/org/intellij/lang/annotations/Language.java +++ b/common/src/main/java/org/intellij/lang/annotations/Language.java @@ -18,6 +18,7 @@ import org.jetbrains.annotations.NonNls; +import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @@ -41,6 +42,7 @@ * Note that using the derived annotation as meta-annotation is not supported. * Meta-annotation works only one level deep. */ +@Documented @Retention(RetentionPolicy.CLASS) @Target({ METHOD, FIELD, PARAMETER, LOCAL_VARIABLE, ANNOTATION_TYPE }) public @interface Language { diff --git a/common/src/main/java/org/intellij/lang/annotations/MagicConstant.java b/common/src/main/java/org/intellij/lang/annotations/MagicConstant.java index 127f05c..3f02eb7 100644 --- a/common/src/main/java/org/intellij/lang/annotations/MagicConstant.java +++ b/common/src/main/java/org/intellij/lang/annotations/MagicConstant.java @@ -75,6 +75,7 @@ * * The @MagicConstant annotation has SOURCE retention, i.e. it is removed upon compilation and does not create any runtime overhead. */ +@Documented @Retention(RetentionPolicy.SOURCE) @Target({ ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE, diff --git a/common/src/main/java/org/intellij/lang/annotations/Pattern.java b/common/src/main/java/org/intellij/lang/annotations/Pattern.java index 3f40e33..34ec818 100644 --- a/common/src/main/java/org/intellij/lang/annotations/Pattern.java +++ b/common/src/main/java/org/intellij/lang/annotations/Pattern.java @@ -19,6 +19,7 @@ import org.jetbrains.annotations.NonNls; import static java.lang.annotation.ElementType.*; +import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @@ -42,6 +43,7 @@ * * @see RegExp */ +@Documented @Retention(RetentionPolicy.CLASS) @Target({ METHOD, FIELD, PARAMETER, LOCAL_VARIABLE, ANNOTATION_TYPE }) public @interface Pattern { diff --git a/common/src/main/java/org/intellij/lang/annotations/PrintFormat.java b/common/src/main/java/org/intellij/lang/annotations/PrintFormat.java index d69f1f7..24f7a16 100644 --- a/common/src/main/java/org/intellij/lang/annotations/PrintFormat.java +++ b/common/src/main/java/org/intellij/lang/annotations/PrintFormat.java @@ -15,6 +15,8 @@ */ package org.intellij.lang.annotations; +import java.lang.annotation.Documented; + /** * Specifies that the method parameter is a printf-style print format pattern, * as described in {@link java.util.Formatter}. @@ -35,6 +37,7 @@ * * @see Pattern */ +@Documented @Pattern(PrintFormatPattern.PRINT_FORMAT) public @interface PrintFormat { } diff --git a/common/src/main/java/org/intellij/lang/annotations/RegExp.java b/common/src/main/java/org/intellij/lang/annotations/RegExp.java index 31c7724..ecdeedd 100644 --- a/common/src/main/java/org/intellij/lang/annotations/RegExp.java +++ b/common/src/main/java/org/intellij/lang/annotations/RegExp.java @@ -18,6 +18,7 @@ import org.jetbrains.annotations.NonNls; import static java.lang.annotation.ElementType.*; +import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @@ -31,6 +32,7 @@ * * @see Language */ +@Documented @Retention(RetentionPolicy.CLASS) @Target({METHOD, FIELD, PARAMETER, LOCAL_VARIABLE, ANNOTATION_TYPE}) @Language("RegExp") diff --git a/common/src/main/java/org/jetbrains/annotations/CheckReturnValue.java b/common/src/main/java/org/jetbrains/annotations/CheckReturnValue.java index aaa99b0..997400c 100644 --- a/common/src/main/java/org/jetbrains/annotations/CheckReturnValue.java +++ b/common/src/main/java/org/jetbrains/annotations/CheckReturnValue.java @@ -1,5 +1,6 @@ package org.jetbrains.annotations; +import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Target; @@ -27,6 +28,7 @@ * * @see Contract#pure() */ +@Documented @Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE, ElementType.PACKAGE}) @ApiStatus.Experimental public @interface CheckReturnValue { diff --git a/gradle.properties b/gradle.properties index 45fd678..de0afeb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,5 +14,5 @@ # limitations under the License. # -projectVersion=24.0.0 +projectVersion=24.0.1 #JDK_5= \ No newline at end of file From bf298f2a377d6b149013e1a35a02d1761e3acbd8 Mon Sep 17 00:00:00 2001 From: Thijs Koppen Date: Thu, 2 Mar 2023 11:26:26 +0100 Subject: [PATCH 6/6] Update version to 24.0.1 --- CHANGELOG.md | 4 ++++ README.md | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe02b6f..39bae56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog === +Version 24.0.1 +--- +* Added `@Documented` annotation where it would be useful. + Version 24.0.0 --- * Added new annotation: `@CheckReturnValue`. diff --git a/README.md b/README.md index 0b6c71b..2c80d3f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ using gradle write the following in the `build.gradle` file (Groovy DSL) ``` dependencies { - compileOnly 'org.jetbrains:annotations:24.0.0' + compileOnly 'org.jetbrains:annotations:24.0.1' } ``` @@ -25,7 +25,7 @@ dependencies { or in the `build.gradle.kts` file (Kotlin DSL) ``` dependencies { - compileOnly("org.jetbrains:annotations:24.0.0") + compileOnly("org.jetbrains:annotations:24.0.1") } ``` @@ -34,7 +34,7 @@ To add a dependency using Maven, write the following in `pom.xml`: org.jetbrains annotations - 24.0.0 + 24.0.1 provided ```