Skip to content

Commit 62b1364

Browse files
committed
Add symbol tags as proposed for LSP specification
See microsoft/language-server-protocol#2003
1 parent f235e91 commit 62b1364

File tree

1 file changed

+157
-2
lines changed

1 file changed

+157
-2
lines changed

Diff for: org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SymbolTag.java

+157-2
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,172 @@
1212

1313
package org.eclipse.lsp4j;
1414

15+
import com.google.common.annotations.Beta;
16+
1517
/**
1618
* Symbol tags are extra annotations that tweak the rendering of a symbol.
17-
* <p>
1819
* Since 3.16
1920
*/
2021
public enum SymbolTag {
2122

2223
/**
2324
* Render a symbol as obsolete, usually using a strike-out.
25+
* Since 3.16
26+
*/
27+
Deprecated(1),
28+
29+
/**
30+
* Render a symbol with visibility / access modifier "private".
31+
*
32+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
33+
*/
34+
@Beta
35+
Private(2),
36+
37+
/**
38+
* Render a symbol with visibility "package private", e.g. in Java.
39+
*
40+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
41+
*/
42+
@Beta
43+
Package(3),
44+
45+
/**
46+
* Render a symbol with visibility / access modifier "protected".
47+
* The modifier could be combined e.g. with "internal" or "private" in languages like C#.
48+
*
49+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
50+
*/
51+
@Beta
52+
Protected(4),
53+
54+
/**
55+
* Render a symbol with visibility / access modifier "public".
56+
*
57+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
58+
*/
59+
@Beta
60+
Public(5),
61+
62+
/**
63+
* Render a symbol with visibility / access modifier "internal", e.g. in C# or Kotlin.
64+
*
65+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
66+
*/
67+
@Beta
68+
Internal(6),
69+
70+
/**
71+
* Render a symbol with visibility / access modifier "file", e.g. in C#.
72+
*
73+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
74+
*/
75+
@Beta
76+
File(7),
77+
78+
/**
79+
* Render a symbol as "static".
80+
*
81+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
82+
*/
83+
@Beta
84+
Static(8),
85+
86+
/**
87+
* Render a symbol as "abstract".
88+
*
89+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
90+
*/
91+
@Beta
92+
Abstract(9),
93+
94+
/**
95+
* Render a symbol as "final".
96+
*
97+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
98+
*/
99+
@Beta
100+
Final(10),
101+
102+
/**
103+
* Render a symbol as "sealed", e.g. classes and interfaces in Kotlin.
104+
*
105+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
106+
*/
107+
@Beta
108+
Sealed(11),
109+
110+
/**
111+
* Render a symbol as "transient", e.g. in Java.
112+
*
113+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
114+
*/
115+
@Beta
116+
Transient(12),
117+
118+
/**
119+
* Render a symbol as "volatile", e.g. in Java.
120+
*
121+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
122+
*/
123+
@Beta
124+
Volatile(13),
125+
126+
/**
127+
* Render a symbol as "synchronized", e.g. in Java.
128+
*
129+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
130+
*/
131+
@Beta
132+
Synchronized(14),
133+
134+
/**
135+
* Render a symbol as "virtual", e.g. in C++.
136+
*
137+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
138+
*/
139+
@Beta
140+
Virtual(15),
141+
142+
/**
143+
* Render a symbol as "nullable", e.g. types with '?' in Kotlin.
144+
*
145+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
146+
*/
147+
@Beta
148+
Nullable(16),
149+
150+
/**
151+
* Render a symbol as "never null", e.g. types without '?' in Kotlin.
152+
*
153+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
154+
*/
155+
@Beta
156+
NonNull(17),
157+
158+
/**
159+
* Render a symbol as declaration.
160+
*
161+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
162+
*/
163+
@Beta
164+
Declaration(18),
165+
166+
/**
167+
* Render a symbol as definition (in contrast to declaration), e.g. in header files in C++.
168+
*
169+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
170+
*/
171+
@Beta
172+
Definition(19),
173+
174+
/**
175+
* Render a symbol as "read-only", i.e. variables / properties that cannot be changed.
176+
*
177+
* This is an LSP <b>proposal</b>. See <a href="https://github.com/microsoft/language-server-protocol/pull/2003">PR</a>
24178
*/
25-
Deprecated(1);
179+
@Beta
180+
ReadOnly(20);
26181

27182
private final int value;
28183

0 commit comments

Comments
 (0)