Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <https://github.com/eclipse-lsp4j/lsp4j/milestone/37?closed=1>

* Removed `@Deprecated` annotations on members deprecated in the LSP/DAP protocol [#895](https://github.com/eclipse-lsp4j/lsp4j/issues/895)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The Maven Repositories, p2 Update Sites, and the Snapshots contain _signed jars_

### Supported LSP Versions

* LSP4J 1.0.&ast; _(Next release)_ &rarr; LSP 3.17.0
* LSP4J 1.0.&ast; _(Next release)_ &rarr; LSP 3.17.0 (plus [SymbolTag proposal](https://github.com/microsoft/language-server-protocol/pull/2003))
* LSP4J 0.24.&ast; &rarr; LSP 3.17.0
* LSP4J 0.23.&ast; &rarr; LSP 3.17.0
* LSP4J 0.22.&ast; &rarr; LSP 3.17.0
Expand Down
160 changes: 158 additions & 2 deletions org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SymbolTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <p>
* Since 3.16
*/
public enum SymbolTag {

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

/**
* <p>Render a symbol with visibility / access modifier "private".</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Private(2),

/**
* <p>Render a symbol with visibility "package private", e.g. in Java.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Package(3),

/**
* <p>Render a symbol with visibility / access modifier "protected".
* The modifier could be combined e.g. with "internal" or "private" in languages like C#.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Protected(4),

/**
* <p>Render a symbol with visibility / access modifier "public".</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Public(5),

/**
* <p>Render a symbol with visibility / access modifier "internal", e.g. in C# or Kotlin.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Internal(6),

/**
* <p>Render a symbol with visibility / access modifier "file", e.g. in C#.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
File(7),

/**
* <p>Render a symbol as "static".</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Static(8),

/**
* <p>Render a symbol as "abstract".</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Abstract(9),

/**
* <p>Render a symbol as "final".</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Final(10),

/**
* <p>Render a symbol as "sealed", e.g. classes and interfaces in Kotlin.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Sealed(11),

/**
* <p>Render a symbol as "transient", e.g. in Java.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Transient(12),

/**
* <p>Render a symbol as "volatile", e.g. in Java.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Volatile(13),

/**
* <p>Render a symbol as "synchronized", e.g. in Java.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Synchronized(14),

/**
* <p>Render a symbol as "virtual", e.g. in C++.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Virtual(15),

/**
* <p>Render a symbol as "nullable", e.g. types with '?' in Kotlin.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Nullable(16),

/**
* <p>Render a symbol as "never null", e.g. types without '?' in Kotlin.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
NonNull(17),

/**
* <p>Render a symbol as declaration.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Declaration(18),

/**
* <p>Render a symbol as definition (in contrast to declaration), e.g. in header files in C++.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
@ProtocolDraft
Definition(19),

/**
* <p>Render a symbol as "read-only", i.e. variables / properties that cannot be changed.</p>
*
* <p>This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a></p>
*/
Deprecated(1);
@ProtocolDraft
ReadOnly(20);

private final int value;

Expand Down
Loading