diff --git a/CHANGELOG.md b/CHANGELOG.md index e17bad6c..a5ffdd88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ### v1.0.0 (TBD) +* Implemented [LSP proposal](https://github.com/microsoft/language-server-protocol/pull/2003) for `SymbolTag` [#856](https://github.com/eclipse-lsp4j/lsp4j/pull/856) + Fixed issues: * Removed `@Deprecated` annotations on members deprecated in the LSP/DAP protocol [#895](https://github.com/eclipse-lsp4j/lsp4j/issues/895) diff --git a/README.md b/README.md index 8f229030..d712b5c4 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ The Maven Repositories, p2 Update Sites, and the Snapshots contain _signed jars_ ### Supported LSP Versions - * LSP4J 1.0.* _(Next release)_ → LSP 3.17.0 + * LSP4J 1.0.* _(Next release)_ → LSP 3.17.0 (plus [SymbolTag proposal](https://github.com/microsoft/language-server-protocol/pull/2003)) * LSP4J 0.24.* → LSP 3.17.0 * LSP4J 0.23.* → LSP 3.17.0 * LSP4J 0.22.* → LSP 3.17.0 diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SymbolTag.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SymbolTag.java index ef2012ef..036ca3da 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SymbolTag.java +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SymbolTag.java @@ -12,17 +12,173 @@ package org.eclipse.lsp4j; +import org.eclipse.lsp4j.jsonrpc.ProtocolDraft; + + /** * Symbol tags are extra annotations that tweak the rendering of a symbol. - *

* Since 3.16 */ public enum SymbolTag { /** * Render a symbol as obsolete, usually using a strike-out. + * Since 3.16 + */ + Deprecated(1), + + /** + *

Render a symbol with visibility / access modifier "private".

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Private(2), + + /** + *

Render a symbol with visibility "package private", e.g. in Java.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Package(3), + + /** + *

Render a symbol with visibility / access modifier "protected". + * The modifier could be combined e.g. with "internal" or "private" in languages like C#.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Protected(4), + + /** + *

Render a symbol with visibility / access modifier "public".

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Public(5), + + /** + *

Render a symbol with visibility / access modifier "internal", e.g. in C# or Kotlin.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Internal(6), + + /** + *

Render a symbol with visibility / access modifier "file", e.g. in C#.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + File(7), + + /** + *

Render a symbol as "static".

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Static(8), + + /** + *

Render a symbol as "abstract".

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Abstract(9), + + /** + *

Render a symbol as "final".

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Final(10), + + /** + *

Render a symbol as "sealed", e.g. classes and interfaces in Kotlin.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Sealed(11), + + /** + *

Render a symbol as "transient", e.g. in Java.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Transient(12), + + /** + *

Render a symbol as "volatile", e.g. in Java.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Volatile(13), + + /** + *

Render a symbol as "synchronized", e.g. in Java.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Synchronized(14), + + /** + *

Render a symbol as "virtual", e.g. in C++.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Virtual(15), + + /** + *

Render a symbol as "nullable", e.g. types with '?' in Kotlin.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Nullable(16), + + /** + *

Render a symbol as "never null", e.g. types without '?' in Kotlin.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + NonNull(17), + + /** + *

Render a symbol as declaration.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Declaration(18), + + /** + *

Render a symbol as definition (in contrast to declaration), e.g. in header files in C++.

+ * + *

This is an LSP proposal. See PR

+ */ + @ProtocolDraft + Definition(19), + + /** + *

Render a symbol as "read-only", i.e. variables / properties that cannot be changed.

+ * + *

This is an LSP proposal. See PR

*/ - Deprecated(1); + @ProtocolDraft + ReadOnly(20); private final int value;