Skip to content

Commit

Permalink
Add symbol tags as proposed for LSP specification
Browse files Browse the repository at this point in the history
  • Loading branch information
travkin79 committed Nov 20, 2024
1 parent f235e91 commit 91b187f
Showing 1 changed file with 118 additions and 3 deletions.
121 changes: 118 additions & 3 deletions org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SymbolTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,130 @@

/**
* Symbol tags are extra annotations that tweak the rendering of a symbol.
* <p>
* Since 3.16
* Since 3.18
*/
public enum SymbolTag {

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

/**
* Render a symbol with visibility / access modifier "private".
* @since 3.18
*/
Private(2),

/**
* Render a symbol with visibility "package private", e.g. in Java.
* @since 3.18
*/
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#.
* @since 3.18
*/
Protected(4),

/**
* Render a symbol with visibility / access modifier "public".
* @since 3.18
*/
Public(5),

/**
* Render a symbol with visibility / access modifier "internal", e.g. in C# or Kotlin.
* @since 3.18
*/
Internal(6),

/**
* Render a symbol with visibility / access modifier "file", e.g. in C#.
* @since 3.18
*/
File(7),

/**
* Render a symbol as "static".
* @since 3.18
*/
Static(8),

/**
* Render a symbol as "abstract".
* @since 3.18
*/
Abstract(9),

/**
* Render a symbol as "final".
* @since 3.18
*/
Final(10),

/**
* Render a symbol as "sealed", e.g. classes and interfaces in Kotlin.
* @since 3.18
*/
Sealed(11),

/**
* Render a symbol as "transient", e.g. in Java.
* @since 3.18
*/
Transient(12),

/**
* Render a symbol as "volatile", e.g. in Java.
* @since 3.18
*/
Volatile(13),

/**
* Render a symbol as "synchronized", e.g. in Java.
* @since 3.18
*/
Synchronized(14),

/**
* Render a symbol as "virtual", e.g. in C++.
* @since 3.18
*/
Virtual(15),

/**
* Render a symbol as "nullable", e.g. types with '?' in Kotlin.
* @since 3.18
*/
Nullable(16),

/**
* Render a symbol as "never null", e.g. types without '?' in Kotlin.
* @since 3.18
*/
NonNull(17),

/**
* Render a symbol as declaration.
* @since 3.18
*/
Declaration(18),

/**
* Render a symbol as definition (in contrast to declaration), e.g. in header files in C++.
* @since 3.18
*/
Definition(19),

/**
* Render a symbol as "read-only", i.e. variables / properties that cannot be changed.
* @since 3.18
*/
ReadOnly(20);

private final int value;

Expand Down

0 comments on commit 91b187f

Please sign in to comment.