-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathsemanticdb.proto
More file actions
282 lines (239 loc) · 5.05 KB
/
Copy pathsemanticdb.proto
File metadata and controls
282 lines (239 loc) · 5.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
// Original source: https://github.com/scalameta/scalameta/blob/cf796cf2436b40494baf2bdc266623dc65264ad5/semanticdb/semanticdb/semanticdb.proto
// Local modifications:
// - Removes unused fields to minimize the amount of generated code.
// - Adds SymbolInformation.documentation that is pending upstream approval.
syntax = "proto3";
package com.sourcegraph.semanticdb_javac;
enum Schema {
LEGACY = 0;
SEMANTICDB3 = 3;
SEMANTICDB4 = 4;
}
message TextDocuments {
repeated TextDocument documents = 1;
}
message TextDocument {
reserved 4, 8, 9;
Schema schema = 1;
string uri = 2;
string text = 3;
string md5 = 11;
Language language = 10;
repeated SymbolInformation symbols = 5;
repeated SymbolOccurrence occurrences = 6;
}
enum Language {
UNKNOWN_LANGUAGE = 0;
SCALA = 1;
JAVA = 2;
}
message Range {
int32 start_line = 1;
int32 start_character = 2;
int32 end_line = 3;
int32 end_character = 4;
}
message Signature {
oneof sealed_value {
ClassSignature class_signature = 1;
MethodSignature method_signature = 2;
TypeSignature type_signature = 3;
ValueSignature value_signature = 4;
}
}
message ClassSignature {
Scope type_parameters = 1;
repeated Type parents = 2;
Scope declarations = 4;
}
message MethodSignature {
Scope type_parameters = 1;
repeated Scope parameter_lists = 2;
Type return_type = 3;
}
message TypeSignature {
Scope type_parameters = 1;
Type lower_bound = 2;
Type upper_bound = 3;
}
message ValueSignature {
Type tpe = 1;
}
message SymbolInformation {
enum Kind {
reserved 1, 2, 4, 5, 15, 16;
UNKNOWN_KIND = 0;
LOCAL = 19;
FIELD = 20;
METHOD = 3;
CONSTRUCTOR = 21;
TYPE = 7;
PARAMETER = 8;
TYPE_PARAMETER = 9;
PACKAGE = 11;
CLASS = 13;
INTERFACE = 18;
}
enum Property {
UNKNOWN_PROPERTY = 0;
reserved 0x1;
reserved 0x2;
ABSTRACT = 0x4;
FINAL = 0x8;
SEALED = 0x10;
STATIC = 0x1000;
ENUM = 0x4000;
}
reserved 2, 6, 7, 8, 9, 10, 11, 12, 14, 15;
string symbol = 1;
Language language = 16;
Kind kind = 3;
int32 properties = 4;
string display_name = 5;
// -- OUT OF SPEC -- //
repeated AnnotationTree annotations = 13;
// -- OUT OF SPEC -- //
Signature signature = 17;
Access access = 18;
repeated string overridden_symbols = 19;
Documentation documentation = 20;
}
message Access {
oneof sealed_value {
PrivateAccess private_access = 1;
PrivateWithinAccess private_within_access = 3;
ProtectedAccess protected_access = 4;
PublicAccess public_access = 7;
}
}
message PrivateAccess {}
message PrivateWithinAccess {
string symbol = 1;
}
message ProtectedAccess {}
message PublicAccess {}
message Documentation {
enum Format {
HTML = 0;
MARKDOWN = 1;
JAVADOC = 2;
SCALADOC = 3;
KDOC = 4;
}
string message = 1;
Format format = 2;
}
message SymbolOccurrence {
enum Role {
UNKNOWN_ROLE = 0;
REFERENCE = 1;
DEFINITION = 2;
}
Range range = 1;
string symbol = 2;
Role role = 3;
}
message Scope {
repeated string symlinks = 1;
repeated SymbolInformation hardlinks = 2;
}
message Type {
reserved 1, 3, 4, 5, 6, 11, 12, 15, 16;
oneof sealed_value {
TypeRef type_ref = 2;
ExistentialType existential_type = 9;
IntersectionType intersection_type = 17;
}
}
message TypeRef {
string symbol = 2;
repeated Type type_arguments = 3;
}
message IntersectionType {
repeated Type types = 1;
}
message ExistentialType {
reserved 2;
Type tpe = 1;
Scope declarations = 3;
}
message Tree {
oneof sealed_value {
ApplyTree apply_tree = 1;
IdTree id_tree = 3;
LiteralTree literal_tree = 4;
OriginalTree original_tree = 6;
SelectTree select_tree = 7;
// -- OUT OF SPEC -- //
AnnotationTree annotation_tree = 9;
AssignTree assign_tree = 10;
// -- OUT OF SPEC -- //
}
}
message ApplyTree {
Tree function = 1;
repeated Tree arguments = 2;
}
message IdTree {
string symbol = 1;
}
message OriginalTree {
Range range = 1;
}
message LiteralTree {
Constant constant = 1;
}
message SelectTree {
Tree qualifier = 1;
IdTree id = 2;
}
// -- OUT OF SPEC -- //
message AnnotationTree {
Type tpe = 1;
repeated Tree parameters = 2;
}
message AssignTree {
Tree lhs = 1;
Tree rhs = 2;
}
// -- OUT OF SPEC -- //
message Constant {
oneof sealed_value {
BooleanConstant boolean_constant = 2;
ByteConstant byte_constant = 3;
ShortConstant short_constant = 4;
CharConstant char_constant = 5;
IntConstant int_constant = 6;
LongConstant long_constant = 7;
FloatConstant float_constant = 8;
DoubleConstant double_constant = 9;
StringConstant string_constant = 10;
}
}
message BooleanConstant {
bool value = 1;
}
message ByteConstant {
int32 value = 1;
}
message ShortConstant {
int32 value = 1;
}
message CharConstant {
int32 value = 1;
}
message IntConstant {
int32 value = 1;
}
message LongConstant {
int64 value = 1;
}
message FloatConstant {
float value = 1;
}
message DoubleConstant {
double value = 1;
}
message StringConstant {
string value = 1;
}