Skip to content

Commit df54989

Browse files
committed
[#98] Add SymbolTag values for access modifiers and other modifiers
1 parent 2344e6a commit df54989

File tree

2 files changed

+234
-3
lines changed

2 files changed

+234
-3
lines changed

Diff for: _specifications/lsp/3.18/language/documentSymbol.md

+118-2
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,127 @@ export namespace SymbolTag {
165165

166166
/**
167167
* Render a symbol as obsolete, usually using a strike-out.
168+
* @since 3.16
168169
*/
169-
export const Deprecated: 1 = 1;
170+
export const Deprecated = 1;
171+
172+
/**
173+
* Render a symbol with visibility / access modifier "private".
174+
* @since 3.18
175+
*/
176+
export const Private = 2;
177+
178+
/**
179+
* Render a symbol with visibility "package private", e.g. in Java.
180+
* @since 3.18
181+
*/
182+
export const Package = 3;
183+
184+
/**
185+
* Render a symbol with visibility / access modifier "protected".
186+
* The modifier could be combined e.g. with "internal" or "private" in languages like C#.
187+
* @since 3.18
188+
*/
189+
export const Protected = 4;
190+
191+
/**
192+
* Render a symbol with visibility / access modifier "public".
193+
* @since 3.18
194+
*/
195+
export const Public = 5;
196+
197+
/**
198+
* Render a symbol with visibility / access modifier "internal", e.g. in C# or Kotlin.
199+
* @since 3.18
200+
*/
201+
export const Internal= 6;
202+
203+
/**
204+
* Render a symbol with visibility / access modifier "file", e.g. in C#.
205+
* @since 3.18
206+
*/
207+
export const File = 7;
208+
209+
/**
210+
* Render a symbol as "static".
211+
* @since 3.18
212+
*/
213+
export const Static = 8;
214+
215+
/**
216+
* Render a symbol as "abstract".
217+
* @since 3.18
218+
*/
219+
export const Abstract = 9;
220+
221+
/**
222+
* Render a symbol as "final".
223+
* @since 3.18
224+
*/
225+
export const Final = 10;
226+
227+
/**
228+
* Render a symbol as "sealed", e.g. classes and interfaces in Kotlin.
229+
* @since 3.18
230+
*/
231+
export const Sealed = 11;
232+
233+
/**
234+
* Render a symbol as "transient", e.g. in Java.
235+
* @since 3.18
236+
*/
237+
export const Transient = 12;
238+
239+
/**
240+
* Render a symbol as "volatile", e.g. in Java.
241+
* @since 3.18
242+
*/
243+
export const Volatile = 13;
244+
245+
/**
246+
* Render a symbol as "synchronized", e.g. in Java.
247+
* @since 3.18
248+
*/
249+
export const Synchronized = 14;
250+
251+
/**
252+
* Render a symbol as "virtual", e.g. in C++.
253+
* @since 3.18
254+
*/
255+
export const Virtual = 15;
256+
257+
/**
258+
* Render a symbol as "nullable", e.g. types with '?' in Kotlin.
259+
* @since 3.18
260+
*/
261+
export const Nullable = 16;
262+
263+
/**
264+
* Render a symbol as "never null", e.g. types without '?' in Kotlin.
265+
* @since 3.18
266+
*/
267+
export const NonNull = 17;
268+
269+
/**
270+
* Render a symbol as declaration.
271+
* @since 3.18
272+
*/
273+
export const Declaration = 18;
274+
275+
/**
276+
* Render a symbol as definition (in contrast to declaration), e.g. in header files in C++.
277+
* @since 3.18
278+
*/
279+
export const Definition = 19;
280+
281+
/**
282+
* Render a symbol as "read-only", i.e. variables / properties that cannot be changed.
283+
* @since 3.18
284+
*/
285+
export const ReadOnly = 20;
170286
}
171287

172-
export type SymbolTag = 1;
288+
export type SymbolTag = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
173289
```
174290

175291
<div class="anchorHolder"><a href="#documentSymbol" name="documentSymbol" class="linkableAnchor"></a></div>

Diff for: _specifications/lsp/3.18/metaModel/metaModel.json

+116-1
Original file line numberDiff line numberDiff line change
@@ -14164,7 +14164,122 @@
1416414164
{
1416514165
"name": "Deprecated",
1416614166
"value": 1,
14167-
"documentation": "Render a symbol as obsolete, usually using a strike-out."
14167+
"documentation": "Render a symbol as obsolete, usually using a strike-out.",
14168+
"since": "3.16"
14169+
},
14170+
{
14171+
"name": "Private",
14172+
"value": 2,
14173+
"documentation": "Render a symbol with visibility / access modifier \"private\".",
14174+
"since": "3.18"
14175+
},
14176+
{
14177+
"name": "Package",
14178+
"value": 3,
14179+
"documentation": "Render a symbol with visibility \"package private\", e.g. in Java.",
14180+
"since": "3.18"
14181+
},
14182+
{
14183+
"name": "Protected",
14184+
"value": 4,
14185+
"documentation": "Render a symbol with visibility / access modifier \"protected\". The modifier could be combined e.g. with \"internal\" or \"private\" in languages like C#.",
14186+
"since": "3.18"
14187+
},
14188+
{
14189+
"name": "Public",
14190+
"value": 5,
14191+
"documentation": "Render a symbol with visibility / access modifier \"public\".",
14192+
"since": "3.18"
14193+
},
14194+
{
14195+
"name": "Internal",
14196+
"value": 6,
14197+
"documentation": "Render a symbol with visibility / access modifier \"internal\", e.g. in C# or Kotlin.",
14198+
"since": "3.18"
14199+
},
14200+
{
14201+
"name": "File",
14202+
"value": 7,
14203+
"documentation": "Render a symbol with visibility / access modifier \"file\", e.g. in C#.",
14204+
"since": "3.18"
14205+
},
14206+
{
14207+
"name": "Static",
14208+
"value": 8,
14209+
"documentation": "Render a symbol as \"static\".",
14210+
"since": "3.18"
14211+
},
14212+
{
14213+
"name": "Abstract",
14214+
"value": 9,
14215+
"documentation": "Render a symbol as \"abstract\".",
14216+
"since": "3.18"
14217+
},
14218+
{
14219+
"name": "Final",
14220+
"value": 10,
14221+
"documentation": "Render a symbol as \"final\".",
14222+
"since": "3.18"
14223+
},
14224+
{
14225+
"name": "Sealed",
14226+
"value": 11,
14227+
"documentation": "Render a symbol as \"sealed\", e.g. classes and interfaces in Kotlin.",
14228+
"since": "3.18"
14229+
},
14230+
{
14231+
"name": "Transient",
14232+
"value": 12,
14233+
"documentation": "Render a symbol as \"transient\", e.g. in Java.",
14234+
"since": "3.18"
14235+
},
14236+
{
14237+
"name": "Volatile",
14238+
"value": 13,
14239+
"documentation": "Render a symbol as \"volatile\", e.g. in Java.",
14240+
"since": "3.18"
14241+
},
14242+
{
14243+
"name": "Synchronized",
14244+
"value": 14,
14245+
"documentation": "Render a symbol as \"synchronized\", e.g. in Java.",
14246+
"since": "3.18"
14247+
},
14248+
{
14249+
"name": "Virtual",
14250+
"value": 15,
14251+
"documentation": "Render a symbol as \"virtual\", e.g. in C++.",
14252+
"since": "3.18"
14253+
},
14254+
{
14255+
"name": "Nullable",
14256+
"value": 16,
14257+
"documentation": "Render a symbol as \"nullable\", e.g. types with '?' in Kotlin.",
14258+
"since": "3.18"
14259+
},
14260+
{
14261+
"name": "NonNull",
14262+
"value": 17,
14263+
"documentation": "Render a symbol as \"never null\", e.g. types without '?' in Kotlin.",
14264+
"since": "3.18"
14265+
},
14266+
{
14267+
"name": "Declaration",
14268+
"value": 18,
14269+
"documentation": "Render a symbol as declaration.",
14270+
"since": "3.18"
14271+
},
14272+
{
14273+
"name": "Definition",
14274+
"value": 19,
14275+
"documentation": "Render a symbol as definition (in contrast to declaration), e.g. in header files in C++.",
14276+
"since": "3.18"
14277+
},
14278+
{
14279+
"name": "ReadOnly",
14280+
"value": 20,
14281+
"documentation": "Render a symbol as \"read-only\", i.e. variables / properties that cannot be changed.",
14282+
"since": "3.18"
1416814283
}
1416914284
],
1417014285
"documentation": "Symbol tags are extra annotations that tweak the rendering of a symbol.\n\n@since 3.16",

0 commit comments

Comments
 (0)