@codingame/monaco-languageclient-wrapper 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +331 -3890
- package/package.json +1 -1
- package/stats.html +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { loadConfigurationForExtension } from '@codingame/monaco-editor-wrapper/dist/features/extensionConfigurations';
|
|
2
|
+
import require$$1$3, { ProtocolNotificationType, ProtocolRequestType, RenameFile, CreateFile } from 'vscode-languageserver-protocol';
|
|
3
|
+
import require$$3$1 from 'vscode-languageserver-protocol/lib/common/api';
|
|
4
|
+
import require$$1$4 from 'vscode-languageserver-protocol/lib/common/utils/is';
|
|
2
5
|
import * as monaco from 'monaco-editor/esm/vs/editor/edcore.main';
|
|
3
6
|
import { Uri } from 'monaco-editor/esm/vs/editor/edcore.main';
|
|
4
7
|
import { toSocket, createWebSocketConnection, ConsoleLogger } from '@codingame/monaco-jsonrpc';
|
|
@@ -296,9 +299,264 @@ var disposable$1 = {};
|
|
|
296
299
|
|
|
297
300
|
var services$1 = {};
|
|
298
301
|
|
|
299
|
-
|
|
302
|
+
/* --------------------------------------------------------------------------------------------
|
|
303
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
304
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
305
|
+
* ------------------------------------------------------------------------------------------ */
|
|
306
|
+
class FullTextDocument {
|
|
307
|
+
constructor(uri, languageId, version, content) {
|
|
308
|
+
this._uri = uri;
|
|
309
|
+
this._languageId = languageId;
|
|
310
|
+
this._version = version;
|
|
311
|
+
this._content = content;
|
|
312
|
+
this._lineOffsets = undefined;
|
|
313
|
+
}
|
|
314
|
+
get uri() {
|
|
315
|
+
return this._uri;
|
|
316
|
+
}
|
|
317
|
+
get languageId() {
|
|
318
|
+
return this._languageId;
|
|
319
|
+
}
|
|
320
|
+
get version() {
|
|
321
|
+
return this._version;
|
|
322
|
+
}
|
|
323
|
+
getText(range) {
|
|
324
|
+
if (range) {
|
|
325
|
+
const start = this.offsetAt(range.start);
|
|
326
|
+
const end = this.offsetAt(range.end);
|
|
327
|
+
return this._content.substring(start, end);
|
|
328
|
+
}
|
|
329
|
+
return this._content;
|
|
330
|
+
}
|
|
331
|
+
update(changes, version) {
|
|
332
|
+
for (let change of changes) {
|
|
333
|
+
if (FullTextDocument.isIncremental(change)) {
|
|
334
|
+
// makes sure start is before end
|
|
335
|
+
const range = getWellformedRange(change.range);
|
|
336
|
+
// update content
|
|
337
|
+
const startOffset = this.offsetAt(range.start);
|
|
338
|
+
const endOffset = this.offsetAt(range.end);
|
|
339
|
+
this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);
|
|
340
|
+
// update the offsets
|
|
341
|
+
const startLine = Math.max(range.start.line, 0);
|
|
342
|
+
const endLine = Math.max(range.end.line, 0);
|
|
343
|
+
let lineOffsets = this._lineOffsets;
|
|
344
|
+
const addedLineOffsets = computeLineOffsets(change.text, false, startOffset);
|
|
345
|
+
if (endLine - startLine === addedLineOffsets.length) {
|
|
346
|
+
for (let i = 0, len = addedLineOffsets.length; i < len; i++) {
|
|
347
|
+
lineOffsets[i + startLine + 1] = addedLineOffsets[i];
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
if (addedLineOffsets.length < 10000) {
|
|
352
|
+
lineOffsets.splice(startLine + 1, endLine - startLine, ...addedLineOffsets);
|
|
353
|
+
}
|
|
354
|
+
else { // avoid too many arguments for splice
|
|
355
|
+
this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
const diff = change.text.length - (endOffset - startOffset);
|
|
359
|
+
if (diff !== 0) {
|
|
360
|
+
for (let i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {
|
|
361
|
+
lineOffsets[i] = lineOffsets[i] + diff;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
else if (FullTextDocument.isFull(change)) {
|
|
366
|
+
this._content = change.text;
|
|
367
|
+
this._lineOffsets = undefined;
|
|
368
|
+
}
|
|
369
|
+
else {
|
|
370
|
+
throw new Error('Unknown change event received');
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
this._version = version;
|
|
374
|
+
}
|
|
375
|
+
getLineOffsets() {
|
|
376
|
+
if (this._lineOffsets === undefined) {
|
|
377
|
+
this._lineOffsets = computeLineOffsets(this._content, true);
|
|
378
|
+
}
|
|
379
|
+
return this._lineOffsets;
|
|
380
|
+
}
|
|
381
|
+
positionAt(offset) {
|
|
382
|
+
offset = Math.max(Math.min(offset, this._content.length), 0);
|
|
383
|
+
let lineOffsets = this.getLineOffsets();
|
|
384
|
+
let low = 0, high = lineOffsets.length;
|
|
385
|
+
if (high === 0) {
|
|
386
|
+
return { line: 0, character: offset };
|
|
387
|
+
}
|
|
388
|
+
while (low < high) {
|
|
389
|
+
let mid = Math.floor((low + high) / 2);
|
|
390
|
+
if (lineOffsets[mid] > offset) {
|
|
391
|
+
high = mid;
|
|
392
|
+
}
|
|
393
|
+
else {
|
|
394
|
+
low = mid + 1;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
// low is the least x for which the line offset is larger than the current offset
|
|
398
|
+
// or array.length if no line offset is larger than the current offset
|
|
399
|
+
let line = low - 1;
|
|
400
|
+
return { line, character: offset - lineOffsets[line] };
|
|
401
|
+
}
|
|
402
|
+
offsetAt(position) {
|
|
403
|
+
let lineOffsets = this.getLineOffsets();
|
|
404
|
+
if (position.line >= lineOffsets.length) {
|
|
405
|
+
return this._content.length;
|
|
406
|
+
}
|
|
407
|
+
else if (position.line < 0) {
|
|
408
|
+
return 0;
|
|
409
|
+
}
|
|
410
|
+
let lineOffset = lineOffsets[position.line];
|
|
411
|
+
let nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
|
|
412
|
+
return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
|
|
413
|
+
}
|
|
414
|
+
get lineCount() {
|
|
415
|
+
return this.getLineOffsets().length;
|
|
416
|
+
}
|
|
417
|
+
static isIncremental(event) {
|
|
418
|
+
let candidate = event;
|
|
419
|
+
return candidate !== undefined && candidate !== null &&
|
|
420
|
+
typeof candidate.text === 'string' && candidate.range !== undefined &&
|
|
421
|
+
(candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
|
|
422
|
+
}
|
|
423
|
+
static isFull(event) {
|
|
424
|
+
let candidate = event;
|
|
425
|
+
return candidate !== undefined && candidate !== null &&
|
|
426
|
+
typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
var TextDocument;
|
|
430
|
+
(function (TextDocument) {
|
|
431
|
+
/**
|
|
432
|
+
* Creates a new text document.
|
|
433
|
+
*
|
|
434
|
+
* @param uri The document's uri.
|
|
435
|
+
* @param languageId The document's language Id.
|
|
436
|
+
* @param version The document's initial version number.
|
|
437
|
+
* @param content The document's content.
|
|
438
|
+
*/
|
|
439
|
+
function create(uri, languageId, version, content) {
|
|
440
|
+
return new FullTextDocument(uri, languageId, version, content);
|
|
441
|
+
}
|
|
442
|
+
TextDocument.create = create;
|
|
443
|
+
/**
|
|
444
|
+
* Updates a TextDocument by modifying its content.
|
|
445
|
+
*
|
|
446
|
+
* @param document the document to update. Only documents created by TextDocument.create are valid inputs.
|
|
447
|
+
* @param changes the changes to apply to the document.
|
|
448
|
+
* @param version the changes version for the document.
|
|
449
|
+
* @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.
|
|
450
|
+
*
|
|
451
|
+
*/
|
|
452
|
+
function update(document, changes, version) {
|
|
453
|
+
if (document instanceof FullTextDocument) {
|
|
454
|
+
document.update(changes, version);
|
|
455
|
+
return document;
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
throw new Error('TextDocument.update: document must be created by TextDocument.create');
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
TextDocument.update = update;
|
|
462
|
+
function applyEdits(document, edits) {
|
|
463
|
+
let text = document.getText();
|
|
464
|
+
let sortedEdits = mergeSort(edits.map(getWellformedEdit), (a, b) => {
|
|
465
|
+
let diff = a.range.start.line - b.range.start.line;
|
|
466
|
+
if (diff === 0) {
|
|
467
|
+
return a.range.start.character - b.range.start.character;
|
|
468
|
+
}
|
|
469
|
+
return diff;
|
|
470
|
+
});
|
|
471
|
+
let lastModifiedOffset = 0;
|
|
472
|
+
const spans = [];
|
|
473
|
+
for (const e of sortedEdits) {
|
|
474
|
+
let startOffset = document.offsetAt(e.range.start);
|
|
475
|
+
if (startOffset < lastModifiedOffset) {
|
|
476
|
+
throw new Error('Overlapping edit');
|
|
477
|
+
}
|
|
478
|
+
else if (startOffset > lastModifiedOffset) {
|
|
479
|
+
spans.push(text.substring(lastModifiedOffset, startOffset));
|
|
480
|
+
}
|
|
481
|
+
if (e.newText.length) {
|
|
482
|
+
spans.push(e.newText);
|
|
483
|
+
}
|
|
484
|
+
lastModifiedOffset = document.offsetAt(e.range.end);
|
|
485
|
+
}
|
|
486
|
+
spans.push(text.substr(lastModifiedOffset));
|
|
487
|
+
return spans.join('');
|
|
488
|
+
}
|
|
489
|
+
TextDocument.applyEdits = applyEdits;
|
|
490
|
+
})(TextDocument || (TextDocument = {}));
|
|
491
|
+
function mergeSort(data, compare) {
|
|
492
|
+
if (data.length <= 1) {
|
|
493
|
+
// sorted
|
|
494
|
+
return data;
|
|
495
|
+
}
|
|
496
|
+
const p = (data.length / 2) | 0;
|
|
497
|
+
const left = data.slice(0, p);
|
|
498
|
+
const right = data.slice(p);
|
|
499
|
+
mergeSort(left, compare);
|
|
500
|
+
mergeSort(right, compare);
|
|
501
|
+
let leftIdx = 0;
|
|
502
|
+
let rightIdx = 0;
|
|
503
|
+
let i = 0;
|
|
504
|
+
while (leftIdx < left.length && rightIdx < right.length) {
|
|
505
|
+
let ret = compare(left[leftIdx], right[rightIdx]);
|
|
506
|
+
if (ret <= 0) {
|
|
507
|
+
// smaller_equal -> take left to preserve order
|
|
508
|
+
data[i++] = left[leftIdx++];
|
|
509
|
+
}
|
|
510
|
+
else {
|
|
511
|
+
// greater -> take right
|
|
512
|
+
data[i++] = right[rightIdx++];
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
while (leftIdx < left.length) {
|
|
516
|
+
data[i++] = left[leftIdx++];
|
|
517
|
+
}
|
|
518
|
+
while (rightIdx < right.length) {
|
|
519
|
+
data[i++] = right[rightIdx++];
|
|
520
|
+
}
|
|
521
|
+
return data;
|
|
522
|
+
}
|
|
523
|
+
function computeLineOffsets(text, isAtLineStart, textOffset = 0) {
|
|
524
|
+
const result = isAtLineStart ? [textOffset] : [];
|
|
525
|
+
for (let i = 0; i < text.length; i++) {
|
|
526
|
+
let ch = text.charCodeAt(i);
|
|
527
|
+
if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) {
|
|
528
|
+
if (ch === 13 /* CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* LineFeed */) {
|
|
529
|
+
i++;
|
|
530
|
+
}
|
|
531
|
+
result.push(textOffset + i + 1);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
return result;
|
|
535
|
+
}
|
|
536
|
+
function getWellformedRange(range) {
|
|
537
|
+
const start = range.start;
|
|
538
|
+
const end = range.end;
|
|
539
|
+
if (start.line > end.line || (start.line === end.line && start.character > end.character)) {
|
|
540
|
+
return { start: end, end: start };
|
|
541
|
+
}
|
|
542
|
+
return range;
|
|
543
|
+
}
|
|
544
|
+
function getWellformedEdit(textEdit) {
|
|
545
|
+
const range = getWellformedRange(textEdit.range);
|
|
546
|
+
if (range !== textEdit.range) {
|
|
547
|
+
return { newText: textEdit.newText, range };
|
|
548
|
+
}
|
|
549
|
+
return textEdit;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
var main$1 = /*#__PURE__*/Object.freeze({
|
|
553
|
+
__proto__: null,
|
|
554
|
+
get TextDocument () { return TextDocument; }
|
|
555
|
+
});
|
|
556
|
+
|
|
557
|
+
var require$$1$2 = /*@__PURE__*/getAugmentedNamespace(main$1);
|
|
300
558
|
|
|
301
|
-
var main
|
|
559
|
+
var main = {};
|
|
302
560
|
|
|
303
561
|
var ril = {};
|
|
304
562
|
|
|
@@ -1157,7 +1415,7 @@ var util$1 = /*#__PURE__*/Object.freeze({
|
|
|
1157
1415
|
'default': util
|
|
1158
1416
|
});
|
|
1159
1417
|
|
|
1160
|
-
var require$$1$
|
|
1418
|
+
var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(util$1);
|
|
1161
1419
|
|
|
1162
1420
|
var disposable = {};
|
|
1163
1421
|
|
|
@@ -1339,7 +1597,7 @@ messageBuffer.AbstractMessageBuffer = AbstractMessageBuffer;
|
|
|
1339
1597
|
* ------------------------------------------------------------------------------------------ */
|
|
1340
1598
|
Object.defineProperty(ril, "__esModule", { value: true });
|
|
1341
1599
|
const ral_1$1 = ral;
|
|
1342
|
-
const util_1 = require$$1$
|
|
1600
|
+
const util_1 = require$$1$1;
|
|
1343
1601
|
const disposable_1$2 = disposable;
|
|
1344
1602
|
const messageBuffer_1 = messageBuffer;
|
|
1345
1603
|
class MessageBuffer extends messageBuffer_1.AbstractMessageBuffer {
|
|
@@ -1496,46 +1754,46 @@ function RIL() {
|
|
|
1496
1754
|
})(RIL || (RIL = {}));
|
|
1497
1755
|
ril.default = RIL;
|
|
1498
1756
|
|
|
1499
|
-
var api
|
|
1757
|
+
var api = {};
|
|
1500
1758
|
|
|
1501
|
-
var messages
|
|
1759
|
+
var messages = {};
|
|
1502
1760
|
|
|
1503
|
-
var is$
|
|
1761
|
+
var is$1 = {};
|
|
1504
1762
|
|
|
1505
1763
|
/* --------------------------------------------------------------------------------------------
|
|
1506
1764
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1507
1765
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
1508
1766
|
* ------------------------------------------------------------------------------------------ */
|
|
1509
|
-
Object.defineProperty(is$
|
|
1510
|
-
is$
|
|
1511
|
-
function boolean$
|
|
1767
|
+
Object.defineProperty(is$1, "__esModule", { value: true });
|
|
1768
|
+
is$1.stringArray = is$1.array = is$1.func = is$1.error = is$1.number = is$1.string = is$1.boolean = void 0;
|
|
1769
|
+
function boolean$1(value) {
|
|
1512
1770
|
return value === true || value === false;
|
|
1513
1771
|
}
|
|
1514
|
-
is$
|
|
1515
|
-
function string$
|
|
1772
|
+
is$1.boolean = boolean$1;
|
|
1773
|
+
function string$1(value) {
|
|
1516
1774
|
return typeof value === 'string' || value instanceof String;
|
|
1517
1775
|
}
|
|
1518
|
-
is$
|
|
1519
|
-
function number$
|
|
1776
|
+
is$1.string = string$1;
|
|
1777
|
+
function number$1(value) {
|
|
1520
1778
|
return typeof value === 'number' || value instanceof Number;
|
|
1521
1779
|
}
|
|
1522
|
-
is$
|
|
1523
|
-
function error$
|
|
1780
|
+
is$1.number = number$1;
|
|
1781
|
+
function error$1(value) {
|
|
1524
1782
|
return value instanceof Error;
|
|
1525
1783
|
}
|
|
1526
|
-
is$
|
|
1527
|
-
function func$
|
|
1784
|
+
is$1.error = error$1;
|
|
1785
|
+
function func$1(value) {
|
|
1528
1786
|
return typeof value === 'function';
|
|
1529
1787
|
}
|
|
1530
|
-
is$
|
|
1531
|
-
function array$
|
|
1788
|
+
is$1.func = func$1;
|
|
1789
|
+
function array$1(value) {
|
|
1532
1790
|
return Array.isArray(value);
|
|
1533
1791
|
}
|
|
1534
|
-
is$
|
|
1535
|
-
function stringArray$
|
|
1536
|
-
return array$
|
|
1792
|
+
is$1.array = array$1;
|
|
1793
|
+
function stringArray$1(value) {
|
|
1794
|
+
return array$1(value) && value.every(elem => string$1(elem));
|
|
1537
1795
|
}
|
|
1538
|
-
is$
|
|
1796
|
+
is$1.stringArray = stringArray$1;
|
|
1539
1797
|
|
|
1540
1798
|
(function (exports) {
|
|
1541
1799
|
/* --------------------------------------------------------------------------------------------
|
|
@@ -1544,7 +1802,7 @@ is$2.stringArray = stringArray$2;
|
|
|
1544
1802
|
* ------------------------------------------------------------------------------------------ */
|
|
1545
1803
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1546
1804
|
exports.isResponseMessage = exports.isNotificationMessage = exports.isRequestMessage = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0;
|
|
1547
|
-
const is = is$
|
|
1805
|
+
const is = is$1;
|
|
1548
1806
|
/**
|
|
1549
1807
|
* Predefined error codes.
|
|
1550
1808
|
*/
|
|
@@ -1819,7 +2077,7 @@ function isResponseMessage(message) {
|
|
|
1819
2077
|
}
|
|
1820
2078
|
exports.isResponseMessage = isResponseMessage;
|
|
1821
2079
|
|
|
1822
|
-
}(messages
|
|
2080
|
+
}(messages));
|
|
1823
2081
|
|
|
1824
2082
|
var events = {};
|
|
1825
2083
|
|
|
@@ -1963,7 +2221,7 @@ var cancellation = {};
|
|
|
1963
2221
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1964
2222
|
exports.CancellationTokenSource = exports.CancellationToken = void 0;
|
|
1965
2223
|
const ral_1 = ral;
|
|
1966
|
-
const Is = is$
|
|
2224
|
+
const Is = is$1;
|
|
1967
2225
|
const events_1 = events;
|
|
1968
2226
|
var CancellationToken;
|
|
1969
2227
|
(function (CancellationToken) {
|
|
@@ -2064,7 +2322,7 @@ var messageReader = {};
|
|
|
2064
2322
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2065
2323
|
exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = void 0;
|
|
2066
2324
|
const ral_1 = ral;
|
|
2067
|
-
const Is = is$
|
|
2325
|
+
const Is = is$1;
|
|
2068
2326
|
const events_1 = events;
|
|
2069
2327
|
(function (MessageReader) {
|
|
2070
2328
|
function is(value) {
|
|
@@ -2329,7 +2587,7 @@ semaphore.Semaphore = Semaphore;
|
|
|
2329
2587
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2330
2588
|
exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = void 0;
|
|
2331
2589
|
const ral_1 = ral;
|
|
2332
|
-
const Is = is$
|
|
2590
|
+
const Is = is$1;
|
|
2333
2591
|
const semaphore_1 = semaphore;
|
|
2334
2592
|
const events_1 = events;
|
|
2335
2593
|
const ContentLength = 'Content-Length: ';
|
|
@@ -2439,7 +2697,7 @@ exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter;
|
|
|
2439
2697
|
|
|
2440
2698
|
}(messageWriter));
|
|
2441
2699
|
|
|
2442
|
-
var connection$
|
|
2700
|
+
var connection$1 = {};
|
|
2443
2701
|
|
|
2444
2702
|
var linkedMap = {};
|
|
2445
2703
|
|
|
@@ -2856,8 +3114,8 @@ exports.LRUCache = LRUCache;
|
|
|
2856
3114
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2857
3115
|
exports.createMessageConnection = exports.ConnectionOptions = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.Trace = exports.NullLogger = exports.ProgressType = void 0;
|
|
2858
3116
|
const ral_1 = ral;
|
|
2859
|
-
const Is = is$
|
|
2860
|
-
const messages_1 = messages
|
|
3117
|
+
const Is = is$1;
|
|
3118
|
+
const messages_1 = messages;
|
|
2861
3119
|
const linkedMap_1 = linkedMap;
|
|
2862
3120
|
const events_1 = events;
|
|
2863
3121
|
const cancellation_1 = cancellation;
|
|
@@ -3934,7 +4192,7 @@ function createMessageConnection(messageReader, messageWriter, _logger, options)
|
|
|
3934
4192
|
}
|
|
3935
4193
|
exports.createMessageConnection = createMessageConnection;
|
|
3936
4194
|
|
|
3937
|
-
}(connection$
|
|
4195
|
+
}(connection$1));
|
|
3938
4196
|
|
|
3939
4197
|
(function (exports) {
|
|
3940
4198
|
/* --------------------------------------------------------------------------------------------
|
|
@@ -3945,7 +4203,7 @@ exports.createMessageConnection = createMessageConnection;
|
|
|
3945
4203
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3946
4204
|
exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.Trace = exports.ProgressType = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.RAL = void 0;
|
|
3947
4205
|
exports.CancellationStrategy = void 0;
|
|
3948
|
-
const messages_1 = messages
|
|
4206
|
+
const messages_1 = messages;
|
|
3949
4207
|
Object.defineProperty(exports, "RequestType", { enumerable: true, get: function () { return messages_1.RequestType; } });
|
|
3950
4208
|
Object.defineProperty(exports, "RequestType0", { enumerable: true, get: function () { return messages_1.RequestType0; } });
|
|
3951
4209
|
Object.defineProperty(exports, "RequestType1", { enumerable: true, get: function () { return messages_1.RequestType1; } });
|
|
@@ -3987,7 +4245,7 @@ const messageWriter_1 = messageWriter;
|
|
|
3987
4245
|
Object.defineProperty(exports, "MessageWriter", { enumerable: true, get: function () { return messageWriter_1.MessageWriter; } });
|
|
3988
4246
|
Object.defineProperty(exports, "AbstractMessageWriter", { enumerable: true, get: function () { return messageWriter_1.AbstractMessageWriter; } });
|
|
3989
4247
|
Object.defineProperty(exports, "WriteableStreamMessageWriter", { enumerable: true, get: function () { return messageWriter_1.WriteableStreamMessageWriter; } });
|
|
3990
|
-
const connection_1 = connection$
|
|
4248
|
+
const connection_1 = connection$1;
|
|
3991
4249
|
Object.defineProperty(exports, "ConnectionStrategy", { enumerable: true, get: function () { return connection_1.ConnectionStrategy; } });
|
|
3992
4250
|
Object.defineProperty(exports, "ConnectionOptions", { enumerable: true, get: function () { return connection_1.ConnectionOptions; } });
|
|
3993
4251
|
Object.defineProperty(exports, "NullLogger", { enumerable: true, get: function () { return connection_1.NullLogger; } });
|
|
@@ -4005,7 +4263,7 @@ Object.defineProperty(exports, "CancellationStrategy", { enumerable: true, get:
|
|
|
4005
4263
|
const ral_1 = ral;
|
|
4006
4264
|
exports.RAL = ral_1.default;
|
|
4007
4265
|
|
|
4008
|
-
}(api
|
|
4266
|
+
}(api));
|
|
4009
4267
|
|
|
4010
4268
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
4011
4269
|
//
|
|
@@ -4353,9 +4611,9 @@ function tmpDir() {
|
|
|
4353
4611
|
}
|
|
4354
4612
|
var tmpdir = tmpDir;
|
|
4355
4613
|
|
|
4356
|
-
var EOL
|
|
4614
|
+
var EOL = '\n';
|
|
4357
4615
|
var os = {
|
|
4358
|
-
EOL: EOL
|
|
4616
|
+
EOL: EOL,
|
|
4359
4617
|
tmpdir: tmpdir,
|
|
4360
4618
|
tmpDir: tmpDir,
|
|
4361
4619
|
networkInterfaces:networkInterfaces,
|
|
@@ -4388,7 +4646,7 @@ var os$1 = /*#__PURE__*/Object.freeze({
|
|
|
4388
4646
|
platform: platform,
|
|
4389
4647
|
tmpDir: tmpDir,
|
|
4390
4648
|
tmpdir: tmpdir,
|
|
4391
|
-
EOL: EOL
|
|
4649
|
+
EOL: EOL,
|
|
4392
4650
|
'default': os
|
|
4393
4651
|
});
|
|
4394
4652
|
|
|
@@ -4423,12 +4681,12 @@ exports.createMessageConnection = exports.createServerSocketTransport = exports.
|
|
|
4423
4681
|
const ril_1 = ril;
|
|
4424
4682
|
// Install the node runtime abstract.
|
|
4425
4683
|
ril_1.default.install();
|
|
4426
|
-
const api_1 = api
|
|
4684
|
+
const api_1 = api;
|
|
4427
4685
|
const path = require$$2;
|
|
4428
4686
|
const os = require$$3;
|
|
4429
4687
|
const crypto_1 = require$$5;
|
|
4430
4688
|
const net_1 = require$$5;
|
|
4431
|
-
__exportStar(api
|
|
4689
|
+
__exportStar(api, exports);
|
|
4432
4690
|
class IPCMessageReader extends api_1.AbstractMessageReader {
|
|
4433
4691
|
constructor(process) {
|
|
4434
4692
|
super();
|
|
@@ -4616,3824 +4874,7 @@ function createMessageConnection(input, output, logger, options) {
|
|
|
4616
4874
|
}
|
|
4617
4875
|
exports.createMessageConnection = createMessageConnection;
|
|
4618
4876
|
|
|
4619
|
-
}(main
|
|
4620
|
-
|
|
4621
|
-
/* --------------------------------------------------------------------------------------------
|
|
4622
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4623
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4624
|
-
* ----------------------------------------------------------------------------------------- */
|
|
4625
|
-
|
|
4626
|
-
var node = main$2;
|
|
4627
|
-
|
|
4628
|
-
var api = {};
|
|
4629
|
-
|
|
4630
|
-
/* --------------------------------------------------------------------------------------------
|
|
4631
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4632
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4633
|
-
* ------------------------------------------------------------------------------------------ */
|
|
4634
|
-
|
|
4635
|
-
var integer;
|
|
4636
|
-
|
|
4637
|
-
(function (integer) {
|
|
4638
|
-
integer.MIN_VALUE = -2147483648;
|
|
4639
|
-
integer.MAX_VALUE = 2147483647;
|
|
4640
|
-
})(integer || (integer = {}));
|
|
4641
|
-
|
|
4642
|
-
var uinteger;
|
|
4643
|
-
|
|
4644
|
-
(function (uinteger) {
|
|
4645
|
-
uinteger.MIN_VALUE = 0;
|
|
4646
|
-
uinteger.MAX_VALUE = 2147483647;
|
|
4647
|
-
})(uinteger || (uinteger = {}));
|
|
4648
|
-
/**
|
|
4649
|
-
* The Position namespace provides helper functions to work with
|
|
4650
|
-
* [Position](#Position) literals.
|
|
4651
|
-
*/
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
var Position;
|
|
4655
|
-
|
|
4656
|
-
(function (Position) {
|
|
4657
|
-
/**
|
|
4658
|
-
* Creates a new Position literal from the given line and character.
|
|
4659
|
-
* @param line The position's line.
|
|
4660
|
-
* @param character The position's character.
|
|
4661
|
-
*/
|
|
4662
|
-
function create(line, character) {
|
|
4663
|
-
if (line === Number.MAX_VALUE) {
|
|
4664
|
-
line = uinteger.MAX_VALUE;
|
|
4665
|
-
}
|
|
4666
|
-
|
|
4667
|
-
if (character === Number.MAX_VALUE) {
|
|
4668
|
-
character = uinteger.MAX_VALUE;
|
|
4669
|
-
}
|
|
4670
|
-
|
|
4671
|
-
return {
|
|
4672
|
-
line: line,
|
|
4673
|
-
character: character
|
|
4674
|
-
};
|
|
4675
|
-
}
|
|
4676
|
-
|
|
4677
|
-
Position.create = create;
|
|
4678
|
-
/**
|
|
4679
|
-
* Checks whether the given literal conforms to the [Position](#Position) interface.
|
|
4680
|
-
*/
|
|
4681
|
-
|
|
4682
|
-
function is(value) {
|
|
4683
|
-
var candidate = value;
|
|
4684
|
-
return Is$5.objectLiteral(candidate) && Is$5.uinteger(candidate.line) && Is$5.uinteger(candidate.character);
|
|
4685
|
-
}
|
|
4686
|
-
|
|
4687
|
-
Position.is = is;
|
|
4688
|
-
})(Position || (Position = {}));
|
|
4689
|
-
/**
|
|
4690
|
-
* The Range namespace provides helper functions to work with
|
|
4691
|
-
* [Range](#Range) literals.
|
|
4692
|
-
*/
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
var Range;
|
|
4696
|
-
|
|
4697
|
-
(function (Range) {
|
|
4698
|
-
function create(one, two, three, four) {
|
|
4699
|
-
if (Is$5.uinteger(one) && Is$5.uinteger(two) && Is$5.uinteger(three) && Is$5.uinteger(four)) {
|
|
4700
|
-
return {
|
|
4701
|
-
start: Position.create(one, two),
|
|
4702
|
-
end: Position.create(three, four)
|
|
4703
|
-
};
|
|
4704
|
-
} else if (Position.is(one) && Position.is(two)) {
|
|
4705
|
-
return {
|
|
4706
|
-
start: one,
|
|
4707
|
-
end: two
|
|
4708
|
-
};
|
|
4709
|
-
} else {
|
|
4710
|
-
throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
|
|
4711
|
-
}
|
|
4712
|
-
}
|
|
4713
|
-
|
|
4714
|
-
Range.create = create;
|
|
4715
|
-
/**
|
|
4716
|
-
* Checks whether the given literal conforms to the [Range](#Range) interface.
|
|
4717
|
-
*/
|
|
4718
|
-
|
|
4719
|
-
function is(value) {
|
|
4720
|
-
var candidate = value;
|
|
4721
|
-
return Is$5.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
|
|
4722
|
-
}
|
|
4723
|
-
|
|
4724
|
-
Range.is = is;
|
|
4725
|
-
})(Range || (Range = {}));
|
|
4726
|
-
/**
|
|
4727
|
-
* The Location namespace provides helper functions to work with
|
|
4728
|
-
* [Location](#Location) literals.
|
|
4729
|
-
*/
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
var Location;
|
|
4733
|
-
|
|
4734
|
-
(function (Location) {
|
|
4735
|
-
/**
|
|
4736
|
-
* Creates a Location literal.
|
|
4737
|
-
* @param uri The location's uri.
|
|
4738
|
-
* @param range The location's range.
|
|
4739
|
-
*/
|
|
4740
|
-
function create(uri, range) {
|
|
4741
|
-
return {
|
|
4742
|
-
uri: uri,
|
|
4743
|
-
range: range
|
|
4744
|
-
};
|
|
4745
|
-
}
|
|
4746
|
-
|
|
4747
|
-
Location.create = create;
|
|
4748
|
-
/**
|
|
4749
|
-
* Checks whether the given literal conforms to the [Location](#Location) interface.
|
|
4750
|
-
*/
|
|
4751
|
-
|
|
4752
|
-
function is(value) {
|
|
4753
|
-
var candidate = value;
|
|
4754
|
-
return Is$5.defined(candidate) && Range.is(candidate.range) && (Is$5.string(candidate.uri) || Is$5.undefined(candidate.uri));
|
|
4755
|
-
}
|
|
4756
|
-
|
|
4757
|
-
Location.is = is;
|
|
4758
|
-
})(Location || (Location = {}));
|
|
4759
|
-
/**
|
|
4760
|
-
* The LocationLink namespace provides helper functions to work with
|
|
4761
|
-
* [LocationLink](#LocationLink) literals.
|
|
4762
|
-
*/
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
var LocationLink;
|
|
4766
|
-
|
|
4767
|
-
(function (LocationLink) {
|
|
4768
|
-
/**
|
|
4769
|
-
* Creates a LocationLink literal.
|
|
4770
|
-
* @param targetUri The definition's uri.
|
|
4771
|
-
* @param targetRange The full range of the definition.
|
|
4772
|
-
* @param targetSelectionRange The span of the symbol definition at the target.
|
|
4773
|
-
* @param originSelectionRange The span of the symbol being defined in the originating source file.
|
|
4774
|
-
*/
|
|
4775
|
-
function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
|
|
4776
|
-
return {
|
|
4777
|
-
targetUri: targetUri,
|
|
4778
|
-
targetRange: targetRange,
|
|
4779
|
-
targetSelectionRange: targetSelectionRange,
|
|
4780
|
-
originSelectionRange: originSelectionRange
|
|
4781
|
-
};
|
|
4782
|
-
}
|
|
4783
|
-
|
|
4784
|
-
LocationLink.create = create;
|
|
4785
|
-
/**
|
|
4786
|
-
* Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
|
|
4787
|
-
*/
|
|
4788
|
-
|
|
4789
|
-
function is(value) {
|
|
4790
|
-
var candidate = value;
|
|
4791
|
-
return Is$5.defined(candidate) && Range.is(candidate.targetRange) && Is$5.string(candidate.targetUri) && (Range.is(candidate.targetSelectionRange) || Is$5.undefined(candidate.targetSelectionRange)) && (Range.is(candidate.originSelectionRange) || Is$5.undefined(candidate.originSelectionRange));
|
|
4792
|
-
}
|
|
4793
|
-
|
|
4794
|
-
LocationLink.is = is;
|
|
4795
|
-
})(LocationLink || (LocationLink = {}));
|
|
4796
|
-
/**
|
|
4797
|
-
* The Color namespace provides helper functions to work with
|
|
4798
|
-
* [Color](#Color) literals.
|
|
4799
|
-
*/
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
var Color;
|
|
4803
|
-
|
|
4804
|
-
(function (Color) {
|
|
4805
|
-
/**
|
|
4806
|
-
* Creates a new Color literal.
|
|
4807
|
-
*/
|
|
4808
|
-
function create(red, green, blue, alpha) {
|
|
4809
|
-
return {
|
|
4810
|
-
red: red,
|
|
4811
|
-
green: green,
|
|
4812
|
-
blue: blue,
|
|
4813
|
-
alpha: alpha
|
|
4814
|
-
};
|
|
4815
|
-
}
|
|
4816
|
-
|
|
4817
|
-
Color.create = create;
|
|
4818
|
-
/**
|
|
4819
|
-
* Checks whether the given literal conforms to the [Color](#Color) interface.
|
|
4820
|
-
*/
|
|
4821
|
-
|
|
4822
|
-
function is(value) {
|
|
4823
|
-
var candidate = value;
|
|
4824
|
-
return Is$5.numberRange(candidate.red, 0, 1) && Is$5.numberRange(candidate.green, 0, 1) && Is$5.numberRange(candidate.blue, 0, 1) && Is$5.numberRange(candidate.alpha, 0, 1);
|
|
4825
|
-
}
|
|
4826
|
-
|
|
4827
|
-
Color.is = is;
|
|
4828
|
-
})(Color || (Color = {}));
|
|
4829
|
-
/**
|
|
4830
|
-
* The ColorInformation namespace provides helper functions to work with
|
|
4831
|
-
* [ColorInformation](#ColorInformation) literals.
|
|
4832
|
-
*/
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
var ColorInformation;
|
|
4836
|
-
|
|
4837
|
-
(function (ColorInformation) {
|
|
4838
|
-
/**
|
|
4839
|
-
* Creates a new ColorInformation literal.
|
|
4840
|
-
*/
|
|
4841
|
-
function create(range, color) {
|
|
4842
|
-
return {
|
|
4843
|
-
range: range,
|
|
4844
|
-
color: color
|
|
4845
|
-
};
|
|
4846
|
-
}
|
|
4847
|
-
|
|
4848
|
-
ColorInformation.create = create;
|
|
4849
|
-
/**
|
|
4850
|
-
* Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
|
|
4851
|
-
*/
|
|
4852
|
-
|
|
4853
|
-
function is(value) {
|
|
4854
|
-
var candidate = value;
|
|
4855
|
-
return Range.is(candidate.range) && Color.is(candidate.color);
|
|
4856
|
-
}
|
|
4857
|
-
|
|
4858
|
-
ColorInformation.is = is;
|
|
4859
|
-
})(ColorInformation || (ColorInformation = {}));
|
|
4860
|
-
/**
|
|
4861
|
-
* The Color namespace provides helper functions to work with
|
|
4862
|
-
* [ColorPresentation](#ColorPresentation) literals.
|
|
4863
|
-
*/
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
var ColorPresentation;
|
|
4867
|
-
|
|
4868
|
-
(function (ColorPresentation) {
|
|
4869
|
-
/**
|
|
4870
|
-
* Creates a new ColorInformation literal.
|
|
4871
|
-
*/
|
|
4872
|
-
function create(label, textEdit, additionalTextEdits) {
|
|
4873
|
-
return {
|
|
4874
|
-
label: label,
|
|
4875
|
-
textEdit: textEdit,
|
|
4876
|
-
additionalTextEdits: additionalTextEdits
|
|
4877
|
-
};
|
|
4878
|
-
}
|
|
4879
|
-
|
|
4880
|
-
ColorPresentation.create = create;
|
|
4881
|
-
/**
|
|
4882
|
-
* Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
|
|
4883
|
-
*/
|
|
4884
|
-
|
|
4885
|
-
function is(value) {
|
|
4886
|
-
var candidate = value;
|
|
4887
|
-
return Is$5.string(candidate.label) && (Is$5.undefined(candidate.textEdit) || TextEdit.is(candidate)) && (Is$5.undefined(candidate.additionalTextEdits) || Is$5.typedArray(candidate.additionalTextEdits, TextEdit.is));
|
|
4888
|
-
}
|
|
4889
|
-
|
|
4890
|
-
ColorPresentation.is = is;
|
|
4891
|
-
})(ColorPresentation || (ColorPresentation = {}));
|
|
4892
|
-
/**
|
|
4893
|
-
* Enum of known range kinds
|
|
4894
|
-
*/
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
var FoldingRangeKind;
|
|
4898
|
-
|
|
4899
|
-
(function (FoldingRangeKind) {
|
|
4900
|
-
/**
|
|
4901
|
-
* Folding range for a comment
|
|
4902
|
-
*/
|
|
4903
|
-
FoldingRangeKind["Comment"] = "comment";
|
|
4904
|
-
/**
|
|
4905
|
-
* Folding range for a imports or includes
|
|
4906
|
-
*/
|
|
4907
|
-
|
|
4908
|
-
FoldingRangeKind["Imports"] = "imports";
|
|
4909
|
-
/**
|
|
4910
|
-
* Folding range for a region (e.g. `#region`)
|
|
4911
|
-
*/
|
|
4912
|
-
|
|
4913
|
-
FoldingRangeKind["Region"] = "region";
|
|
4914
|
-
})(FoldingRangeKind || (FoldingRangeKind = {}));
|
|
4915
|
-
/**
|
|
4916
|
-
* The folding range namespace provides helper functions to work with
|
|
4917
|
-
* [FoldingRange](#FoldingRange) literals.
|
|
4918
|
-
*/
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
var FoldingRange;
|
|
4922
|
-
|
|
4923
|
-
(function (FoldingRange) {
|
|
4924
|
-
/**
|
|
4925
|
-
* Creates a new FoldingRange literal.
|
|
4926
|
-
*/
|
|
4927
|
-
function create(startLine, endLine, startCharacter, endCharacter, kind) {
|
|
4928
|
-
var result = {
|
|
4929
|
-
startLine: startLine,
|
|
4930
|
-
endLine: endLine
|
|
4931
|
-
};
|
|
4932
|
-
|
|
4933
|
-
if (Is$5.defined(startCharacter)) {
|
|
4934
|
-
result.startCharacter = startCharacter;
|
|
4935
|
-
}
|
|
4936
|
-
|
|
4937
|
-
if (Is$5.defined(endCharacter)) {
|
|
4938
|
-
result.endCharacter = endCharacter;
|
|
4939
|
-
}
|
|
4940
|
-
|
|
4941
|
-
if (Is$5.defined(kind)) {
|
|
4942
|
-
result.kind = kind;
|
|
4943
|
-
}
|
|
4944
|
-
|
|
4945
|
-
return result;
|
|
4946
|
-
}
|
|
4947
|
-
|
|
4948
|
-
FoldingRange.create = create;
|
|
4949
|
-
/**
|
|
4950
|
-
* Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
|
|
4951
|
-
*/
|
|
4952
|
-
|
|
4953
|
-
function is(value) {
|
|
4954
|
-
var candidate = value;
|
|
4955
|
-
return Is$5.uinteger(candidate.startLine) && Is$5.uinteger(candidate.startLine) && (Is$5.undefined(candidate.startCharacter) || Is$5.uinteger(candidate.startCharacter)) && (Is$5.undefined(candidate.endCharacter) || Is$5.uinteger(candidate.endCharacter)) && (Is$5.undefined(candidate.kind) || Is$5.string(candidate.kind));
|
|
4956
|
-
}
|
|
4957
|
-
|
|
4958
|
-
FoldingRange.is = is;
|
|
4959
|
-
})(FoldingRange || (FoldingRange = {}));
|
|
4960
|
-
/**
|
|
4961
|
-
* The DiagnosticRelatedInformation namespace provides helper functions to work with
|
|
4962
|
-
* [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
|
|
4963
|
-
*/
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
var DiagnosticRelatedInformation;
|
|
4967
|
-
|
|
4968
|
-
(function (DiagnosticRelatedInformation) {
|
|
4969
|
-
/**
|
|
4970
|
-
* Creates a new DiagnosticRelatedInformation literal.
|
|
4971
|
-
*/
|
|
4972
|
-
function create(location, message) {
|
|
4973
|
-
return {
|
|
4974
|
-
location: location,
|
|
4975
|
-
message: message
|
|
4976
|
-
};
|
|
4977
|
-
}
|
|
4978
|
-
|
|
4979
|
-
DiagnosticRelatedInformation.create = create;
|
|
4980
|
-
/**
|
|
4981
|
-
* Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
|
|
4982
|
-
*/
|
|
4983
|
-
|
|
4984
|
-
function is(value) {
|
|
4985
|
-
var candidate = value;
|
|
4986
|
-
return Is$5.defined(candidate) && Location.is(candidate.location) && Is$5.string(candidate.message);
|
|
4987
|
-
}
|
|
4988
|
-
|
|
4989
|
-
DiagnosticRelatedInformation.is = is;
|
|
4990
|
-
})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
|
|
4991
|
-
/**
|
|
4992
|
-
* The diagnostic's severity.
|
|
4993
|
-
*/
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
var DiagnosticSeverity;
|
|
4997
|
-
|
|
4998
|
-
(function (DiagnosticSeverity) {
|
|
4999
|
-
/**
|
|
5000
|
-
* Reports an error.
|
|
5001
|
-
*/
|
|
5002
|
-
DiagnosticSeverity.Error = 1;
|
|
5003
|
-
/**
|
|
5004
|
-
* Reports a warning.
|
|
5005
|
-
*/
|
|
5006
|
-
|
|
5007
|
-
DiagnosticSeverity.Warning = 2;
|
|
5008
|
-
/**
|
|
5009
|
-
* Reports an information.
|
|
5010
|
-
*/
|
|
5011
|
-
|
|
5012
|
-
DiagnosticSeverity.Information = 3;
|
|
5013
|
-
/**
|
|
5014
|
-
* Reports a hint.
|
|
5015
|
-
*/
|
|
5016
|
-
|
|
5017
|
-
DiagnosticSeverity.Hint = 4;
|
|
5018
|
-
})(DiagnosticSeverity || (DiagnosticSeverity = {}));
|
|
5019
|
-
/**
|
|
5020
|
-
* The diagnostic tags.
|
|
5021
|
-
*
|
|
5022
|
-
* @since 3.15.0
|
|
5023
|
-
*/
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
var DiagnosticTag;
|
|
5027
|
-
|
|
5028
|
-
(function (DiagnosticTag) {
|
|
5029
|
-
/**
|
|
5030
|
-
* Unused or unnecessary code.
|
|
5031
|
-
*
|
|
5032
|
-
* Clients are allowed to render diagnostics with this tag faded out instead of having
|
|
5033
|
-
* an error squiggle.
|
|
5034
|
-
*/
|
|
5035
|
-
DiagnosticTag.Unnecessary = 1;
|
|
5036
|
-
/**
|
|
5037
|
-
* Deprecated or obsolete code.
|
|
5038
|
-
*
|
|
5039
|
-
* Clients are allowed to rendered diagnostics with this tag strike through.
|
|
5040
|
-
*/
|
|
5041
|
-
|
|
5042
|
-
DiagnosticTag.Deprecated = 2;
|
|
5043
|
-
})(DiagnosticTag || (DiagnosticTag = {}));
|
|
5044
|
-
/**
|
|
5045
|
-
* The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.
|
|
5046
|
-
*
|
|
5047
|
-
* @since 3.16.0
|
|
5048
|
-
*/
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
var CodeDescription;
|
|
5052
|
-
|
|
5053
|
-
(function (CodeDescription) {
|
|
5054
|
-
function is(value) {
|
|
5055
|
-
var candidate = value;
|
|
5056
|
-
return candidate !== undefined && candidate !== null && Is$5.string(candidate.href);
|
|
5057
|
-
}
|
|
5058
|
-
|
|
5059
|
-
CodeDescription.is = is;
|
|
5060
|
-
})(CodeDescription || (CodeDescription = {}));
|
|
5061
|
-
/**
|
|
5062
|
-
* The Diagnostic namespace provides helper functions to work with
|
|
5063
|
-
* [Diagnostic](#Diagnostic) literals.
|
|
5064
|
-
*/
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
var Diagnostic;
|
|
5068
|
-
|
|
5069
|
-
(function (Diagnostic) {
|
|
5070
|
-
/**
|
|
5071
|
-
* Creates a new Diagnostic literal.
|
|
5072
|
-
*/
|
|
5073
|
-
function create(range, message, severity, code, source, relatedInformation) {
|
|
5074
|
-
var result = {
|
|
5075
|
-
range: range,
|
|
5076
|
-
message: message
|
|
5077
|
-
};
|
|
5078
|
-
|
|
5079
|
-
if (Is$5.defined(severity)) {
|
|
5080
|
-
result.severity = severity;
|
|
5081
|
-
}
|
|
5082
|
-
|
|
5083
|
-
if (Is$5.defined(code)) {
|
|
5084
|
-
result.code = code;
|
|
5085
|
-
}
|
|
5086
|
-
|
|
5087
|
-
if (Is$5.defined(source)) {
|
|
5088
|
-
result.source = source;
|
|
5089
|
-
}
|
|
5090
|
-
|
|
5091
|
-
if (Is$5.defined(relatedInformation)) {
|
|
5092
|
-
result.relatedInformation = relatedInformation;
|
|
5093
|
-
}
|
|
5094
|
-
|
|
5095
|
-
return result;
|
|
5096
|
-
}
|
|
5097
|
-
|
|
5098
|
-
Diagnostic.create = create;
|
|
5099
|
-
/**
|
|
5100
|
-
* Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
|
|
5101
|
-
*/
|
|
5102
|
-
|
|
5103
|
-
function is(value) {
|
|
5104
|
-
var _a;
|
|
5105
|
-
|
|
5106
|
-
var candidate = value;
|
|
5107
|
-
return Is$5.defined(candidate) && Range.is(candidate.range) && Is$5.string(candidate.message) && (Is$5.number(candidate.severity) || Is$5.undefined(candidate.severity)) && (Is$5.integer(candidate.code) || Is$5.string(candidate.code) || Is$5.undefined(candidate.code)) && (Is$5.undefined(candidate.codeDescription) || Is$5.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)) && (Is$5.string(candidate.source) || Is$5.undefined(candidate.source)) && (Is$5.undefined(candidate.relatedInformation) || Is$5.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
|
|
5108
|
-
}
|
|
5109
|
-
|
|
5110
|
-
Diagnostic.is = is;
|
|
5111
|
-
})(Diagnostic || (Diagnostic = {}));
|
|
5112
|
-
/**
|
|
5113
|
-
* The Command namespace provides helper functions to work with
|
|
5114
|
-
* [Command](#Command) literals.
|
|
5115
|
-
*/
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
var Command;
|
|
5119
|
-
|
|
5120
|
-
(function (Command) {
|
|
5121
|
-
/**
|
|
5122
|
-
* Creates a new Command literal.
|
|
5123
|
-
*/
|
|
5124
|
-
function create(title, command) {
|
|
5125
|
-
var args = [];
|
|
5126
|
-
|
|
5127
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
5128
|
-
args[_i - 2] = arguments[_i];
|
|
5129
|
-
}
|
|
5130
|
-
|
|
5131
|
-
var result = {
|
|
5132
|
-
title: title,
|
|
5133
|
-
command: command
|
|
5134
|
-
};
|
|
5135
|
-
|
|
5136
|
-
if (Is$5.defined(args) && args.length > 0) {
|
|
5137
|
-
result.arguments = args;
|
|
5138
|
-
}
|
|
5139
|
-
|
|
5140
|
-
return result;
|
|
5141
|
-
}
|
|
5142
|
-
|
|
5143
|
-
Command.create = create;
|
|
5144
|
-
/**
|
|
5145
|
-
* Checks whether the given literal conforms to the [Command](#Command) interface.
|
|
5146
|
-
*/
|
|
5147
|
-
|
|
5148
|
-
function is(value) {
|
|
5149
|
-
var candidate = value;
|
|
5150
|
-
return Is$5.defined(candidate) && Is$5.string(candidate.title) && Is$5.string(candidate.command);
|
|
5151
|
-
}
|
|
5152
|
-
|
|
5153
|
-
Command.is = is;
|
|
5154
|
-
})(Command || (Command = {}));
|
|
5155
|
-
/**
|
|
5156
|
-
* The TextEdit namespace provides helper function to create replace,
|
|
5157
|
-
* insert and delete edits more easily.
|
|
5158
|
-
*/
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
var TextEdit;
|
|
5162
|
-
|
|
5163
|
-
(function (TextEdit) {
|
|
5164
|
-
/**
|
|
5165
|
-
* Creates a replace text edit.
|
|
5166
|
-
* @param range The range of text to be replaced.
|
|
5167
|
-
* @param newText The new text.
|
|
5168
|
-
*/
|
|
5169
|
-
function replace(range, newText) {
|
|
5170
|
-
return {
|
|
5171
|
-
range: range,
|
|
5172
|
-
newText: newText
|
|
5173
|
-
};
|
|
5174
|
-
}
|
|
5175
|
-
|
|
5176
|
-
TextEdit.replace = replace;
|
|
5177
|
-
/**
|
|
5178
|
-
* Creates a insert text edit.
|
|
5179
|
-
* @param position The position to insert the text at.
|
|
5180
|
-
* @param newText The text to be inserted.
|
|
5181
|
-
*/
|
|
5182
|
-
|
|
5183
|
-
function insert(position, newText) {
|
|
5184
|
-
return {
|
|
5185
|
-
range: {
|
|
5186
|
-
start: position,
|
|
5187
|
-
end: position
|
|
5188
|
-
},
|
|
5189
|
-
newText: newText
|
|
5190
|
-
};
|
|
5191
|
-
}
|
|
5192
|
-
|
|
5193
|
-
TextEdit.insert = insert;
|
|
5194
|
-
/**
|
|
5195
|
-
* Creates a delete text edit.
|
|
5196
|
-
* @param range The range of text to be deleted.
|
|
5197
|
-
*/
|
|
5198
|
-
|
|
5199
|
-
function del(range) {
|
|
5200
|
-
return {
|
|
5201
|
-
range: range,
|
|
5202
|
-
newText: ''
|
|
5203
|
-
};
|
|
5204
|
-
}
|
|
5205
|
-
|
|
5206
|
-
TextEdit.del = del;
|
|
5207
|
-
|
|
5208
|
-
function is(value) {
|
|
5209
|
-
var candidate = value;
|
|
5210
|
-
return Is$5.objectLiteral(candidate) && Is$5.string(candidate.newText) && Range.is(candidate.range);
|
|
5211
|
-
}
|
|
5212
|
-
|
|
5213
|
-
TextEdit.is = is;
|
|
5214
|
-
})(TextEdit || (TextEdit = {}));
|
|
5215
|
-
|
|
5216
|
-
var ChangeAnnotation;
|
|
5217
|
-
|
|
5218
|
-
(function (ChangeAnnotation) {
|
|
5219
|
-
function create(label, needsConfirmation, description) {
|
|
5220
|
-
var result = {
|
|
5221
|
-
label: label
|
|
5222
|
-
};
|
|
5223
|
-
|
|
5224
|
-
if (needsConfirmation !== undefined) {
|
|
5225
|
-
result.needsConfirmation = needsConfirmation;
|
|
5226
|
-
}
|
|
5227
|
-
|
|
5228
|
-
if (description !== undefined) {
|
|
5229
|
-
result.description = description;
|
|
5230
|
-
}
|
|
5231
|
-
|
|
5232
|
-
return result;
|
|
5233
|
-
}
|
|
5234
|
-
|
|
5235
|
-
ChangeAnnotation.create = create;
|
|
5236
|
-
|
|
5237
|
-
function is(value) {
|
|
5238
|
-
var candidate = value;
|
|
5239
|
-
return candidate !== undefined && Is$5.objectLiteral(candidate) && Is$5.string(candidate.label) && (Is$5.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) && (Is$5.string(candidate.description) || candidate.description === undefined);
|
|
5240
|
-
}
|
|
5241
|
-
|
|
5242
|
-
ChangeAnnotation.is = is;
|
|
5243
|
-
})(ChangeAnnotation || (ChangeAnnotation = {}));
|
|
5244
|
-
|
|
5245
|
-
var ChangeAnnotationIdentifier;
|
|
5246
|
-
|
|
5247
|
-
(function (ChangeAnnotationIdentifier) {
|
|
5248
|
-
function is(value) {
|
|
5249
|
-
var candidate = value;
|
|
5250
|
-
return typeof candidate === 'string';
|
|
5251
|
-
}
|
|
5252
|
-
|
|
5253
|
-
ChangeAnnotationIdentifier.is = is;
|
|
5254
|
-
})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));
|
|
5255
|
-
|
|
5256
|
-
var AnnotatedTextEdit;
|
|
5257
|
-
|
|
5258
|
-
(function (AnnotatedTextEdit) {
|
|
5259
|
-
/**
|
|
5260
|
-
* Creates an annotated replace text edit.
|
|
5261
|
-
*
|
|
5262
|
-
* @param range The range of text to be replaced.
|
|
5263
|
-
* @param newText The new text.
|
|
5264
|
-
* @param annotation The annotation.
|
|
5265
|
-
*/
|
|
5266
|
-
function replace(range, newText, annotation) {
|
|
5267
|
-
return {
|
|
5268
|
-
range: range,
|
|
5269
|
-
newText: newText,
|
|
5270
|
-
annotationId: annotation
|
|
5271
|
-
};
|
|
5272
|
-
}
|
|
5273
|
-
|
|
5274
|
-
AnnotatedTextEdit.replace = replace;
|
|
5275
|
-
/**
|
|
5276
|
-
* Creates an annotated insert text edit.
|
|
5277
|
-
*
|
|
5278
|
-
* @param position The position to insert the text at.
|
|
5279
|
-
* @param newText The text to be inserted.
|
|
5280
|
-
* @param annotation The annotation.
|
|
5281
|
-
*/
|
|
5282
|
-
|
|
5283
|
-
function insert(position, newText, annotation) {
|
|
5284
|
-
return {
|
|
5285
|
-
range: {
|
|
5286
|
-
start: position,
|
|
5287
|
-
end: position
|
|
5288
|
-
},
|
|
5289
|
-
newText: newText,
|
|
5290
|
-
annotationId: annotation
|
|
5291
|
-
};
|
|
5292
|
-
}
|
|
5293
|
-
|
|
5294
|
-
AnnotatedTextEdit.insert = insert;
|
|
5295
|
-
/**
|
|
5296
|
-
* Creates an annotated delete text edit.
|
|
5297
|
-
*
|
|
5298
|
-
* @param range The range of text to be deleted.
|
|
5299
|
-
* @param annotation The annotation.
|
|
5300
|
-
*/
|
|
5301
|
-
|
|
5302
|
-
function del(range, annotation) {
|
|
5303
|
-
return {
|
|
5304
|
-
range: range,
|
|
5305
|
-
newText: '',
|
|
5306
|
-
annotationId: annotation
|
|
5307
|
-
};
|
|
5308
|
-
}
|
|
5309
|
-
|
|
5310
|
-
AnnotatedTextEdit.del = del;
|
|
5311
|
-
|
|
5312
|
-
function is(value) {
|
|
5313
|
-
var candidate = value;
|
|
5314
|
-
return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
5315
|
-
}
|
|
5316
|
-
|
|
5317
|
-
AnnotatedTextEdit.is = is;
|
|
5318
|
-
})(AnnotatedTextEdit || (AnnotatedTextEdit = {}));
|
|
5319
|
-
/**
|
|
5320
|
-
* The TextDocumentEdit namespace provides helper function to create
|
|
5321
|
-
* an edit that manipulates a text document.
|
|
5322
|
-
*/
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
var TextDocumentEdit;
|
|
5326
|
-
|
|
5327
|
-
(function (TextDocumentEdit) {
|
|
5328
|
-
/**
|
|
5329
|
-
* Creates a new `TextDocumentEdit`
|
|
5330
|
-
*/
|
|
5331
|
-
function create(textDocument, edits) {
|
|
5332
|
-
return {
|
|
5333
|
-
textDocument: textDocument,
|
|
5334
|
-
edits: edits
|
|
5335
|
-
};
|
|
5336
|
-
}
|
|
5337
|
-
|
|
5338
|
-
TextDocumentEdit.create = create;
|
|
5339
|
-
|
|
5340
|
-
function is(value) {
|
|
5341
|
-
var candidate = value;
|
|
5342
|
-
return Is$5.defined(candidate) && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) && Array.isArray(candidate.edits);
|
|
5343
|
-
}
|
|
5344
|
-
|
|
5345
|
-
TextDocumentEdit.is = is;
|
|
5346
|
-
})(TextDocumentEdit || (TextDocumentEdit = {}));
|
|
5347
|
-
|
|
5348
|
-
var CreateFile;
|
|
5349
|
-
|
|
5350
|
-
(function (CreateFile) {
|
|
5351
|
-
function create(uri, options, annotation) {
|
|
5352
|
-
var result = {
|
|
5353
|
-
kind: 'create',
|
|
5354
|
-
uri: uri
|
|
5355
|
-
};
|
|
5356
|
-
|
|
5357
|
-
if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
|
|
5358
|
-
result.options = options;
|
|
5359
|
-
}
|
|
5360
|
-
|
|
5361
|
-
if (annotation !== undefined) {
|
|
5362
|
-
result.annotationId = annotation;
|
|
5363
|
-
}
|
|
5364
|
-
|
|
5365
|
-
return result;
|
|
5366
|
-
}
|
|
5367
|
-
|
|
5368
|
-
CreateFile.create = create;
|
|
5369
|
-
|
|
5370
|
-
function is(value) {
|
|
5371
|
-
var candidate = value;
|
|
5372
|
-
return candidate && candidate.kind === 'create' && Is$5.string(candidate.uri) && (candidate.options === undefined || (candidate.options.overwrite === undefined || Is$5.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is$5.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
5373
|
-
}
|
|
5374
|
-
|
|
5375
|
-
CreateFile.is = is;
|
|
5376
|
-
})(CreateFile || (CreateFile = {}));
|
|
5377
|
-
|
|
5378
|
-
var RenameFile;
|
|
5379
|
-
|
|
5380
|
-
(function (RenameFile) {
|
|
5381
|
-
function create(oldUri, newUri, options, annotation) {
|
|
5382
|
-
var result = {
|
|
5383
|
-
kind: 'rename',
|
|
5384
|
-
oldUri: oldUri,
|
|
5385
|
-
newUri: newUri
|
|
5386
|
-
};
|
|
5387
|
-
|
|
5388
|
-
if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
|
|
5389
|
-
result.options = options;
|
|
5390
|
-
}
|
|
5391
|
-
|
|
5392
|
-
if (annotation !== undefined) {
|
|
5393
|
-
result.annotationId = annotation;
|
|
5394
|
-
}
|
|
5395
|
-
|
|
5396
|
-
return result;
|
|
5397
|
-
}
|
|
5398
|
-
|
|
5399
|
-
RenameFile.create = create;
|
|
5400
|
-
|
|
5401
|
-
function is(value) {
|
|
5402
|
-
var candidate = value;
|
|
5403
|
-
return candidate && candidate.kind === 'rename' && Is$5.string(candidate.oldUri) && Is$5.string(candidate.newUri) && (candidate.options === undefined || (candidate.options.overwrite === undefined || Is$5.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is$5.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
5404
|
-
}
|
|
5405
|
-
|
|
5406
|
-
RenameFile.is = is;
|
|
5407
|
-
})(RenameFile || (RenameFile = {}));
|
|
5408
|
-
|
|
5409
|
-
var DeleteFile;
|
|
5410
|
-
|
|
5411
|
-
(function (DeleteFile) {
|
|
5412
|
-
function create(uri, options, annotation) {
|
|
5413
|
-
var result = {
|
|
5414
|
-
kind: 'delete',
|
|
5415
|
-
uri: uri
|
|
5416
|
-
};
|
|
5417
|
-
|
|
5418
|
-
if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
|
|
5419
|
-
result.options = options;
|
|
5420
|
-
}
|
|
5421
|
-
|
|
5422
|
-
if (annotation !== undefined) {
|
|
5423
|
-
result.annotationId = annotation;
|
|
5424
|
-
}
|
|
5425
|
-
|
|
5426
|
-
return result;
|
|
5427
|
-
}
|
|
5428
|
-
|
|
5429
|
-
DeleteFile.create = create;
|
|
5430
|
-
|
|
5431
|
-
function is(value) {
|
|
5432
|
-
var candidate = value;
|
|
5433
|
-
return candidate && candidate.kind === 'delete' && Is$5.string(candidate.uri) && (candidate.options === undefined || (candidate.options.recursive === undefined || Is$5.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is$5.boolean(candidate.options.ignoreIfNotExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
5434
|
-
}
|
|
5435
|
-
|
|
5436
|
-
DeleteFile.is = is;
|
|
5437
|
-
})(DeleteFile || (DeleteFile = {}));
|
|
5438
|
-
|
|
5439
|
-
var WorkspaceEdit;
|
|
5440
|
-
|
|
5441
|
-
(function (WorkspaceEdit) {
|
|
5442
|
-
function is(value) {
|
|
5443
|
-
var candidate = value;
|
|
5444
|
-
return candidate && (candidate.changes !== undefined || candidate.documentChanges !== undefined) && (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {
|
|
5445
|
-
if (Is$5.string(change.kind)) {
|
|
5446
|
-
return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
|
|
5447
|
-
} else {
|
|
5448
|
-
return TextDocumentEdit.is(change);
|
|
5449
|
-
}
|
|
5450
|
-
}));
|
|
5451
|
-
}
|
|
5452
|
-
|
|
5453
|
-
WorkspaceEdit.is = is;
|
|
5454
|
-
})(WorkspaceEdit || (WorkspaceEdit = {}));
|
|
5455
|
-
|
|
5456
|
-
var TextEditChangeImpl =
|
|
5457
|
-
/** @class */
|
|
5458
|
-
function () {
|
|
5459
|
-
function TextEditChangeImpl(edits, changeAnnotations) {
|
|
5460
|
-
this.edits = edits;
|
|
5461
|
-
this.changeAnnotations = changeAnnotations;
|
|
5462
|
-
}
|
|
5463
|
-
|
|
5464
|
-
TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {
|
|
5465
|
-
var edit;
|
|
5466
|
-
var id;
|
|
5467
|
-
|
|
5468
|
-
if (annotation === undefined) {
|
|
5469
|
-
edit = TextEdit.insert(position, newText);
|
|
5470
|
-
} else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
5471
|
-
id = annotation;
|
|
5472
|
-
edit = AnnotatedTextEdit.insert(position, newText, annotation);
|
|
5473
|
-
} else {
|
|
5474
|
-
this.assertChangeAnnotations(this.changeAnnotations);
|
|
5475
|
-
id = this.changeAnnotations.manage(annotation);
|
|
5476
|
-
edit = AnnotatedTextEdit.insert(position, newText, id);
|
|
5477
|
-
}
|
|
5478
|
-
|
|
5479
|
-
this.edits.push(edit);
|
|
5480
|
-
|
|
5481
|
-
if (id !== undefined) {
|
|
5482
|
-
return id;
|
|
5483
|
-
}
|
|
5484
|
-
};
|
|
5485
|
-
|
|
5486
|
-
TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {
|
|
5487
|
-
var edit;
|
|
5488
|
-
var id;
|
|
5489
|
-
|
|
5490
|
-
if (annotation === undefined) {
|
|
5491
|
-
edit = TextEdit.replace(range, newText);
|
|
5492
|
-
} else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
5493
|
-
id = annotation;
|
|
5494
|
-
edit = AnnotatedTextEdit.replace(range, newText, annotation);
|
|
5495
|
-
} else {
|
|
5496
|
-
this.assertChangeAnnotations(this.changeAnnotations);
|
|
5497
|
-
id = this.changeAnnotations.manage(annotation);
|
|
5498
|
-
edit = AnnotatedTextEdit.replace(range, newText, id);
|
|
5499
|
-
}
|
|
5500
|
-
|
|
5501
|
-
this.edits.push(edit);
|
|
5502
|
-
|
|
5503
|
-
if (id !== undefined) {
|
|
5504
|
-
return id;
|
|
5505
|
-
}
|
|
5506
|
-
};
|
|
5507
|
-
|
|
5508
|
-
TextEditChangeImpl.prototype.delete = function (range, annotation) {
|
|
5509
|
-
var edit;
|
|
5510
|
-
var id;
|
|
5511
|
-
|
|
5512
|
-
if (annotation === undefined) {
|
|
5513
|
-
edit = TextEdit.del(range);
|
|
5514
|
-
} else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
5515
|
-
id = annotation;
|
|
5516
|
-
edit = AnnotatedTextEdit.del(range, annotation);
|
|
5517
|
-
} else {
|
|
5518
|
-
this.assertChangeAnnotations(this.changeAnnotations);
|
|
5519
|
-
id = this.changeAnnotations.manage(annotation);
|
|
5520
|
-
edit = AnnotatedTextEdit.del(range, id);
|
|
5521
|
-
}
|
|
5522
|
-
|
|
5523
|
-
this.edits.push(edit);
|
|
5524
|
-
|
|
5525
|
-
if (id !== undefined) {
|
|
5526
|
-
return id;
|
|
5527
|
-
}
|
|
5528
|
-
};
|
|
5529
|
-
|
|
5530
|
-
TextEditChangeImpl.prototype.add = function (edit) {
|
|
5531
|
-
this.edits.push(edit);
|
|
5532
|
-
};
|
|
5533
|
-
|
|
5534
|
-
TextEditChangeImpl.prototype.all = function () {
|
|
5535
|
-
return this.edits;
|
|
5536
|
-
};
|
|
5537
|
-
|
|
5538
|
-
TextEditChangeImpl.prototype.clear = function () {
|
|
5539
|
-
this.edits.splice(0, this.edits.length);
|
|
5540
|
-
};
|
|
5541
|
-
|
|
5542
|
-
TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {
|
|
5543
|
-
if (value === undefined) {
|
|
5544
|
-
throw new Error("Text edit change is not configured to manage change annotations.");
|
|
5545
|
-
}
|
|
5546
|
-
};
|
|
5547
|
-
|
|
5548
|
-
return TextEditChangeImpl;
|
|
5549
|
-
}();
|
|
5550
|
-
/**
|
|
5551
|
-
* A helper class
|
|
5552
|
-
*/
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
var ChangeAnnotations =
|
|
5556
|
-
/** @class */
|
|
5557
|
-
function () {
|
|
5558
|
-
function ChangeAnnotations(annotations) {
|
|
5559
|
-
this._annotations = annotations === undefined ? Object.create(null) : annotations;
|
|
5560
|
-
this._counter = 0;
|
|
5561
|
-
this._size = 0;
|
|
5562
|
-
}
|
|
5563
|
-
|
|
5564
|
-
ChangeAnnotations.prototype.all = function () {
|
|
5565
|
-
return this._annotations;
|
|
5566
|
-
};
|
|
5567
|
-
|
|
5568
|
-
Object.defineProperty(ChangeAnnotations.prototype, "size", {
|
|
5569
|
-
get: function () {
|
|
5570
|
-
return this._size;
|
|
5571
|
-
},
|
|
5572
|
-
enumerable: false,
|
|
5573
|
-
configurable: true
|
|
5574
|
-
});
|
|
5575
|
-
|
|
5576
|
-
ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {
|
|
5577
|
-
var id;
|
|
5578
|
-
|
|
5579
|
-
if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
|
|
5580
|
-
id = idOrAnnotation;
|
|
5581
|
-
} else {
|
|
5582
|
-
id = this.nextId();
|
|
5583
|
-
annotation = idOrAnnotation;
|
|
5584
|
-
}
|
|
5585
|
-
|
|
5586
|
-
if (this._annotations[id] !== undefined) {
|
|
5587
|
-
throw new Error("Id " + id + " is already in use.");
|
|
5588
|
-
}
|
|
5589
|
-
|
|
5590
|
-
if (annotation === undefined) {
|
|
5591
|
-
throw new Error("No annotation provided for id " + id);
|
|
5592
|
-
}
|
|
5593
|
-
|
|
5594
|
-
this._annotations[id] = annotation;
|
|
5595
|
-
this._size++;
|
|
5596
|
-
return id;
|
|
5597
|
-
};
|
|
5598
|
-
|
|
5599
|
-
ChangeAnnotations.prototype.nextId = function () {
|
|
5600
|
-
this._counter++;
|
|
5601
|
-
return this._counter.toString();
|
|
5602
|
-
};
|
|
5603
|
-
|
|
5604
|
-
return ChangeAnnotations;
|
|
5605
|
-
}();
|
|
5606
|
-
/**
|
|
5607
|
-
* A workspace change helps constructing changes to a workspace.
|
|
5608
|
-
*/
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
var WorkspaceChange =
|
|
5612
|
-
/** @class */
|
|
5613
|
-
function () {
|
|
5614
|
-
function WorkspaceChange(workspaceEdit) {
|
|
5615
|
-
var _this = this;
|
|
5616
|
-
|
|
5617
|
-
this._textEditChanges = Object.create(null);
|
|
5618
|
-
|
|
5619
|
-
if (workspaceEdit !== undefined) {
|
|
5620
|
-
this._workspaceEdit = workspaceEdit;
|
|
5621
|
-
|
|
5622
|
-
if (workspaceEdit.documentChanges) {
|
|
5623
|
-
this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
|
|
5624
|
-
workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
5625
|
-
workspaceEdit.documentChanges.forEach(function (change) {
|
|
5626
|
-
if (TextDocumentEdit.is(change)) {
|
|
5627
|
-
var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
|
|
5628
|
-
_this._textEditChanges[change.textDocument.uri] = textEditChange;
|
|
5629
|
-
}
|
|
5630
|
-
});
|
|
5631
|
-
} else if (workspaceEdit.changes) {
|
|
5632
|
-
Object.keys(workspaceEdit.changes).forEach(function (key) {
|
|
5633
|
-
var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
|
|
5634
|
-
_this._textEditChanges[key] = textEditChange;
|
|
5635
|
-
});
|
|
5636
|
-
}
|
|
5637
|
-
} else {
|
|
5638
|
-
this._workspaceEdit = {};
|
|
5639
|
-
}
|
|
5640
|
-
}
|
|
5641
|
-
|
|
5642
|
-
Object.defineProperty(WorkspaceChange.prototype, "edit", {
|
|
5643
|
-
/**
|
|
5644
|
-
* Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
|
|
5645
|
-
* use to be returned from a workspace edit operation like rename.
|
|
5646
|
-
*/
|
|
5647
|
-
get: function () {
|
|
5648
|
-
this.initDocumentChanges();
|
|
5649
|
-
|
|
5650
|
-
if (this._changeAnnotations !== undefined) {
|
|
5651
|
-
if (this._changeAnnotations.size === 0) {
|
|
5652
|
-
this._workspaceEdit.changeAnnotations = undefined;
|
|
5653
|
-
} else {
|
|
5654
|
-
this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
5655
|
-
}
|
|
5656
|
-
}
|
|
5657
|
-
|
|
5658
|
-
return this._workspaceEdit;
|
|
5659
|
-
},
|
|
5660
|
-
enumerable: false,
|
|
5661
|
-
configurable: true
|
|
5662
|
-
});
|
|
5663
|
-
|
|
5664
|
-
WorkspaceChange.prototype.getTextEditChange = function (key) {
|
|
5665
|
-
if (OptionalVersionedTextDocumentIdentifier.is(key)) {
|
|
5666
|
-
this.initDocumentChanges();
|
|
5667
|
-
|
|
5668
|
-
if (this._workspaceEdit.documentChanges === undefined) {
|
|
5669
|
-
throw new Error('Workspace edit is not configured for document changes.');
|
|
5670
|
-
}
|
|
5671
|
-
|
|
5672
|
-
var textDocument = {
|
|
5673
|
-
uri: key.uri,
|
|
5674
|
-
version: key.version
|
|
5675
|
-
};
|
|
5676
|
-
var result = this._textEditChanges[textDocument.uri];
|
|
5677
|
-
|
|
5678
|
-
if (!result) {
|
|
5679
|
-
var edits = [];
|
|
5680
|
-
var textDocumentEdit = {
|
|
5681
|
-
textDocument: textDocument,
|
|
5682
|
-
edits: edits
|
|
5683
|
-
};
|
|
5684
|
-
|
|
5685
|
-
this._workspaceEdit.documentChanges.push(textDocumentEdit);
|
|
5686
|
-
|
|
5687
|
-
result = new TextEditChangeImpl(edits, this._changeAnnotations);
|
|
5688
|
-
this._textEditChanges[textDocument.uri] = result;
|
|
5689
|
-
}
|
|
5690
|
-
|
|
5691
|
-
return result;
|
|
5692
|
-
} else {
|
|
5693
|
-
this.initChanges();
|
|
5694
|
-
|
|
5695
|
-
if (this._workspaceEdit.changes === undefined) {
|
|
5696
|
-
throw new Error('Workspace edit is not configured for normal text edit changes.');
|
|
5697
|
-
}
|
|
5698
|
-
|
|
5699
|
-
var result = this._textEditChanges[key];
|
|
5700
|
-
|
|
5701
|
-
if (!result) {
|
|
5702
|
-
var edits = [];
|
|
5703
|
-
this._workspaceEdit.changes[key] = edits;
|
|
5704
|
-
result = new TextEditChangeImpl(edits);
|
|
5705
|
-
this._textEditChanges[key] = result;
|
|
5706
|
-
}
|
|
5707
|
-
|
|
5708
|
-
return result;
|
|
5709
|
-
}
|
|
5710
|
-
};
|
|
5711
|
-
|
|
5712
|
-
WorkspaceChange.prototype.initDocumentChanges = function () {
|
|
5713
|
-
if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
|
|
5714
|
-
this._changeAnnotations = new ChangeAnnotations();
|
|
5715
|
-
this._workspaceEdit.documentChanges = [];
|
|
5716
|
-
this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
5717
|
-
}
|
|
5718
|
-
};
|
|
5719
|
-
|
|
5720
|
-
WorkspaceChange.prototype.initChanges = function () {
|
|
5721
|
-
if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
|
|
5722
|
-
this._workspaceEdit.changes = Object.create(null);
|
|
5723
|
-
}
|
|
5724
|
-
};
|
|
5725
|
-
|
|
5726
|
-
WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {
|
|
5727
|
-
this.initDocumentChanges();
|
|
5728
|
-
|
|
5729
|
-
if (this._workspaceEdit.documentChanges === undefined) {
|
|
5730
|
-
throw new Error('Workspace edit is not configured for document changes.');
|
|
5731
|
-
}
|
|
5732
|
-
|
|
5733
|
-
var annotation;
|
|
5734
|
-
|
|
5735
|
-
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
5736
|
-
annotation = optionsOrAnnotation;
|
|
5737
|
-
} else {
|
|
5738
|
-
options = optionsOrAnnotation;
|
|
5739
|
-
}
|
|
5740
|
-
|
|
5741
|
-
var operation;
|
|
5742
|
-
var id;
|
|
5743
|
-
|
|
5744
|
-
if (annotation === undefined) {
|
|
5745
|
-
operation = CreateFile.create(uri, options);
|
|
5746
|
-
} else {
|
|
5747
|
-
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
5748
|
-
operation = CreateFile.create(uri, options, id);
|
|
5749
|
-
}
|
|
5750
|
-
|
|
5751
|
-
this._workspaceEdit.documentChanges.push(operation);
|
|
5752
|
-
|
|
5753
|
-
if (id !== undefined) {
|
|
5754
|
-
return id;
|
|
5755
|
-
}
|
|
5756
|
-
};
|
|
5757
|
-
|
|
5758
|
-
WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {
|
|
5759
|
-
this.initDocumentChanges();
|
|
5760
|
-
|
|
5761
|
-
if (this._workspaceEdit.documentChanges === undefined) {
|
|
5762
|
-
throw new Error('Workspace edit is not configured for document changes.');
|
|
5763
|
-
}
|
|
5764
|
-
|
|
5765
|
-
var annotation;
|
|
5766
|
-
|
|
5767
|
-
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
5768
|
-
annotation = optionsOrAnnotation;
|
|
5769
|
-
} else {
|
|
5770
|
-
options = optionsOrAnnotation;
|
|
5771
|
-
}
|
|
5772
|
-
|
|
5773
|
-
var operation;
|
|
5774
|
-
var id;
|
|
5775
|
-
|
|
5776
|
-
if (annotation === undefined) {
|
|
5777
|
-
operation = RenameFile.create(oldUri, newUri, options);
|
|
5778
|
-
} else {
|
|
5779
|
-
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
5780
|
-
operation = RenameFile.create(oldUri, newUri, options, id);
|
|
5781
|
-
}
|
|
5782
|
-
|
|
5783
|
-
this._workspaceEdit.documentChanges.push(operation);
|
|
5784
|
-
|
|
5785
|
-
if (id !== undefined) {
|
|
5786
|
-
return id;
|
|
5787
|
-
}
|
|
5788
|
-
};
|
|
5789
|
-
|
|
5790
|
-
WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {
|
|
5791
|
-
this.initDocumentChanges();
|
|
5792
|
-
|
|
5793
|
-
if (this._workspaceEdit.documentChanges === undefined) {
|
|
5794
|
-
throw new Error('Workspace edit is not configured for document changes.');
|
|
5795
|
-
}
|
|
5796
|
-
|
|
5797
|
-
var annotation;
|
|
5798
|
-
|
|
5799
|
-
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
5800
|
-
annotation = optionsOrAnnotation;
|
|
5801
|
-
} else {
|
|
5802
|
-
options = optionsOrAnnotation;
|
|
5803
|
-
}
|
|
5804
|
-
|
|
5805
|
-
var operation;
|
|
5806
|
-
var id;
|
|
5807
|
-
|
|
5808
|
-
if (annotation === undefined) {
|
|
5809
|
-
operation = DeleteFile.create(uri, options);
|
|
5810
|
-
} else {
|
|
5811
|
-
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
5812
|
-
operation = DeleteFile.create(uri, options, id);
|
|
5813
|
-
}
|
|
5814
|
-
|
|
5815
|
-
this._workspaceEdit.documentChanges.push(operation);
|
|
5816
|
-
|
|
5817
|
-
if (id !== undefined) {
|
|
5818
|
-
return id;
|
|
5819
|
-
}
|
|
5820
|
-
};
|
|
5821
|
-
|
|
5822
|
-
return WorkspaceChange;
|
|
5823
|
-
}();
|
|
5824
|
-
/**
|
|
5825
|
-
* The TextDocumentIdentifier namespace provides helper functions to work with
|
|
5826
|
-
* [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
|
|
5827
|
-
*/
|
|
5828
|
-
|
|
5829
|
-
var TextDocumentIdentifier;
|
|
5830
|
-
|
|
5831
|
-
(function (TextDocumentIdentifier) {
|
|
5832
|
-
/**
|
|
5833
|
-
* Creates a new TextDocumentIdentifier literal.
|
|
5834
|
-
* @param uri The document's uri.
|
|
5835
|
-
*/
|
|
5836
|
-
function create(uri) {
|
|
5837
|
-
return {
|
|
5838
|
-
uri: uri
|
|
5839
|
-
};
|
|
5840
|
-
}
|
|
5841
|
-
|
|
5842
|
-
TextDocumentIdentifier.create = create;
|
|
5843
|
-
/**
|
|
5844
|
-
* Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
|
|
5845
|
-
*/
|
|
5846
|
-
|
|
5847
|
-
function is(value) {
|
|
5848
|
-
var candidate = value;
|
|
5849
|
-
return Is$5.defined(candidate) && Is$5.string(candidate.uri);
|
|
5850
|
-
}
|
|
5851
|
-
|
|
5852
|
-
TextDocumentIdentifier.is = is;
|
|
5853
|
-
})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
|
|
5854
|
-
/**
|
|
5855
|
-
* The VersionedTextDocumentIdentifier namespace provides helper functions to work with
|
|
5856
|
-
* [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
|
|
5857
|
-
*/
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
var VersionedTextDocumentIdentifier;
|
|
5861
|
-
|
|
5862
|
-
(function (VersionedTextDocumentIdentifier) {
|
|
5863
|
-
/**
|
|
5864
|
-
* Creates a new VersionedTextDocumentIdentifier literal.
|
|
5865
|
-
* @param uri The document's uri.
|
|
5866
|
-
* @param uri The document's text.
|
|
5867
|
-
*/
|
|
5868
|
-
function create(uri, version) {
|
|
5869
|
-
return {
|
|
5870
|
-
uri: uri,
|
|
5871
|
-
version: version
|
|
5872
|
-
};
|
|
5873
|
-
}
|
|
5874
|
-
|
|
5875
|
-
VersionedTextDocumentIdentifier.create = create;
|
|
5876
|
-
/**
|
|
5877
|
-
* Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
|
|
5878
|
-
*/
|
|
5879
|
-
|
|
5880
|
-
function is(value) {
|
|
5881
|
-
var candidate = value;
|
|
5882
|
-
return Is$5.defined(candidate) && Is$5.string(candidate.uri) && Is$5.integer(candidate.version);
|
|
5883
|
-
}
|
|
5884
|
-
|
|
5885
|
-
VersionedTextDocumentIdentifier.is = is;
|
|
5886
|
-
})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
|
|
5887
|
-
/**
|
|
5888
|
-
* The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with
|
|
5889
|
-
* [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals.
|
|
5890
|
-
*/
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
var OptionalVersionedTextDocumentIdentifier;
|
|
5894
|
-
|
|
5895
|
-
(function (OptionalVersionedTextDocumentIdentifier) {
|
|
5896
|
-
/**
|
|
5897
|
-
* Creates a new OptionalVersionedTextDocumentIdentifier literal.
|
|
5898
|
-
* @param uri The document's uri.
|
|
5899
|
-
* @param uri The document's text.
|
|
5900
|
-
*/
|
|
5901
|
-
function create(uri, version) {
|
|
5902
|
-
return {
|
|
5903
|
-
uri: uri,
|
|
5904
|
-
version: version
|
|
5905
|
-
};
|
|
5906
|
-
}
|
|
5907
|
-
|
|
5908
|
-
OptionalVersionedTextDocumentIdentifier.create = create;
|
|
5909
|
-
/**
|
|
5910
|
-
* Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface.
|
|
5911
|
-
*/
|
|
5912
|
-
|
|
5913
|
-
function is(value) {
|
|
5914
|
-
var candidate = value;
|
|
5915
|
-
return Is$5.defined(candidate) && Is$5.string(candidate.uri) && (candidate.version === null || Is$5.integer(candidate.version));
|
|
5916
|
-
}
|
|
5917
|
-
|
|
5918
|
-
OptionalVersionedTextDocumentIdentifier.is = is;
|
|
5919
|
-
})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));
|
|
5920
|
-
/**
|
|
5921
|
-
* The TextDocumentItem namespace provides helper functions to work with
|
|
5922
|
-
* [TextDocumentItem](#TextDocumentItem) literals.
|
|
5923
|
-
*/
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
var TextDocumentItem;
|
|
5927
|
-
|
|
5928
|
-
(function (TextDocumentItem) {
|
|
5929
|
-
/**
|
|
5930
|
-
* Creates a new TextDocumentItem literal.
|
|
5931
|
-
* @param uri The document's uri.
|
|
5932
|
-
* @param languageId The document's language identifier.
|
|
5933
|
-
* @param version The document's version number.
|
|
5934
|
-
* @param text The document's text.
|
|
5935
|
-
*/
|
|
5936
|
-
function create(uri, languageId, version, text) {
|
|
5937
|
-
return {
|
|
5938
|
-
uri: uri,
|
|
5939
|
-
languageId: languageId,
|
|
5940
|
-
version: version,
|
|
5941
|
-
text: text
|
|
5942
|
-
};
|
|
5943
|
-
}
|
|
5944
|
-
|
|
5945
|
-
TextDocumentItem.create = create;
|
|
5946
|
-
/**
|
|
5947
|
-
* Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
|
|
5948
|
-
*/
|
|
5949
|
-
|
|
5950
|
-
function is(value) {
|
|
5951
|
-
var candidate = value;
|
|
5952
|
-
return Is$5.defined(candidate) && Is$5.string(candidate.uri) && Is$5.string(candidate.languageId) && Is$5.integer(candidate.version) && Is$5.string(candidate.text);
|
|
5953
|
-
}
|
|
5954
|
-
|
|
5955
|
-
TextDocumentItem.is = is;
|
|
5956
|
-
})(TextDocumentItem || (TextDocumentItem = {}));
|
|
5957
|
-
/**
|
|
5958
|
-
* Describes the content type that a client supports in various
|
|
5959
|
-
* result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
|
|
5960
|
-
*
|
|
5961
|
-
* Please note that `MarkupKinds` must not start with a `$`. This kinds
|
|
5962
|
-
* are reserved for internal usage.
|
|
5963
|
-
*/
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
var MarkupKind;
|
|
5967
|
-
|
|
5968
|
-
(function (MarkupKind) {
|
|
5969
|
-
/**
|
|
5970
|
-
* Plain text is supported as a content format
|
|
5971
|
-
*/
|
|
5972
|
-
MarkupKind.PlainText = 'plaintext';
|
|
5973
|
-
/**
|
|
5974
|
-
* Markdown is supported as a content format
|
|
5975
|
-
*/
|
|
5976
|
-
|
|
5977
|
-
MarkupKind.Markdown = 'markdown';
|
|
5978
|
-
})(MarkupKind || (MarkupKind = {}));
|
|
5979
|
-
|
|
5980
|
-
(function (MarkupKind) {
|
|
5981
|
-
/**
|
|
5982
|
-
* Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
|
|
5983
|
-
*/
|
|
5984
|
-
function is(value) {
|
|
5985
|
-
var candidate = value;
|
|
5986
|
-
return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
|
|
5987
|
-
}
|
|
5988
|
-
|
|
5989
|
-
MarkupKind.is = is;
|
|
5990
|
-
})(MarkupKind || (MarkupKind = {}));
|
|
5991
|
-
|
|
5992
|
-
var MarkupContent;
|
|
5993
|
-
|
|
5994
|
-
(function (MarkupContent) {
|
|
5995
|
-
/**
|
|
5996
|
-
* Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
|
|
5997
|
-
*/
|
|
5998
|
-
function is(value) {
|
|
5999
|
-
var candidate = value;
|
|
6000
|
-
return Is$5.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is$5.string(candidate.value);
|
|
6001
|
-
}
|
|
6002
|
-
|
|
6003
|
-
MarkupContent.is = is;
|
|
6004
|
-
})(MarkupContent || (MarkupContent = {}));
|
|
6005
|
-
/**
|
|
6006
|
-
* The kind of a completion entry.
|
|
6007
|
-
*/
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
var CompletionItemKind;
|
|
6011
|
-
|
|
6012
|
-
(function (CompletionItemKind) {
|
|
6013
|
-
CompletionItemKind.Text = 1;
|
|
6014
|
-
CompletionItemKind.Method = 2;
|
|
6015
|
-
CompletionItemKind.Function = 3;
|
|
6016
|
-
CompletionItemKind.Constructor = 4;
|
|
6017
|
-
CompletionItemKind.Field = 5;
|
|
6018
|
-
CompletionItemKind.Variable = 6;
|
|
6019
|
-
CompletionItemKind.Class = 7;
|
|
6020
|
-
CompletionItemKind.Interface = 8;
|
|
6021
|
-
CompletionItemKind.Module = 9;
|
|
6022
|
-
CompletionItemKind.Property = 10;
|
|
6023
|
-
CompletionItemKind.Unit = 11;
|
|
6024
|
-
CompletionItemKind.Value = 12;
|
|
6025
|
-
CompletionItemKind.Enum = 13;
|
|
6026
|
-
CompletionItemKind.Keyword = 14;
|
|
6027
|
-
CompletionItemKind.Snippet = 15;
|
|
6028
|
-
CompletionItemKind.Color = 16;
|
|
6029
|
-
CompletionItemKind.File = 17;
|
|
6030
|
-
CompletionItemKind.Reference = 18;
|
|
6031
|
-
CompletionItemKind.Folder = 19;
|
|
6032
|
-
CompletionItemKind.EnumMember = 20;
|
|
6033
|
-
CompletionItemKind.Constant = 21;
|
|
6034
|
-
CompletionItemKind.Struct = 22;
|
|
6035
|
-
CompletionItemKind.Event = 23;
|
|
6036
|
-
CompletionItemKind.Operator = 24;
|
|
6037
|
-
CompletionItemKind.TypeParameter = 25;
|
|
6038
|
-
})(CompletionItemKind || (CompletionItemKind = {}));
|
|
6039
|
-
/**
|
|
6040
|
-
* Defines whether the insert text in a completion item should be interpreted as
|
|
6041
|
-
* plain text or a snippet.
|
|
6042
|
-
*/
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
var InsertTextFormat;
|
|
6046
|
-
|
|
6047
|
-
(function (InsertTextFormat) {
|
|
6048
|
-
/**
|
|
6049
|
-
* The primary text to be inserted is treated as a plain string.
|
|
6050
|
-
*/
|
|
6051
|
-
InsertTextFormat.PlainText = 1;
|
|
6052
|
-
/**
|
|
6053
|
-
* The primary text to be inserted is treated as a snippet.
|
|
6054
|
-
*
|
|
6055
|
-
* A snippet can define tab stops and placeholders with `$1`, `$2`
|
|
6056
|
-
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
|
|
6057
|
-
* the end of the snippet. Placeholders with equal identifiers are linked,
|
|
6058
|
-
* that is typing in one will update others too.
|
|
6059
|
-
*
|
|
6060
|
-
* See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
|
|
6061
|
-
*/
|
|
6062
|
-
|
|
6063
|
-
InsertTextFormat.Snippet = 2;
|
|
6064
|
-
})(InsertTextFormat || (InsertTextFormat = {}));
|
|
6065
|
-
/**
|
|
6066
|
-
* Completion item tags are extra annotations that tweak the rendering of a completion
|
|
6067
|
-
* item.
|
|
6068
|
-
*
|
|
6069
|
-
* @since 3.15.0
|
|
6070
|
-
*/
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
var CompletionItemTag;
|
|
6074
|
-
|
|
6075
|
-
(function (CompletionItemTag) {
|
|
6076
|
-
/**
|
|
6077
|
-
* Render a completion as obsolete, usually using a strike-out.
|
|
6078
|
-
*/
|
|
6079
|
-
CompletionItemTag.Deprecated = 1;
|
|
6080
|
-
})(CompletionItemTag || (CompletionItemTag = {}));
|
|
6081
|
-
/**
|
|
6082
|
-
* The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
|
|
6083
|
-
*
|
|
6084
|
-
* @since 3.16.0
|
|
6085
|
-
*/
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
var InsertReplaceEdit;
|
|
6089
|
-
|
|
6090
|
-
(function (InsertReplaceEdit) {
|
|
6091
|
-
/**
|
|
6092
|
-
* Creates a new insert / replace edit
|
|
6093
|
-
*/
|
|
6094
|
-
function create(newText, insert, replace) {
|
|
6095
|
-
return {
|
|
6096
|
-
newText: newText,
|
|
6097
|
-
insert: insert,
|
|
6098
|
-
replace: replace
|
|
6099
|
-
};
|
|
6100
|
-
}
|
|
6101
|
-
|
|
6102
|
-
InsertReplaceEdit.create = create;
|
|
6103
|
-
/**
|
|
6104
|
-
* Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.
|
|
6105
|
-
*/
|
|
6106
|
-
|
|
6107
|
-
function is(value) {
|
|
6108
|
-
var candidate = value;
|
|
6109
|
-
return candidate && Is$5.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
|
|
6110
|
-
}
|
|
6111
|
-
|
|
6112
|
-
InsertReplaceEdit.is = is;
|
|
6113
|
-
})(InsertReplaceEdit || (InsertReplaceEdit = {}));
|
|
6114
|
-
/**
|
|
6115
|
-
* How whitespace and indentation is handled during completion
|
|
6116
|
-
* item insertion.
|
|
6117
|
-
*
|
|
6118
|
-
* @since 3.16.0
|
|
6119
|
-
*/
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
var InsertTextMode;
|
|
6123
|
-
|
|
6124
|
-
(function (InsertTextMode) {
|
|
6125
|
-
/**
|
|
6126
|
-
* The insertion or replace strings is taken as it is. If the
|
|
6127
|
-
* value is multi line the lines below the cursor will be
|
|
6128
|
-
* inserted using the indentation defined in the string value.
|
|
6129
|
-
* The client will not apply any kind of adjustments to the
|
|
6130
|
-
* string.
|
|
6131
|
-
*/
|
|
6132
|
-
InsertTextMode.asIs = 1;
|
|
6133
|
-
/**
|
|
6134
|
-
* The editor adjusts leading whitespace of new lines so that
|
|
6135
|
-
* they match the indentation up to the cursor of the line for
|
|
6136
|
-
* which the item is accepted.
|
|
6137
|
-
*
|
|
6138
|
-
* Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
|
|
6139
|
-
* multi line completion item is indented using 2 tabs and all
|
|
6140
|
-
* following lines inserted will be indented using 2 tabs as well.
|
|
6141
|
-
*/
|
|
6142
|
-
|
|
6143
|
-
InsertTextMode.adjustIndentation = 2;
|
|
6144
|
-
})(InsertTextMode || (InsertTextMode = {}));
|
|
6145
|
-
/**
|
|
6146
|
-
* The CompletionItem namespace provides functions to deal with
|
|
6147
|
-
* completion items.
|
|
6148
|
-
*/
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
var CompletionItem;
|
|
6152
|
-
|
|
6153
|
-
(function (CompletionItem) {
|
|
6154
|
-
/**
|
|
6155
|
-
* Create a completion item and seed it with a label.
|
|
6156
|
-
* @param label The completion item's label
|
|
6157
|
-
*/
|
|
6158
|
-
function create(label) {
|
|
6159
|
-
return {
|
|
6160
|
-
label: label
|
|
6161
|
-
};
|
|
6162
|
-
}
|
|
6163
|
-
|
|
6164
|
-
CompletionItem.create = create;
|
|
6165
|
-
})(CompletionItem || (CompletionItem = {}));
|
|
6166
|
-
/**
|
|
6167
|
-
* The CompletionList namespace provides functions to deal with
|
|
6168
|
-
* completion lists.
|
|
6169
|
-
*/
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
var CompletionList;
|
|
6173
|
-
|
|
6174
|
-
(function (CompletionList) {
|
|
6175
|
-
/**
|
|
6176
|
-
* Creates a new completion list.
|
|
6177
|
-
*
|
|
6178
|
-
* @param items The completion items.
|
|
6179
|
-
* @param isIncomplete The list is not complete.
|
|
6180
|
-
*/
|
|
6181
|
-
function create(items, isIncomplete) {
|
|
6182
|
-
return {
|
|
6183
|
-
items: items ? items : [],
|
|
6184
|
-
isIncomplete: !!isIncomplete
|
|
6185
|
-
};
|
|
6186
|
-
}
|
|
6187
|
-
|
|
6188
|
-
CompletionList.create = create;
|
|
6189
|
-
})(CompletionList || (CompletionList = {}));
|
|
6190
|
-
|
|
6191
|
-
var MarkedString;
|
|
6192
|
-
|
|
6193
|
-
(function (MarkedString) {
|
|
6194
|
-
/**
|
|
6195
|
-
* Creates a marked string from plain text.
|
|
6196
|
-
*
|
|
6197
|
-
* @param plainText The plain text.
|
|
6198
|
-
*/
|
|
6199
|
-
function fromPlainText(plainText) {
|
|
6200
|
-
return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
|
|
6201
|
-
}
|
|
6202
|
-
|
|
6203
|
-
MarkedString.fromPlainText = fromPlainText;
|
|
6204
|
-
/**
|
|
6205
|
-
* Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
|
|
6206
|
-
*/
|
|
6207
|
-
|
|
6208
|
-
function is(value) {
|
|
6209
|
-
var candidate = value;
|
|
6210
|
-
return Is$5.string(candidate) || Is$5.objectLiteral(candidate) && Is$5.string(candidate.language) && Is$5.string(candidate.value);
|
|
6211
|
-
}
|
|
6212
|
-
|
|
6213
|
-
MarkedString.is = is;
|
|
6214
|
-
})(MarkedString || (MarkedString = {}));
|
|
6215
|
-
|
|
6216
|
-
var Hover;
|
|
6217
|
-
|
|
6218
|
-
(function (Hover) {
|
|
6219
|
-
/**
|
|
6220
|
-
* Checks whether the given value conforms to the [Hover](#Hover) interface.
|
|
6221
|
-
*/
|
|
6222
|
-
function is(value) {
|
|
6223
|
-
var candidate = value;
|
|
6224
|
-
return !!candidate && Is$5.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || MarkedString.is(candidate.contents) || Is$5.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
|
|
6225
|
-
}
|
|
6226
|
-
|
|
6227
|
-
Hover.is = is;
|
|
6228
|
-
})(Hover || (Hover = {}));
|
|
6229
|
-
/**
|
|
6230
|
-
* The ParameterInformation namespace provides helper functions to work with
|
|
6231
|
-
* [ParameterInformation](#ParameterInformation) literals.
|
|
6232
|
-
*/
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
var ParameterInformation;
|
|
6236
|
-
|
|
6237
|
-
(function (ParameterInformation) {
|
|
6238
|
-
/**
|
|
6239
|
-
* Creates a new parameter information literal.
|
|
6240
|
-
*
|
|
6241
|
-
* @param label A label string.
|
|
6242
|
-
* @param documentation A doc string.
|
|
6243
|
-
*/
|
|
6244
|
-
function create(label, documentation) {
|
|
6245
|
-
return documentation ? {
|
|
6246
|
-
label: label,
|
|
6247
|
-
documentation: documentation
|
|
6248
|
-
} : {
|
|
6249
|
-
label: label
|
|
6250
|
-
};
|
|
6251
|
-
}
|
|
6252
|
-
|
|
6253
|
-
ParameterInformation.create = create;
|
|
6254
|
-
})(ParameterInformation || (ParameterInformation = {}));
|
|
6255
|
-
/**
|
|
6256
|
-
* The SignatureInformation namespace provides helper functions to work with
|
|
6257
|
-
* [SignatureInformation](#SignatureInformation) literals.
|
|
6258
|
-
*/
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
var SignatureInformation;
|
|
6262
|
-
|
|
6263
|
-
(function (SignatureInformation) {
|
|
6264
|
-
function create(label, documentation) {
|
|
6265
|
-
var parameters = [];
|
|
6266
|
-
|
|
6267
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
6268
|
-
parameters[_i - 2] = arguments[_i];
|
|
6269
|
-
}
|
|
6270
|
-
|
|
6271
|
-
var result = {
|
|
6272
|
-
label: label
|
|
6273
|
-
};
|
|
6274
|
-
|
|
6275
|
-
if (Is$5.defined(documentation)) {
|
|
6276
|
-
result.documentation = documentation;
|
|
6277
|
-
}
|
|
6278
|
-
|
|
6279
|
-
if (Is$5.defined(parameters)) {
|
|
6280
|
-
result.parameters = parameters;
|
|
6281
|
-
} else {
|
|
6282
|
-
result.parameters = [];
|
|
6283
|
-
}
|
|
6284
|
-
|
|
6285
|
-
return result;
|
|
6286
|
-
}
|
|
6287
|
-
|
|
6288
|
-
SignatureInformation.create = create;
|
|
6289
|
-
})(SignatureInformation || (SignatureInformation = {}));
|
|
6290
|
-
/**
|
|
6291
|
-
* A document highlight kind.
|
|
6292
|
-
*/
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
var DocumentHighlightKind;
|
|
6296
|
-
|
|
6297
|
-
(function (DocumentHighlightKind) {
|
|
6298
|
-
/**
|
|
6299
|
-
* A textual occurrence.
|
|
6300
|
-
*/
|
|
6301
|
-
DocumentHighlightKind.Text = 1;
|
|
6302
|
-
/**
|
|
6303
|
-
* Read-access of a symbol, like reading a variable.
|
|
6304
|
-
*/
|
|
6305
|
-
|
|
6306
|
-
DocumentHighlightKind.Read = 2;
|
|
6307
|
-
/**
|
|
6308
|
-
* Write-access of a symbol, like writing to a variable.
|
|
6309
|
-
*/
|
|
6310
|
-
|
|
6311
|
-
DocumentHighlightKind.Write = 3;
|
|
6312
|
-
})(DocumentHighlightKind || (DocumentHighlightKind = {}));
|
|
6313
|
-
/**
|
|
6314
|
-
* DocumentHighlight namespace to provide helper functions to work with
|
|
6315
|
-
* [DocumentHighlight](#DocumentHighlight) literals.
|
|
6316
|
-
*/
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
var DocumentHighlight;
|
|
6320
|
-
|
|
6321
|
-
(function (DocumentHighlight) {
|
|
6322
|
-
/**
|
|
6323
|
-
* Create a DocumentHighlight object.
|
|
6324
|
-
* @param range The range the highlight applies to.
|
|
6325
|
-
*/
|
|
6326
|
-
function create(range, kind) {
|
|
6327
|
-
var result = {
|
|
6328
|
-
range: range
|
|
6329
|
-
};
|
|
6330
|
-
|
|
6331
|
-
if (Is$5.number(kind)) {
|
|
6332
|
-
result.kind = kind;
|
|
6333
|
-
}
|
|
6334
|
-
|
|
6335
|
-
return result;
|
|
6336
|
-
}
|
|
6337
|
-
|
|
6338
|
-
DocumentHighlight.create = create;
|
|
6339
|
-
})(DocumentHighlight || (DocumentHighlight = {}));
|
|
6340
|
-
/**
|
|
6341
|
-
* A symbol kind.
|
|
6342
|
-
*/
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
var SymbolKind;
|
|
6346
|
-
|
|
6347
|
-
(function (SymbolKind) {
|
|
6348
|
-
SymbolKind.File = 1;
|
|
6349
|
-
SymbolKind.Module = 2;
|
|
6350
|
-
SymbolKind.Namespace = 3;
|
|
6351
|
-
SymbolKind.Package = 4;
|
|
6352
|
-
SymbolKind.Class = 5;
|
|
6353
|
-
SymbolKind.Method = 6;
|
|
6354
|
-
SymbolKind.Property = 7;
|
|
6355
|
-
SymbolKind.Field = 8;
|
|
6356
|
-
SymbolKind.Constructor = 9;
|
|
6357
|
-
SymbolKind.Enum = 10;
|
|
6358
|
-
SymbolKind.Interface = 11;
|
|
6359
|
-
SymbolKind.Function = 12;
|
|
6360
|
-
SymbolKind.Variable = 13;
|
|
6361
|
-
SymbolKind.Constant = 14;
|
|
6362
|
-
SymbolKind.String = 15;
|
|
6363
|
-
SymbolKind.Number = 16;
|
|
6364
|
-
SymbolKind.Boolean = 17;
|
|
6365
|
-
SymbolKind.Array = 18;
|
|
6366
|
-
SymbolKind.Object = 19;
|
|
6367
|
-
SymbolKind.Key = 20;
|
|
6368
|
-
SymbolKind.Null = 21;
|
|
6369
|
-
SymbolKind.EnumMember = 22;
|
|
6370
|
-
SymbolKind.Struct = 23;
|
|
6371
|
-
SymbolKind.Event = 24;
|
|
6372
|
-
SymbolKind.Operator = 25;
|
|
6373
|
-
SymbolKind.TypeParameter = 26;
|
|
6374
|
-
})(SymbolKind || (SymbolKind = {}));
|
|
6375
|
-
/**
|
|
6376
|
-
* Symbol tags are extra annotations that tweak the rendering of a symbol.
|
|
6377
|
-
* @since 3.16
|
|
6378
|
-
*/
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
var SymbolTag;
|
|
6382
|
-
|
|
6383
|
-
(function (SymbolTag) {
|
|
6384
|
-
/**
|
|
6385
|
-
* Render a symbol as obsolete, usually using a strike-out.
|
|
6386
|
-
*/
|
|
6387
|
-
SymbolTag.Deprecated = 1;
|
|
6388
|
-
})(SymbolTag || (SymbolTag = {}));
|
|
6389
|
-
|
|
6390
|
-
var SymbolInformation;
|
|
6391
|
-
|
|
6392
|
-
(function (SymbolInformation) {
|
|
6393
|
-
/**
|
|
6394
|
-
* Creates a new symbol information literal.
|
|
6395
|
-
*
|
|
6396
|
-
* @param name The name of the symbol.
|
|
6397
|
-
* @param kind The kind of the symbol.
|
|
6398
|
-
* @param range The range of the location of the symbol.
|
|
6399
|
-
* @param uri The resource of the location of symbol, defaults to the current document.
|
|
6400
|
-
* @param containerName The name of the symbol containing the symbol.
|
|
6401
|
-
*/
|
|
6402
|
-
function create(name, kind, range, uri, containerName) {
|
|
6403
|
-
var result = {
|
|
6404
|
-
name: name,
|
|
6405
|
-
kind: kind,
|
|
6406
|
-
location: {
|
|
6407
|
-
uri: uri,
|
|
6408
|
-
range: range
|
|
6409
|
-
}
|
|
6410
|
-
};
|
|
6411
|
-
|
|
6412
|
-
if (containerName) {
|
|
6413
|
-
result.containerName = containerName;
|
|
6414
|
-
}
|
|
6415
|
-
|
|
6416
|
-
return result;
|
|
6417
|
-
}
|
|
6418
|
-
|
|
6419
|
-
SymbolInformation.create = create;
|
|
6420
|
-
})(SymbolInformation || (SymbolInformation = {}));
|
|
6421
|
-
|
|
6422
|
-
var DocumentSymbol;
|
|
6423
|
-
|
|
6424
|
-
(function (DocumentSymbol) {
|
|
6425
|
-
/**
|
|
6426
|
-
* Creates a new symbol information literal.
|
|
6427
|
-
*
|
|
6428
|
-
* @param name The name of the symbol.
|
|
6429
|
-
* @param detail The detail of the symbol.
|
|
6430
|
-
* @param kind The kind of the symbol.
|
|
6431
|
-
* @param range The range of the symbol.
|
|
6432
|
-
* @param selectionRange The selectionRange of the symbol.
|
|
6433
|
-
* @param children Children of the symbol.
|
|
6434
|
-
*/
|
|
6435
|
-
function create(name, detail, kind, range, selectionRange, children) {
|
|
6436
|
-
var result = {
|
|
6437
|
-
name: name,
|
|
6438
|
-
detail: detail,
|
|
6439
|
-
kind: kind,
|
|
6440
|
-
range: range,
|
|
6441
|
-
selectionRange: selectionRange
|
|
6442
|
-
};
|
|
6443
|
-
|
|
6444
|
-
if (children !== undefined) {
|
|
6445
|
-
result.children = children;
|
|
6446
|
-
}
|
|
6447
|
-
|
|
6448
|
-
return result;
|
|
6449
|
-
}
|
|
6450
|
-
|
|
6451
|
-
DocumentSymbol.create = create;
|
|
6452
|
-
/**
|
|
6453
|
-
* Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
|
|
6454
|
-
*/
|
|
6455
|
-
|
|
6456
|
-
function is(value) {
|
|
6457
|
-
var candidate = value;
|
|
6458
|
-
return candidate && Is$5.string(candidate.name) && Is$5.number(candidate.kind) && Range.is(candidate.range) && Range.is(candidate.selectionRange) && (candidate.detail === undefined || Is$5.string(candidate.detail)) && (candidate.deprecated === undefined || Is$5.boolean(candidate.deprecated)) && (candidate.children === undefined || Array.isArray(candidate.children)) && (candidate.tags === undefined || Array.isArray(candidate.tags));
|
|
6459
|
-
}
|
|
6460
|
-
|
|
6461
|
-
DocumentSymbol.is = is;
|
|
6462
|
-
})(DocumentSymbol || (DocumentSymbol = {}));
|
|
6463
|
-
/**
|
|
6464
|
-
* A set of predefined code action kinds
|
|
6465
|
-
*/
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
var CodeActionKind;
|
|
6469
|
-
|
|
6470
|
-
(function (CodeActionKind) {
|
|
6471
|
-
/**
|
|
6472
|
-
* Empty kind.
|
|
6473
|
-
*/
|
|
6474
|
-
CodeActionKind.Empty = '';
|
|
6475
|
-
/**
|
|
6476
|
-
* Base kind for quickfix actions: 'quickfix'
|
|
6477
|
-
*/
|
|
6478
|
-
|
|
6479
|
-
CodeActionKind.QuickFix = 'quickfix';
|
|
6480
|
-
/**
|
|
6481
|
-
* Base kind for refactoring actions: 'refactor'
|
|
6482
|
-
*/
|
|
6483
|
-
|
|
6484
|
-
CodeActionKind.Refactor = 'refactor';
|
|
6485
|
-
/**
|
|
6486
|
-
* Base kind for refactoring extraction actions: 'refactor.extract'
|
|
6487
|
-
*
|
|
6488
|
-
* Example extract actions:
|
|
6489
|
-
*
|
|
6490
|
-
* - Extract method
|
|
6491
|
-
* - Extract function
|
|
6492
|
-
* - Extract variable
|
|
6493
|
-
* - Extract interface from class
|
|
6494
|
-
* - ...
|
|
6495
|
-
*/
|
|
6496
|
-
|
|
6497
|
-
CodeActionKind.RefactorExtract = 'refactor.extract';
|
|
6498
|
-
/**
|
|
6499
|
-
* Base kind for refactoring inline actions: 'refactor.inline'
|
|
6500
|
-
*
|
|
6501
|
-
* Example inline actions:
|
|
6502
|
-
*
|
|
6503
|
-
* - Inline function
|
|
6504
|
-
* - Inline variable
|
|
6505
|
-
* - Inline constant
|
|
6506
|
-
* - ...
|
|
6507
|
-
*/
|
|
6508
|
-
|
|
6509
|
-
CodeActionKind.RefactorInline = 'refactor.inline';
|
|
6510
|
-
/**
|
|
6511
|
-
* Base kind for refactoring rewrite actions: 'refactor.rewrite'
|
|
6512
|
-
*
|
|
6513
|
-
* Example rewrite actions:
|
|
6514
|
-
*
|
|
6515
|
-
* - Convert JavaScript function to class
|
|
6516
|
-
* - Add or remove parameter
|
|
6517
|
-
* - Encapsulate field
|
|
6518
|
-
* - Make method static
|
|
6519
|
-
* - Move method to base class
|
|
6520
|
-
* - ...
|
|
6521
|
-
*/
|
|
6522
|
-
|
|
6523
|
-
CodeActionKind.RefactorRewrite = 'refactor.rewrite';
|
|
6524
|
-
/**
|
|
6525
|
-
* Base kind for source actions: `source`
|
|
6526
|
-
*
|
|
6527
|
-
* Source code actions apply to the entire file.
|
|
6528
|
-
*/
|
|
6529
|
-
|
|
6530
|
-
CodeActionKind.Source = 'source';
|
|
6531
|
-
/**
|
|
6532
|
-
* Base kind for an organize imports source action: `source.organizeImports`
|
|
6533
|
-
*/
|
|
6534
|
-
|
|
6535
|
-
CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
|
|
6536
|
-
/**
|
|
6537
|
-
* Base kind for auto-fix source actions: `source.fixAll`.
|
|
6538
|
-
*
|
|
6539
|
-
* Fix all actions automatically fix errors that have a clear fix that do not require user input.
|
|
6540
|
-
* They should not suppress errors or perform unsafe fixes such as generating new types or classes.
|
|
6541
|
-
*
|
|
6542
|
-
* @since 3.15.0
|
|
6543
|
-
*/
|
|
6544
|
-
|
|
6545
|
-
CodeActionKind.SourceFixAll = 'source.fixAll';
|
|
6546
|
-
})(CodeActionKind || (CodeActionKind = {}));
|
|
6547
|
-
/**
|
|
6548
|
-
* The CodeActionContext namespace provides helper functions to work with
|
|
6549
|
-
* [CodeActionContext](#CodeActionContext) literals.
|
|
6550
|
-
*/
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
var CodeActionContext;
|
|
6554
|
-
|
|
6555
|
-
(function (CodeActionContext) {
|
|
6556
|
-
/**
|
|
6557
|
-
* Creates a new CodeActionContext literal.
|
|
6558
|
-
*/
|
|
6559
|
-
function create(diagnostics, only) {
|
|
6560
|
-
var result = {
|
|
6561
|
-
diagnostics: diagnostics
|
|
6562
|
-
};
|
|
6563
|
-
|
|
6564
|
-
if (only !== undefined && only !== null) {
|
|
6565
|
-
result.only = only;
|
|
6566
|
-
}
|
|
6567
|
-
|
|
6568
|
-
return result;
|
|
6569
|
-
}
|
|
6570
|
-
|
|
6571
|
-
CodeActionContext.create = create;
|
|
6572
|
-
/**
|
|
6573
|
-
* Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
|
|
6574
|
-
*/
|
|
6575
|
-
|
|
6576
|
-
function is(value) {
|
|
6577
|
-
var candidate = value;
|
|
6578
|
-
return Is$5.defined(candidate) && Is$5.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is$5.typedArray(candidate.only, Is$5.string));
|
|
6579
|
-
}
|
|
6580
|
-
|
|
6581
|
-
CodeActionContext.is = is;
|
|
6582
|
-
})(CodeActionContext || (CodeActionContext = {}));
|
|
6583
|
-
|
|
6584
|
-
var CodeAction;
|
|
6585
|
-
|
|
6586
|
-
(function (CodeAction) {
|
|
6587
|
-
function create(title, kindOrCommandOrEdit, kind) {
|
|
6588
|
-
var result = {
|
|
6589
|
-
title: title
|
|
6590
|
-
};
|
|
6591
|
-
var checkKind = true;
|
|
6592
|
-
|
|
6593
|
-
if (typeof kindOrCommandOrEdit === 'string') {
|
|
6594
|
-
checkKind = false;
|
|
6595
|
-
result.kind = kindOrCommandOrEdit;
|
|
6596
|
-
} else if (Command.is(kindOrCommandOrEdit)) {
|
|
6597
|
-
result.command = kindOrCommandOrEdit;
|
|
6598
|
-
} else {
|
|
6599
|
-
result.edit = kindOrCommandOrEdit;
|
|
6600
|
-
}
|
|
6601
|
-
|
|
6602
|
-
if (checkKind && kind !== undefined) {
|
|
6603
|
-
result.kind = kind;
|
|
6604
|
-
}
|
|
6605
|
-
|
|
6606
|
-
return result;
|
|
6607
|
-
}
|
|
6608
|
-
|
|
6609
|
-
CodeAction.create = create;
|
|
6610
|
-
|
|
6611
|
-
function is(value) {
|
|
6612
|
-
var candidate = value;
|
|
6613
|
-
return candidate && Is$5.string(candidate.title) && (candidate.diagnostics === undefined || Is$5.typedArray(candidate.diagnostics, Diagnostic.is)) && (candidate.kind === undefined || Is$5.string(candidate.kind)) && (candidate.edit !== undefined || candidate.command !== undefined) && (candidate.command === undefined || Command.is(candidate.command)) && (candidate.isPreferred === undefined || Is$5.boolean(candidate.isPreferred)) && (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
|
|
6614
|
-
}
|
|
6615
|
-
|
|
6616
|
-
CodeAction.is = is;
|
|
6617
|
-
})(CodeAction || (CodeAction = {}));
|
|
6618
|
-
/**
|
|
6619
|
-
* The CodeLens namespace provides helper functions to work with
|
|
6620
|
-
* [CodeLens](#CodeLens) literals.
|
|
6621
|
-
*/
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
var CodeLens;
|
|
6625
|
-
|
|
6626
|
-
(function (CodeLens) {
|
|
6627
|
-
/**
|
|
6628
|
-
* Creates a new CodeLens literal.
|
|
6629
|
-
*/
|
|
6630
|
-
function create(range, data) {
|
|
6631
|
-
var result = {
|
|
6632
|
-
range: range
|
|
6633
|
-
};
|
|
6634
|
-
|
|
6635
|
-
if (Is$5.defined(data)) {
|
|
6636
|
-
result.data = data;
|
|
6637
|
-
}
|
|
6638
|
-
|
|
6639
|
-
return result;
|
|
6640
|
-
}
|
|
6641
|
-
|
|
6642
|
-
CodeLens.create = create;
|
|
6643
|
-
/**
|
|
6644
|
-
* Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
|
|
6645
|
-
*/
|
|
6646
|
-
|
|
6647
|
-
function is(value) {
|
|
6648
|
-
var candidate = value;
|
|
6649
|
-
return Is$5.defined(candidate) && Range.is(candidate.range) && (Is$5.undefined(candidate.command) || Command.is(candidate.command));
|
|
6650
|
-
}
|
|
6651
|
-
|
|
6652
|
-
CodeLens.is = is;
|
|
6653
|
-
})(CodeLens || (CodeLens = {}));
|
|
6654
|
-
/**
|
|
6655
|
-
* The FormattingOptions namespace provides helper functions to work with
|
|
6656
|
-
* [FormattingOptions](#FormattingOptions) literals.
|
|
6657
|
-
*/
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
var FormattingOptions;
|
|
6661
|
-
|
|
6662
|
-
(function (FormattingOptions) {
|
|
6663
|
-
/**
|
|
6664
|
-
* Creates a new FormattingOptions literal.
|
|
6665
|
-
*/
|
|
6666
|
-
function create(tabSize, insertSpaces) {
|
|
6667
|
-
return {
|
|
6668
|
-
tabSize: tabSize,
|
|
6669
|
-
insertSpaces: insertSpaces
|
|
6670
|
-
};
|
|
6671
|
-
}
|
|
6672
|
-
|
|
6673
|
-
FormattingOptions.create = create;
|
|
6674
|
-
/**
|
|
6675
|
-
* Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
|
|
6676
|
-
*/
|
|
6677
|
-
|
|
6678
|
-
function is(value) {
|
|
6679
|
-
var candidate = value;
|
|
6680
|
-
return Is$5.defined(candidate) && Is$5.uinteger(candidate.tabSize) && Is$5.boolean(candidate.insertSpaces);
|
|
6681
|
-
}
|
|
6682
|
-
|
|
6683
|
-
FormattingOptions.is = is;
|
|
6684
|
-
})(FormattingOptions || (FormattingOptions = {}));
|
|
6685
|
-
/**
|
|
6686
|
-
* The DocumentLink namespace provides helper functions to work with
|
|
6687
|
-
* [DocumentLink](#DocumentLink) literals.
|
|
6688
|
-
*/
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
var DocumentLink;
|
|
6692
|
-
|
|
6693
|
-
(function (DocumentLink) {
|
|
6694
|
-
/**
|
|
6695
|
-
* Creates a new DocumentLink literal.
|
|
6696
|
-
*/
|
|
6697
|
-
function create(range, target, data) {
|
|
6698
|
-
return {
|
|
6699
|
-
range: range,
|
|
6700
|
-
target: target,
|
|
6701
|
-
data: data
|
|
6702
|
-
};
|
|
6703
|
-
}
|
|
6704
|
-
|
|
6705
|
-
DocumentLink.create = create;
|
|
6706
|
-
/**
|
|
6707
|
-
* Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
|
|
6708
|
-
*/
|
|
6709
|
-
|
|
6710
|
-
function is(value) {
|
|
6711
|
-
var candidate = value;
|
|
6712
|
-
return Is$5.defined(candidate) && Range.is(candidate.range) && (Is$5.undefined(candidate.target) || Is$5.string(candidate.target));
|
|
6713
|
-
}
|
|
6714
|
-
|
|
6715
|
-
DocumentLink.is = is;
|
|
6716
|
-
})(DocumentLink || (DocumentLink = {}));
|
|
6717
|
-
/**
|
|
6718
|
-
* The SelectionRange namespace provides helper function to work with
|
|
6719
|
-
* SelectionRange literals.
|
|
6720
|
-
*/
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
var SelectionRange;
|
|
6724
|
-
|
|
6725
|
-
(function (SelectionRange) {
|
|
6726
|
-
/**
|
|
6727
|
-
* Creates a new SelectionRange
|
|
6728
|
-
* @param range the range.
|
|
6729
|
-
* @param parent an optional parent.
|
|
6730
|
-
*/
|
|
6731
|
-
function create(range, parent) {
|
|
6732
|
-
return {
|
|
6733
|
-
range: range,
|
|
6734
|
-
parent: parent
|
|
6735
|
-
};
|
|
6736
|
-
}
|
|
6737
|
-
|
|
6738
|
-
SelectionRange.create = create;
|
|
6739
|
-
|
|
6740
|
-
function is(value) {
|
|
6741
|
-
var candidate = value;
|
|
6742
|
-
return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
|
|
6743
|
-
}
|
|
6744
|
-
|
|
6745
|
-
SelectionRange.is = is;
|
|
6746
|
-
})(SelectionRange || (SelectionRange = {}));
|
|
6747
|
-
|
|
6748
|
-
var EOL = ['\n', '\r\n', '\r'];
|
|
6749
|
-
/**
|
|
6750
|
-
* @deprecated Use the text document from the new vscode-languageserver-textdocument package.
|
|
6751
|
-
*/
|
|
6752
|
-
|
|
6753
|
-
var TextDocument$1;
|
|
6754
|
-
|
|
6755
|
-
(function (TextDocument) {
|
|
6756
|
-
/**
|
|
6757
|
-
* Creates a new ITextDocument literal from the given uri and content.
|
|
6758
|
-
* @param uri The document's uri.
|
|
6759
|
-
* @param languageId The document's language Id.
|
|
6760
|
-
* @param content The document's content.
|
|
6761
|
-
*/
|
|
6762
|
-
function create(uri, languageId, version, content) {
|
|
6763
|
-
return new FullTextDocument$1(uri, languageId, version, content);
|
|
6764
|
-
}
|
|
6765
|
-
|
|
6766
|
-
TextDocument.create = create;
|
|
6767
|
-
/**
|
|
6768
|
-
* Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
|
|
6769
|
-
*/
|
|
6770
|
-
|
|
6771
|
-
function is(value) {
|
|
6772
|
-
var candidate = value;
|
|
6773
|
-
return Is$5.defined(candidate) && Is$5.string(candidate.uri) && (Is$5.undefined(candidate.languageId) || Is$5.string(candidate.languageId)) && Is$5.uinteger(candidate.lineCount) && Is$5.func(candidate.getText) && Is$5.func(candidate.positionAt) && Is$5.func(candidate.offsetAt) ? true : false;
|
|
6774
|
-
}
|
|
6775
|
-
|
|
6776
|
-
TextDocument.is = is;
|
|
6777
|
-
|
|
6778
|
-
function applyEdits(document, edits) {
|
|
6779
|
-
var text = document.getText();
|
|
6780
|
-
var sortedEdits = mergeSort(edits, function (a, b) {
|
|
6781
|
-
var diff = a.range.start.line - b.range.start.line;
|
|
6782
|
-
|
|
6783
|
-
if (diff === 0) {
|
|
6784
|
-
return a.range.start.character - b.range.start.character;
|
|
6785
|
-
}
|
|
6786
|
-
|
|
6787
|
-
return diff;
|
|
6788
|
-
});
|
|
6789
|
-
var lastModifiedOffset = text.length;
|
|
6790
|
-
|
|
6791
|
-
for (var i = sortedEdits.length - 1; i >= 0; i--) {
|
|
6792
|
-
var e = sortedEdits[i];
|
|
6793
|
-
var startOffset = document.offsetAt(e.range.start);
|
|
6794
|
-
var endOffset = document.offsetAt(e.range.end);
|
|
6795
|
-
|
|
6796
|
-
if (endOffset <= lastModifiedOffset) {
|
|
6797
|
-
text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
|
|
6798
|
-
} else {
|
|
6799
|
-
throw new Error('Overlapping edit');
|
|
6800
|
-
}
|
|
6801
|
-
|
|
6802
|
-
lastModifiedOffset = startOffset;
|
|
6803
|
-
}
|
|
6804
|
-
|
|
6805
|
-
return text;
|
|
6806
|
-
}
|
|
6807
|
-
|
|
6808
|
-
TextDocument.applyEdits = applyEdits;
|
|
6809
|
-
|
|
6810
|
-
function mergeSort(data, compare) {
|
|
6811
|
-
if (data.length <= 1) {
|
|
6812
|
-
// sorted
|
|
6813
|
-
return data;
|
|
6814
|
-
}
|
|
6815
|
-
|
|
6816
|
-
var p = data.length / 2 | 0;
|
|
6817
|
-
var left = data.slice(0, p);
|
|
6818
|
-
var right = data.slice(p);
|
|
6819
|
-
mergeSort(left, compare);
|
|
6820
|
-
mergeSort(right, compare);
|
|
6821
|
-
var leftIdx = 0;
|
|
6822
|
-
var rightIdx = 0;
|
|
6823
|
-
var i = 0;
|
|
6824
|
-
|
|
6825
|
-
while (leftIdx < left.length && rightIdx < right.length) {
|
|
6826
|
-
var ret = compare(left[leftIdx], right[rightIdx]);
|
|
6827
|
-
|
|
6828
|
-
if (ret <= 0) {
|
|
6829
|
-
// smaller_equal -> take left to preserve order
|
|
6830
|
-
data[i++] = left[leftIdx++];
|
|
6831
|
-
} else {
|
|
6832
|
-
// greater -> take right
|
|
6833
|
-
data[i++] = right[rightIdx++];
|
|
6834
|
-
}
|
|
6835
|
-
}
|
|
6836
|
-
|
|
6837
|
-
while (leftIdx < left.length) {
|
|
6838
|
-
data[i++] = left[leftIdx++];
|
|
6839
|
-
}
|
|
6840
|
-
|
|
6841
|
-
while (rightIdx < right.length) {
|
|
6842
|
-
data[i++] = right[rightIdx++];
|
|
6843
|
-
}
|
|
6844
|
-
|
|
6845
|
-
return data;
|
|
6846
|
-
}
|
|
6847
|
-
})(TextDocument$1 || (TextDocument$1 = {}));
|
|
6848
|
-
/**
|
|
6849
|
-
* @deprecated Use the text document from the new vscode-languageserver-textdocument package.
|
|
6850
|
-
*/
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
var FullTextDocument$1 =
|
|
6854
|
-
/** @class */
|
|
6855
|
-
function () {
|
|
6856
|
-
function FullTextDocument(uri, languageId, version, content) {
|
|
6857
|
-
this._uri = uri;
|
|
6858
|
-
this._languageId = languageId;
|
|
6859
|
-
this._version = version;
|
|
6860
|
-
this._content = content;
|
|
6861
|
-
this._lineOffsets = undefined;
|
|
6862
|
-
}
|
|
6863
|
-
|
|
6864
|
-
Object.defineProperty(FullTextDocument.prototype, "uri", {
|
|
6865
|
-
get: function () {
|
|
6866
|
-
return this._uri;
|
|
6867
|
-
},
|
|
6868
|
-
enumerable: false,
|
|
6869
|
-
configurable: true
|
|
6870
|
-
});
|
|
6871
|
-
Object.defineProperty(FullTextDocument.prototype, "languageId", {
|
|
6872
|
-
get: function () {
|
|
6873
|
-
return this._languageId;
|
|
6874
|
-
},
|
|
6875
|
-
enumerable: false,
|
|
6876
|
-
configurable: true
|
|
6877
|
-
});
|
|
6878
|
-
Object.defineProperty(FullTextDocument.prototype, "version", {
|
|
6879
|
-
get: function () {
|
|
6880
|
-
return this._version;
|
|
6881
|
-
},
|
|
6882
|
-
enumerable: false,
|
|
6883
|
-
configurable: true
|
|
6884
|
-
});
|
|
6885
|
-
|
|
6886
|
-
FullTextDocument.prototype.getText = function (range) {
|
|
6887
|
-
if (range) {
|
|
6888
|
-
var start = this.offsetAt(range.start);
|
|
6889
|
-
var end = this.offsetAt(range.end);
|
|
6890
|
-
return this._content.substring(start, end);
|
|
6891
|
-
}
|
|
6892
|
-
|
|
6893
|
-
return this._content;
|
|
6894
|
-
};
|
|
6895
|
-
|
|
6896
|
-
FullTextDocument.prototype.update = function (event, version) {
|
|
6897
|
-
this._content = event.text;
|
|
6898
|
-
this._version = version;
|
|
6899
|
-
this._lineOffsets = undefined;
|
|
6900
|
-
};
|
|
6901
|
-
|
|
6902
|
-
FullTextDocument.prototype.getLineOffsets = function () {
|
|
6903
|
-
if (this._lineOffsets === undefined) {
|
|
6904
|
-
var lineOffsets = [];
|
|
6905
|
-
var text = this._content;
|
|
6906
|
-
var isLineStart = true;
|
|
6907
|
-
|
|
6908
|
-
for (var i = 0; i < text.length; i++) {
|
|
6909
|
-
if (isLineStart) {
|
|
6910
|
-
lineOffsets.push(i);
|
|
6911
|
-
isLineStart = false;
|
|
6912
|
-
}
|
|
6913
|
-
|
|
6914
|
-
var ch = text.charAt(i);
|
|
6915
|
-
isLineStart = ch === '\r' || ch === '\n';
|
|
6916
|
-
|
|
6917
|
-
if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
|
|
6918
|
-
i++;
|
|
6919
|
-
}
|
|
6920
|
-
}
|
|
6921
|
-
|
|
6922
|
-
if (isLineStart && text.length > 0) {
|
|
6923
|
-
lineOffsets.push(text.length);
|
|
6924
|
-
}
|
|
6925
|
-
|
|
6926
|
-
this._lineOffsets = lineOffsets;
|
|
6927
|
-
}
|
|
6928
|
-
|
|
6929
|
-
return this._lineOffsets;
|
|
6930
|
-
};
|
|
6931
|
-
|
|
6932
|
-
FullTextDocument.prototype.positionAt = function (offset) {
|
|
6933
|
-
offset = Math.max(Math.min(offset, this._content.length), 0);
|
|
6934
|
-
var lineOffsets = this.getLineOffsets();
|
|
6935
|
-
var low = 0,
|
|
6936
|
-
high = lineOffsets.length;
|
|
6937
|
-
|
|
6938
|
-
if (high === 0) {
|
|
6939
|
-
return Position.create(0, offset);
|
|
6940
|
-
}
|
|
6941
|
-
|
|
6942
|
-
while (low < high) {
|
|
6943
|
-
var mid = Math.floor((low + high) / 2);
|
|
6944
|
-
|
|
6945
|
-
if (lineOffsets[mid] > offset) {
|
|
6946
|
-
high = mid;
|
|
6947
|
-
} else {
|
|
6948
|
-
low = mid + 1;
|
|
6949
|
-
}
|
|
6950
|
-
} // low is the least x for which the line offset is larger than the current offset
|
|
6951
|
-
// or array.length if no line offset is larger than the current offset
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
var line = low - 1;
|
|
6955
|
-
return Position.create(line, offset - lineOffsets[line]);
|
|
6956
|
-
};
|
|
6957
|
-
|
|
6958
|
-
FullTextDocument.prototype.offsetAt = function (position) {
|
|
6959
|
-
var lineOffsets = this.getLineOffsets();
|
|
6960
|
-
|
|
6961
|
-
if (position.line >= lineOffsets.length) {
|
|
6962
|
-
return this._content.length;
|
|
6963
|
-
} else if (position.line < 0) {
|
|
6964
|
-
return 0;
|
|
6965
|
-
}
|
|
6966
|
-
|
|
6967
|
-
var lineOffset = lineOffsets[position.line];
|
|
6968
|
-
var nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : this._content.length;
|
|
6969
|
-
return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
|
|
6970
|
-
};
|
|
6971
|
-
|
|
6972
|
-
Object.defineProperty(FullTextDocument.prototype, "lineCount", {
|
|
6973
|
-
get: function () {
|
|
6974
|
-
return this.getLineOffsets().length;
|
|
6975
|
-
},
|
|
6976
|
-
enumerable: false,
|
|
6977
|
-
configurable: true
|
|
6978
|
-
});
|
|
6979
|
-
return FullTextDocument;
|
|
6980
|
-
}();
|
|
6981
|
-
|
|
6982
|
-
var Is$5;
|
|
6983
|
-
|
|
6984
|
-
(function (Is) {
|
|
6985
|
-
var toString = Object.prototype.toString;
|
|
6986
|
-
|
|
6987
|
-
function defined(value) {
|
|
6988
|
-
return typeof value !== 'undefined';
|
|
6989
|
-
}
|
|
6990
|
-
|
|
6991
|
-
Is.defined = defined;
|
|
6992
|
-
|
|
6993
|
-
function undefined$1(value) {
|
|
6994
|
-
return typeof value === 'undefined';
|
|
6995
|
-
}
|
|
6996
|
-
|
|
6997
|
-
Is.undefined = undefined$1;
|
|
6998
|
-
|
|
6999
|
-
function boolean(value) {
|
|
7000
|
-
return value === true || value === false;
|
|
7001
|
-
}
|
|
7002
|
-
|
|
7003
|
-
Is.boolean = boolean;
|
|
7004
|
-
|
|
7005
|
-
function string(value) {
|
|
7006
|
-
return toString.call(value) === '[object String]';
|
|
7007
|
-
}
|
|
7008
|
-
|
|
7009
|
-
Is.string = string;
|
|
7010
|
-
|
|
7011
|
-
function number(value) {
|
|
7012
|
-
return toString.call(value) === '[object Number]';
|
|
7013
|
-
}
|
|
7014
|
-
|
|
7015
|
-
Is.number = number;
|
|
7016
|
-
|
|
7017
|
-
function numberRange(value, min, max) {
|
|
7018
|
-
return toString.call(value) === '[object Number]' && min <= value && value <= max;
|
|
7019
|
-
}
|
|
7020
|
-
|
|
7021
|
-
Is.numberRange = numberRange;
|
|
7022
|
-
|
|
7023
|
-
function integer(value) {
|
|
7024
|
-
return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;
|
|
7025
|
-
}
|
|
7026
|
-
|
|
7027
|
-
Is.integer = integer;
|
|
7028
|
-
|
|
7029
|
-
function uinteger(value) {
|
|
7030
|
-
return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;
|
|
7031
|
-
}
|
|
7032
|
-
|
|
7033
|
-
Is.uinteger = uinteger;
|
|
7034
|
-
|
|
7035
|
-
function func(value) {
|
|
7036
|
-
return toString.call(value) === '[object Function]';
|
|
7037
|
-
}
|
|
7038
|
-
|
|
7039
|
-
Is.func = func;
|
|
7040
|
-
|
|
7041
|
-
function objectLiteral(value) {
|
|
7042
|
-
// Strictly speaking class instances pass this check as well. Since the LSP
|
|
7043
|
-
// doesn't use classes we ignore this for now. If we do we need to add something
|
|
7044
|
-
// like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
|
|
7045
|
-
return value !== null && typeof value === 'object';
|
|
7046
|
-
}
|
|
7047
|
-
|
|
7048
|
-
Is.objectLiteral = objectLiteral;
|
|
7049
|
-
|
|
7050
|
-
function typedArray(value, check) {
|
|
7051
|
-
return Array.isArray(value) && value.every(check);
|
|
7052
|
-
}
|
|
7053
|
-
|
|
7054
|
-
Is.typedArray = typedArray;
|
|
7055
|
-
})(Is$5 || (Is$5 = {}));
|
|
7056
|
-
|
|
7057
|
-
var main$1 = /*#__PURE__*/Object.freeze({
|
|
7058
|
-
__proto__: null,
|
|
7059
|
-
get integer () { return integer; },
|
|
7060
|
-
get uinteger () { return uinteger; },
|
|
7061
|
-
get Position () { return Position; },
|
|
7062
|
-
get Range () { return Range; },
|
|
7063
|
-
get Location () { return Location; },
|
|
7064
|
-
get LocationLink () { return LocationLink; },
|
|
7065
|
-
get Color () { return Color; },
|
|
7066
|
-
get ColorInformation () { return ColorInformation; },
|
|
7067
|
-
get ColorPresentation () { return ColorPresentation; },
|
|
7068
|
-
get FoldingRangeKind () { return FoldingRangeKind; },
|
|
7069
|
-
get FoldingRange () { return FoldingRange; },
|
|
7070
|
-
get DiagnosticRelatedInformation () { return DiagnosticRelatedInformation; },
|
|
7071
|
-
get DiagnosticSeverity () { return DiagnosticSeverity; },
|
|
7072
|
-
get DiagnosticTag () { return DiagnosticTag; },
|
|
7073
|
-
get CodeDescription () { return CodeDescription; },
|
|
7074
|
-
get Diagnostic () { return Diagnostic; },
|
|
7075
|
-
get Command () { return Command; },
|
|
7076
|
-
get TextEdit () { return TextEdit; },
|
|
7077
|
-
get ChangeAnnotation () { return ChangeAnnotation; },
|
|
7078
|
-
get ChangeAnnotationIdentifier () { return ChangeAnnotationIdentifier; },
|
|
7079
|
-
get AnnotatedTextEdit () { return AnnotatedTextEdit; },
|
|
7080
|
-
get TextDocumentEdit () { return TextDocumentEdit; },
|
|
7081
|
-
get CreateFile () { return CreateFile; },
|
|
7082
|
-
get RenameFile () { return RenameFile; },
|
|
7083
|
-
get DeleteFile () { return DeleteFile; },
|
|
7084
|
-
get WorkspaceEdit () { return WorkspaceEdit; },
|
|
7085
|
-
WorkspaceChange: WorkspaceChange,
|
|
7086
|
-
get TextDocumentIdentifier () { return TextDocumentIdentifier; },
|
|
7087
|
-
get VersionedTextDocumentIdentifier () { return VersionedTextDocumentIdentifier; },
|
|
7088
|
-
get OptionalVersionedTextDocumentIdentifier () { return OptionalVersionedTextDocumentIdentifier; },
|
|
7089
|
-
get TextDocumentItem () { return TextDocumentItem; },
|
|
7090
|
-
get MarkupKind () { return MarkupKind; },
|
|
7091
|
-
get MarkupContent () { return MarkupContent; },
|
|
7092
|
-
get CompletionItemKind () { return CompletionItemKind; },
|
|
7093
|
-
get InsertTextFormat () { return InsertTextFormat; },
|
|
7094
|
-
get CompletionItemTag () { return CompletionItemTag; },
|
|
7095
|
-
get InsertReplaceEdit () { return InsertReplaceEdit; },
|
|
7096
|
-
get InsertTextMode () { return InsertTextMode; },
|
|
7097
|
-
get CompletionItem () { return CompletionItem; },
|
|
7098
|
-
get CompletionList () { return CompletionList; },
|
|
7099
|
-
get MarkedString () { return MarkedString; },
|
|
7100
|
-
get Hover () { return Hover; },
|
|
7101
|
-
get ParameterInformation () { return ParameterInformation; },
|
|
7102
|
-
get SignatureInformation () { return SignatureInformation; },
|
|
7103
|
-
get DocumentHighlightKind () { return DocumentHighlightKind; },
|
|
7104
|
-
get DocumentHighlight () { return DocumentHighlight; },
|
|
7105
|
-
get SymbolKind () { return SymbolKind; },
|
|
7106
|
-
get SymbolTag () { return SymbolTag; },
|
|
7107
|
-
get SymbolInformation () { return SymbolInformation; },
|
|
7108
|
-
get DocumentSymbol () { return DocumentSymbol; },
|
|
7109
|
-
get CodeActionKind () { return CodeActionKind; },
|
|
7110
|
-
get CodeActionContext () { return CodeActionContext; },
|
|
7111
|
-
get CodeAction () { return CodeAction; },
|
|
7112
|
-
get CodeLens () { return CodeLens; },
|
|
7113
|
-
get FormattingOptions () { return FormattingOptions; },
|
|
7114
|
-
get DocumentLink () { return DocumentLink; },
|
|
7115
|
-
get SelectionRange () { return SelectionRange; },
|
|
7116
|
-
EOL: EOL,
|
|
7117
|
-
get TextDocument () { return TextDocument$1; }
|
|
7118
|
-
});
|
|
7119
|
-
|
|
7120
|
-
var require$$1$2 = /*@__PURE__*/getAugmentedNamespace(main$1);
|
|
7121
|
-
|
|
7122
|
-
var messages = {};
|
|
7123
|
-
|
|
7124
|
-
/* --------------------------------------------------------------------------------------------
|
|
7125
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7126
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7127
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7128
|
-
Object.defineProperty(messages, "__esModule", { value: true });
|
|
7129
|
-
messages.ProtocolNotificationType = messages.ProtocolNotificationType0 = messages.ProtocolRequestType = messages.ProtocolRequestType0 = messages.RegistrationType = void 0;
|
|
7130
|
-
const vscode_jsonrpc_1$1 = main$2;
|
|
7131
|
-
class RegistrationType {
|
|
7132
|
-
constructor(method) {
|
|
7133
|
-
this.method = method;
|
|
7134
|
-
}
|
|
7135
|
-
}
|
|
7136
|
-
messages.RegistrationType = RegistrationType;
|
|
7137
|
-
class ProtocolRequestType0 extends vscode_jsonrpc_1$1.RequestType0 {
|
|
7138
|
-
constructor(method) {
|
|
7139
|
-
super(method);
|
|
7140
|
-
}
|
|
7141
|
-
}
|
|
7142
|
-
messages.ProtocolRequestType0 = ProtocolRequestType0;
|
|
7143
|
-
class ProtocolRequestType extends vscode_jsonrpc_1$1.RequestType {
|
|
7144
|
-
constructor(method) {
|
|
7145
|
-
super(method, vscode_jsonrpc_1$1.ParameterStructures.byName);
|
|
7146
|
-
}
|
|
7147
|
-
}
|
|
7148
|
-
messages.ProtocolRequestType = ProtocolRequestType;
|
|
7149
|
-
class ProtocolNotificationType0 extends vscode_jsonrpc_1$1.NotificationType0 {
|
|
7150
|
-
constructor(method) {
|
|
7151
|
-
super(method);
|
|
7152
|
-
}
|
|
7153
|
-
}
|
|
7154
|
-
messages.ProtocolNotificationType0 = ProtocolNotificationType0;
|
|
7155
|
-
class ProtocolNotificationType extends vscode_jsonrpc_1$1.NotificationType {
|
|
7156
|
-
constructor(method) {
|
|
7157
|
-
super(method, vscode_jsonrpc_1$1.ParameterStructures.byName);
|
|
7158
|
-
}
|
|
7159
|
-
}
|
|
7160
|
-
messages.ProtocolNotificationType = ProtocolNotificationType;
|
|
7161
|
-
|
|
7162
|
-
var protocol = {};
|
|
7163
|
-
|
|
7164
|
-
var is$1 = {};
|
|
7165
|
-
|
|
7166
|
-
/* --------------------------------------------------------------------------------------------
|
|
7167
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7168
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7169
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7170
|
-
Object.defineProperty(is$1, "__esModule", { value: true });
|
|
7171
|
-
is$1.objectLiteral = is$1.typedArray = is$1.stringArray = is$1.array = is$1.func = is$1.error = is$1.number = is$1.string = is$1.boolean = void 0;
|
|
7172
|
-
function boolean$1(value) {
|
|
7173
|
-
return value === true || value === false;
|
|
7174
|
-
}
|
|
7175
|
-
is$1.boolean = boolean$1;
|
|
7176
|
-
function string$1(value) {
|
|
7177
|
-
return typeof value === 'string' || value instanceof String;
|
|
7178
|
-
}
|
|
7179
|
-
is$1.string = string$1;
|
|
7180
|
-
function number$1(value) {
|
|
7181
|
-
return typeof value === 'number' || value instanceof Number;
|
|
7182
|
-
}
|
|
7183
|
-
is$1.number = number$1;
|
|
7184
|
-
function error$1(value) {
|
|
7185
|
-
return value instanceof Error;
|
|
7186
|
-
}
|
|
7187
|
-
is$1.error = error$1;
|
|
7188
|
-
function func$1(value) {
|
|
7189
|
-
return typeof value === 'function';
|
|
7190
|
-
}
|
|
7191
|
-
is$1.func = func$1;
|
|
7192
|
-
function array$1(value) {
|
|
7193
|
-
return Array.isArray(value);
|
|
7194
|
-
}
|
|
7195
|
-
is$1.array = array$1;
|
|
7196
|
-
function stringArray$1(value) {
|
|
7197
|
-
return array$1(value) && value.every(elem => string$1(elem));
|
|
7198
|
-
}
|
|
7199
|
-
is$1.stringArray = stringArray$1;
|
|
7200
|
-
function typedArray$1(value, check) {
|
|
7201
|
-
return Array.isArray(value) && value.every(check);
|
|
7202
|
-
}
|
|
7203
|
-
is$1.typedArray = typedArray$1;
|
|
7204
|
-
function objectLiteral(value) {
|
|
7205
|
-
// Strictly speaking class instances pass this check as well. Since the LSP
|
|
7206
|
-
// doesn't use classes we ignore this for now. If we do we need to add something
|
|
7207
|
-
// like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
|
|
7208
|
-
return value !== null && typeof value === 'object';
|
|
7209
|
-
}
|
|
7210
|
-
is$1.objectLiteral = objectLiteral;
|
|
7211
|
-
|
|
7212
|
-
var protocol_implementation = {};
|
|
7213
|
-
|
|
7214
|
-
(function (exports) {
|
|
7215
|
-
/* --------------------------------------------------------------------------------------------
|
|
7216
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7217
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7218
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7219
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7220
|
-
exports.ImplementationRequest = void 0;
|
|
7221
|
-
const messages_1 = messages;
|
|
7222
|
-
(function (ImplementationRequest) {
|
|
7223
|
-
ImplementationRequest.method = 'textDocument/implementation';
|
|
7224
|
-
ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
|
|
7225
|
-
})(exports.ImplementationRequest || (exports.ImplementationRequest = {}));
|
|
7226
|
-
|
|
7227
|
-
}(protocol_implementation));
|
|
7228
|
-
|
|
7229
|
-
var protocol_typeDefinition = {};
|
|
7230
|
-
|
|
7231
|
-
(function (exports) {
|
|
7232
|
-
/* --------------------------------------------------------------------------------------------
|
|
7233
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7234
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7235
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7236
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7237
|
-
exports.TypeDefinitionRequest = void 0;
|
|
7238
|
-
const messages_1 = messages;
|
|
7239
|
-
(function (TypeDefinitionRequest) {
|
|
7240
|
-
TypeDefinitionRequest.method = 'textDocument/typeDefinition';
|
|
7241
|
-
TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
|
|
7242
|
-
})(exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
|
|
7243
|
-
|
|
7244
|
-
}(protocol_typeDefinition));
|
|
7245
|
-
|
|
7246
|
-
var protocol_workspaceFolders = {};
|
|
7247
|
-
|
|
7248
|
-
(function (exports) {
|
|
7249
|
-
/* --------------------------------------------------------------------------------------------
|
|
7250
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7251
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7252
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7253
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7254
|
-
exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = void 0;
|
|
7255
|
-
const messages_1 = messages;
|
|
7256
|
-
(function (WorkspaceFoldersRequest) {
|
|
7257
|
-
WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');
|
|
7258
|
-
})(exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
|
|
7259
|
-
(function (DidChangeWorkspaceFoldersNotification) {
|
|
7260
|
-
DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
|
|
7261
|
-
})(exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
|
|
7262
|
-
|
|
7263
|
-
}(protocol_workspaceFolders));
|
|
7264
|
-
|
|
7265
|
-
var protocol_configuration = {};
|
|
7266
|
-
|
|
7267
|
-
(function (exports) {
|
|
7268
|
-
/* --------------------------------------------------------------------------------------------
|
|
7269
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7270
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7271
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7272
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7273
|
-
exports.ConfigurationRequest = void 0;
|
|
7274
|
-
const messages_1 = messages;
|
|
7275
|
-
(function (ConfigurationRequest) {
|
|
7276
|
-
ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration');
|
|
7277
|
-
})(exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
|
|
7278
|
-
|
|
7279
|
-
}(protocol_configuration));
|
|
7280
|
-
|
|
7281
|
-
var protocol_colorProvider = {};
|
|
7282
|
-
|
|
7283
|
-
(function (exports) {
|
|
7284
|
-
/* --------------------------------------------------------------------------------------------
|
|
7285
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7286
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7287
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7288
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7289
|
-
exports.ColorPresentationRequest = exports.DocumentColorRequest = void 0;
|
|
7290
|
-
const messages_1 = messages;
|
|
7291
|
-
(function (DocumentColorRequest) {
|
|
7292
|
-
DocumentColorRequest.method = 'textDocument/documentColor';
|
|
7293
|
-
DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
|
|
7294
|
-
})(exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
|
|
7295
|
-
(function (ColorPresentationRequest) {
|
|
7296
|
-
ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation');
|
|
7297
|
-
})(exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
|
|
7298
|
-
|
|
7299
|
-
}(protocol_colorProvider));
|
|
7300
|
-
|
|
7301
|
-
var protocol_foldingRange = {};
|
|
7302
|
-
|
|
7303
|
-
(function (exports) {
|
|
7304
|
-
/*---------------------------------------------------------------------------------------------
|
|
7305
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7306
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7307
|
-
*--------------------------------------------------------------------------------------------*/
|
|
7308
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7309
|
-
exports.FoldingRangeRequest = exports.FoldingRangeKind = void 0;
|
|
7310
|
-
const messages_1 = messages;
|
|
7311
|
-
(function (FoldingRangeKind) {
|
|
7312
|
-
/**
|
|
7313
|
-
* Folding range for a comment
|
|
7314
|
-
*/
|
|
7315
|
-
FoldingRangeKind["Comment"] = "comment";
|
|
7316
|
-
/**
|
|
7317
|
-
* Folding range for a imports or includes
|
|
7318
|
-
*/
|
|
7319
|
-
FoldingRangeKind["Imports"] = "imports";
|
|
7320
|
-
/**
|
|
7321
|
-
* Folding range for a region (e.g. `#region`)
|
|
7322
|
-
*/
|
|
7323
|
-
FoldingRangeKind["Region"] = "region";
|
|
7324
|
-
})(exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
|
|
7325
|
-
(function (FoldingRangeRequest) {
|
|
7326
|
-
FoldingRangeRequest.method = 'textDocument/foldingRange';
|
|
7327
|
-
FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
|
|
7328
|
-
})(exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
|
|
7329
|
-
|
|
7330
|
-
}(protocol_foldingRange));
|
|
7331
|
-
|
|
7332
|
-
var protocol_declaration = {};
|
|
7333
|
-
|
|
7334
|
-
(function (exports) {
|
|
7335
|
-
/* --------------------------------------------------------------------------------------------
|
|
7336
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7337
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7338
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7339
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7340
|
-
exports.DeclarationRequest = void 0;
|
|
7341
|
-
const messages_1 = messages;
|
|
7342
|
-
(function (DeclarationRequest) {
|
|
7343
|
-
DeclarationRequest.method = 'textDocument/declaration';
|
|
7344
|
-
DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
|
|
7345
|
-
})(exports.DeclarationRequest || (exports.DeclarationRequest = {}));
|
|
7346
|
-
|
|
7347
|
-
}(protocol_declaration));
|
|
7348
|
-
|
|
7349
|
-
var protocol_selectionRange = {};
|
|
7350
|
-
|
|
7351
|
-
(function (exports) {
|
|
7352
|
-
/*---------------------------------------------------------------------------------------------
|
|
7353
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7354
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7355
|
-
*--------------------------------------------------------------------------------------------*/
|
|
7356
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7357
|
-
exports.SelectionRangeRequest = void 0;
|
|
7358
|
-
const messages_1 = messages;
|
|
7359
|
-
(function (SelectionRangeRequest) {
|
|
7360
|
-
SelectionRangeRequest.method = 'textDocument/selectionRange';
|
|
7361
|
-
SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
|
|
7362
|
-
})(exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
|
|
7363
|
-
|
|
7364
|
-
}(protocol_selectionRange));
|
|
7365
|
-
|
|
7366
|
-
var protocol_progress = {};
|
|
7367
|
-
|
|
7368
|
-
(function (exports) {
|
|
7369
|
-
/* --------------------------------------------------------------------------------------------
|
|
7370
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7371
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7372
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7373
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7374
|
-
exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = void 0;
|
|
7375
|
-
const vscode_jsonrpc_1 = main$2;
|
|
7376
|
-
const messages_1 = messages;
|
|
7377
|
-
(function (WorkDoneProgress) {
|
|
7378
|
-
WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
|
|
7379
|
-
function is(value) {
|
|
7380
|
-
return value === WorkDoneProgress.type;
|
|
7381
|
-
}
|
|
7382
|
-
WorkDoneProgress.is = is;
|
|
7383
|
-
})(exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
|
|
7384
|
-
(function (WorkDoneProgressCreateRequest) {
|
|
7385
|
-
WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
|
|
7386
|
-
})(exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
|
|
7387
|
-
(function (WorkDoneProgressCancelNotification) {
|
|
7388
|
-
WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
|
|
7389
|
-
})(exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
|
|
7390
|
-
|
|
7391
|
-
}(protocol_progress));
|
|
7392
|
-
|
|
7393
|
-
var protocol_callHierarchy = {};
|
|
7394
|
-
|
|
7395
|
-
(function (exports) {
|
|
7396
|
-
/* --------------------------------------------------------------------------------------------
|
|
7397
|
-
* Copyright (c) TypeFox and others. All rights reserved.
|
|
7398
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7399
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7400
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7401
|
-
exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.CallHierarchyPrepareRequest = void 0;
|
|
7402
|
-
const messages_1 = messages;
|
|
7403
|
-
(function (CallHierarchyPrepareRequest) {
|
|
7404
|
-
CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
|
|
7405
|
-
CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
|
|
7406
|
-
})(exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
|
|
7407
|
-
(function (CallHierarchyIncomingCallsRequest) {
|
|
7408
|
-
CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
|
|
7409
|
-
CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
|
|
7410
|
-
})(exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
|
|
7411
|
-
(function (CallHierarchyOutgoingCallsRequest) {
|
|
7412
|
-
CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
|
|
7413
|
-
CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
|
|
7414
|
-
})(exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
|
|
7415
|
-
|
|
7416
|
-
}(protocol_callHierarchy));
|
|
7417
|
-
|
|
7418
|
-
var protocol_semanticTokens = {};
|
|
7419
|
-
|
|
7420
|
-
(function (exports) {
|
|
7421
|
-
/* --------------------------------------------------------------------------------------------
|
|
7422
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7423
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7424
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7425
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7426
|
-
exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = void 0;
|
|
7427
|
-
const messages_1 = messages;
|
|
7428
|
-
(function (SemanticTokenTypes) {
|
|
7429
|
-
SemanticTokenTypes["namespace"] = "namespace";
|
|
7430
|
-
/**
|
|
7431
|
-
* Represents a generic type. Acts as a fallback for types which can't be mapped to
|
|
7432
|
-
* a specific type like class or enum.
|
|
7433
|
-
*/
|
|
7434
|
-
SemanticTokenTypes["type"] = "type";
|
|
7435
|
-
SemanticTokenTypes["class"] = "class";
|
|
7436
|
-
SemanticTokenTypes["enum"] = "enum";
|
|
7437
|
-
SemanticTokenTypes["interface"] = "interface";
|
|
7438
|
-
SemanticTokenTypes["struct"] = "struct";
|
|
7439
|
-
SemanticTokenTypes["typeParameter"] = "typeParameter";
|
|
7440
|
-
SemanticTokenTypes["parameter"] = "parameter";
|
|
7441
|
-
SemanticTokenTypes["variable"] = "variable";
|
|
7442
|
-
SemanticTokenTypes["property"] = "property";
|
|
7443
|
-
SemanticTokenTypes["enumMember"] = "enumMember";
|
|
7444
|
-
SemanticTokenTypes["event"] = "event";
|
|
7445
|
-
SemanticTokenTypes["function"] = "function";
|
|
7446
|
-
SemanticTokenTypes["method"] = "method";
|
|
7447
|
-
SemanticTokenTypes["macro"] = "macro";
|
|
7448
|
-
SemanticTokenTypes["keyword"] = "keyword";
|
|
7449
|
-
SemanticTokenTypes["modifier"] = "modifier";
|
|
7450
|
-
SemanticTokenTypes["comment"] = "comment";
|
|
7451
|
-
SemanticTokenTypes["string"] = "string";
|
|
7452
|
-
SemanticTokenTypes["number"] = "number";
|
|
7453
|
-
SemanticTokenTypes["regexp"] = "regexp";
|
|
7454
|
-
SemanticTokenTypes["operator"] = "operator";
|
|
7455
|
-
})(exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
|
|
7456
|
-
(function (SemanticTokenModifiers) {
|
|
7457
|
-
SemanticTokenModifiers["declaration"] = "declaration";
|
|
7458
|
-
SemanticTokenModifiers["definition"] = "definition";
|
|
7459
|
-
SemanticTokenModifiers["readonly"] = "readonly";
|
|
7460
|
-
SemanticTokenModifiers["static"] = "static";
|
|
7461
|
-
SemanticTokenModifiers["deprecated"] = "deprecated";
|
|
7462
|
-
SemanticTokenModifiers["abstract"] = "abstract";
|
|
7463
|
-
SemanticTokenModifiers["async"] = "async";
|
|
7464
|
-
SemanticTokenModifiers["modification"] = "modification";
|
|
7465
|
-
SemanticTokenModifiers["documentation"] = "documentation";
|
|
7466
|
-
SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
|
|
7467
|
-
})(exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
|
|
7468
|
-
(function (SemanticTokens) {
|
|
7469
|
-
function is(value) {
|
|
7470
|
-
const candidate = value;
|
|
7471
|
-
return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
|
|
7472
|
-
Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
|
|
7473
|
-
}
|
|
7474
|
-
SemanticTokens.is = is;
|
|
7475
|
-
})(exports.SemanticTokens || (exports.SemanticTokens = {}));
|
|
7476
|
-
(function (TokenFormat) {
|
|
7477
|
-
TokenFormat.Relative = 'relative';
|
|
7478
|
-
})(exports.TokenFormat || (exports.TokenFormat = {}));
|
|
7479
|
-
(function (SemanticTokensRegistrationType) {
|
|
7480
|
-
SemanticTokensRegistrationType.method = 'textDocument/semanticTokens';
|
|
7481
|
-
SemanticTokensRegistrationType.type = new messages_1.RegistrationType(SemanticTokensRegistrationType.method);
|
|
7482
|
-
})(exports.SemanticTokensRegistrationType || (exports.SemanticTokensRegistrationType = {}));
|
|
7483
|
-
(function (SemanticTokensRequest) {
|
|
7484
|
-
SemanticTokensRequest.method = 'textDocument/semanticTokens/full';
|
|
7485
|
-
SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
|
|
7486
|
-
})(exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
|
|
7487
|
-
(function (SemanticTokensDeltaRequest) {
|
|
7488
|
-
SemanticTokensDeltaRequest.method = 'textDocument/semanticTokens/full/delta';
|
|
7489
|
-
SemanticTokensDeltaRequest.type = new messages_1.ProtocolRequestType(SemanticTokensDeltaRequest.method);
|
|
7490
|
-
})(exports.SemanticTokensDeltaRequest || (exports.SemanticTokensDeltaRequest = {}));
|
|
7491
|
-
(function (SemanticTokensRangeRequest) {
|
|
7492
|
-
SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
|
|
7493
|
-
SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
|
|
7494
|
-
})(exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
|
|
7495
|
-
(function (SemanticTokensRefreshRequest) {
|
|
7496
|
-
SemanticTokensRefreshRequest.method = `workspace/semanticTokens/refresh`;
|
|
7497
|
-
SemanticTokensRefreshRequest.type = new messages_1.ProtocolRequestType0(SemanticTokensRefreshRequest.method);
|
|
7498
|
-
})(exports.SemanticTokensRefreshRequest || (exports.SemanticTokensRefreshRequest = {}));
|
|
7499
|
-
|
|
7500
|
-
}(protocol_semanticTokens));
|
|
7501
|
-
|
|
7502
|
-
var protocol_showDocument = {};
|
|
7503
|
-
|
|
7504
|
-
(function (exports) {
|
|
7505
|
-
/* --------------------------------------------------------------------------------------------
|
|
7506
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7507
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7508
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7509
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7510
|
-
exports.ShowDocumentRequest = void 0;
|
|
7511
|
-
const messages_1 = messages;
|
|
7512
|
-
(function (ShowDocumentRequest) {
|
|
7513
|
-
ShowDocumentRequest.method = 'window/showDocument';
|
|
7514
|
-
ShowDocumentRequest.type = new messages_1.ProtocolRequestType(ShowDocumentRequest.method);
|
|
7515
|
-
})(exports.ShowDocumentRequest || (exports.ShowDocumentRequest = {}));
|
|
7516
|
-
|
|
7517
|
-
}(protocol_showDocument));
|
|
7518
|
-
|
|
7519
|
-
var protocol_linkedEditingRange = {};
|
|
7520
|
-
|
|
7521
|
-
(function (exports) {
|
|
7522
|
-
/*---------------------------------------------------------------------------------------------
|
|
7523
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7524
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7525
|
-
*--------------------------------------------------------------------------------------------*/
|
|
7526
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7527
|
-
exports.LinkedEditingRangeRequest = void 0;
|
|
7528
|
-
const messages_1 = messages;
|
|
7529
|
-
(function (LinkedEditingRangeRequest) {
|
|
7530
|
-
LinkedEditingRangeRequest.method = 'textDocument/linkedEditingRange';
|
|
7531
|
-
LinkedEditingRangeRequest.type = new messages_1.ProtocolRequestType(LinkedEditingRangeRequest.method);
|
|
7532
|
-
})(exports.LinkedEditingRangeRequest || (exports.LinkedEditingRangeRequest = {}));
|
|
7533
|
-
|
|
7534
|
-
}(protocol_linkedEditingRange));
|
|
7535
|
-
|
|
7536
|
-
var protocol_fileOperations = {};
|
|
7537
|
-
|
|
7538
|
-
(function (exports) {
|
|
7539
|
-
/* --------------------------------------------------------------------------------------------
|
|
7540
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7541
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7542
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7543
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7544
|
-
exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.DidRenameFilesNotification = exports.WillRenameFilesRequest = exports.DidCreateFilesNotification = exports.WillCreateFilesRequest = exports.FileOperationPatternKind = void 0;
|
|
7545
|
-
const messages_1 = messages;
|
|
7546
|
-
(function (FileOperationPatternKind) {
|
|
7547
|
-
/**
|
|
7548
|
-
* The pattern matches a file only.
|
|
7549
|
-
*/
|
|
7550
|
-
FileOperationPatternKind.file = 'file';
|
|
7551
|
-
/**
|
|
7552
|
-
* The pattern matches a folder only.
|
|
7553
|
-
*/
|
|
7554
|
-
FileOperationPatternKind.folder = 'folder';
|
|
7555
|
-
})(exports.FileOperationPatternKind || (exports.FileOperationPatternKind = {}));
|
|
7556
|
-
(function (WillCreateFilesRequest) {
|
|
7557
|
-
WillCreateFilesRequest.method = 'workspace/willCreateFiles';
|
|
7558
|
-
WillCreateFilesRequest.type = new messages_1.ProtocolRequestType(WillCreateFilesRequest.method);
|
|
7559
|
-
})(exports.WillCreateFilesRequest || (exports.WillCreateFilesRequest = {}));
|
|
7560
|
-
(function (DidCreateFilesNotification) {
|
|
7561
|
-
DidCreateFilesNotification.method = 'workspace/didCreateFiles';
|
|
7562
|
-
DidCreateFilesNotification.type = new messages_1.ProtocolNotificationType(DidCreateFilesNotification.method);
|
|
7563
|
-
})(exports.DidCreateFilesNotification || (exports.DidCreateFilesNotification = {}));
|
|
7564
|
-
(function (WillRenameFilesRequest) {
|
|
7565
|
-
WillRenameFilesRequest.method = 'workspace/willRenameFiles';
|
|
7566
|
-
WillRenameFilesRequest.type = new messages_1.ProtocolRequestType(WillRenameFilesRequest.method);
|
|
7567
|
-
})(exports.WillRenameFilesRequest || (exports.WillRenameFilesRequest = {}));
|
|
7568
|
-
(function (DidRenameFilesNotification) {
|
|
7569
|
-
DidRenameFilesNotification.method = 'workspace/didRenameFiles';
|
|
7570
|
-
DidRenameFilesNotification.type = new messages_1.ProtocolNotificationType(DidRenameFilesNotification.method);
|
|
7571
|
-
})(exports.DidRenameFilesNotification || (exports.DidRenameFilesNotification = {}));
|
|
7572
|
-
(function (DidDeleteFilesNotification) {
|
|
7573
|
-
DidDeleteFilesNotification.method = 'workspace/didDeleteFiles';
|
|
7574
|
-
DidDeleteFilesNotification.type = new messages_1.ProtocolNotificationType(DidDeleteFilesNotification.method);
|
|
7575
|
-
})(exports.DidDeleteFilesNotification || (exports.DidDeleteFilesNotification = {}));
|
|
7576
|
-
(function (WillDeleteFilesRequest) {
|
|
7577
|
-
WillDeleteFilesRequest.method = 'workspace/willDeleteFiles';
|
|
7578
|
-
WillDeleteFilesRequest.type = new messages_1.ProtocolRequestType(WillDeleteFilesRequest.method);
|
|
7579
|
-
})(exports.WillDeleteFilesRequest || (exports.WillDeleteFilesRequest = {}));
|
|
7580
|
-
|
|
7581
|
-
}(protocol_fileOperations));
|
|
7582
|
-
|
|
7583
|
-
var protocol_moniker = {};
|
|
7584
|
-
|
|
7585
|
-
(function (exports) {
|
|
7586
|
-
/* --------------------------------------------------------------------------------------------
|
|
7587
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7588
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7589
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7590
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7591
|
-
exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = void 0;
|
|
7592
|
-
const messages_1 = messages;
|
|
7593
|
-
(function (UniquenessLevel) {
|
|
7594
|
-
/**
|
|
7595
|
-
* The moniker is only unique inside a document
|
|
7596
|
-
*/
|
|
7597
|
-
UniquenessLevel["document"] = "document";
|
|
7598
|
-
/**
|
|
7599
|
-
* The moniker is unique inside a project for which a dump got created
|
|
7600
|
-
*/
|
|
7601
|
-
UniquenessLevel["project"] = "project";
|
|
7602
|
-
/**
|
|
7603
|
-
* The moniker is unique inside the group to which a project belongs
|
|
7604
|
-
*/
|
|
7605
|
-
UniquenessLevel["group"] = "group";
|
|
7606
|
-
/**
|
|
7607
|
-
* The moniker is unique inside the moniker scheme.
|
|
7608
|
-
*/
|
|
7609
|
-
UniquenessLevel["scheme"] = "scheme";
|
|
7610
|
-
/**
|
|
7611
|
-
* The moniker is globally unique
|
|
7612
|
-
*/
|
|
7613
|
-
UniquenessLevel["global"] = "global";
|
|
7614
|
-
})(exports.UniquenessLevel || (exports.UniquenessLevel = {}));
|
|
7615
|
-
(function (MonikerKind) {
|
|
7616
|
-
/**
|
|
7617
|
-
* The moniker represent a symbol that is imported into a project
|
|
7618
|
-
*/
|
|
7619
|
-
MonikerKind["import"] = "import";
|
|
7620
|
-
/**
|
|
7621
|
-
* The moniker represents a symbol that is exported from a project
|
|
7622
|
-
*/
|
|
7623
|
-
MonikerKind["export"] = "export";
|
|
7624
|
-
/**
|
|
7625
|
-
* The moniker represents a symbol that is local to a project (e.g. a local
|
|
7626
|
-
* variable of a function, a class not visible outside the project, ...)
|
|
7627
|
-
*/
|
|
7628
|
-
MonikerKind["local"] = "local";
|
|
7629
|
-
})(exports.MonikerKind || (exports.MonikerKind = {}));
|
|
7630
|
-
(function (MonikerRequest) {
|
|
7631
|
-
MonikerRequest.method = 'textDocument/moniker';
|
|
7632
|
-
MonikerRequest.type = new messages_1.ProtocolRequestType(MonikerRequest.method);
|
|
7633
|
-
})(exports.MonikerRequest || (exports.MonikerRequest = {}));
|
|
7634
|
-
|
|
7635
|
-
}(protocol_moniker));
|
|
7636
|
-
|
|
7637
|
-
(function (exports) {
|
|
7638
|
-
/* --------------------------------------------------------------------------------------------
|
|
7639
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7640
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7641
|
-
* ------------------------------------------------------------------------------------------ */
|
|
7642
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7643
|
-
exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeError = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.DocumentFilter = void 0;
|
|
7644
|
-
exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = void 0;
|
|
7645
|
-
const Is = is$1;
|
|
7646
|
-
const messages_1 = messages;
|
|
7647
|
-
const protocol_implementation_1 = protocol_implementation;
|
|
7648
|
-
Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } });
|
|
7649
|
-
const protocol_typeDefinition_1 = protocol_typeDefinition;
|
|
7650
|
-
Object.defineProperty(exports, "TypeDefinitionRequest", { enumerable: true, get: function () { return protocol_typeDefinition_1.TypeDefinitionRequest; } });
|
|
7651
|
-
const protocol_workspaceFolders_1 = protocol_workspaceFolders;
|
|
7652
|
-
Object.defineProperty(exports, "WorkspaceFoldersRequest", { enumerable: true, get: function () { return protocol_workspaceFolders_1.WorkspaceFoldersRequest; } });
|
|
7653
|
-
Object.defineProperty(exports, "DidChangeWorkspaceFoldersNotification", { enumerable: true, get: function () { return protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification; } });
|
|
7654
|
-
const protocol_configuration_1 = protocol_configuration;
|
|
7655
|
-
Object.defineProperty(exports, "ConfigurationRequest", { enumerable: true, get: function () { return protocol_configuration_1.ConfigurationRequest; } });
|
|
7656
|
-
const protocol_colorProvider_1 = protocol_colorProvider;
|
|
7657
|
-
Object.defineProperty(exports, "DocumentColorRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.DocumentColorRequest; } });
|
|
7658
|
-
Object.defineProperty(exports, "ColorPresentationRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.ColorPresentationRequest; } });
|
|
7659
|
-
const protocol_foldingRange_1 = protocol_foldingRange;
|
|
7660
|
-
Object.defineProperty(exports, "FoldingRangeRequest", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRequest; } });
|
|
7661
|
-
const protocol_declaration_1 = protocol_declaration;
|
|
7662
|
-
Object.defineProperty(exports, "DeclarationRequest", { enumerable: true, get: function () { return protocol_declaration_1.DeclarationRequest; } });
|
|
7663
|
-
const protocol_selectionRange_1 = protocol_selectionRange;
|
|
7664
|
-
Object.defineProperty(exports, "SelectionRangeRequest", { enumerable: true, get: function () { return protocol_selectionRange_1.SelectionRangeRequest; } });
|
|
7665
|
-
const protocol_progress_1 = protocol_progress;
|
|
7666
|
-
Object.defineProperty(exports, "WorkDoneProgress", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgress; } });
|
|
7667
|
-
Object.defineProperty(exports, "WorkDoneProgressCreateRequest", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCreateRequest; } });
|
|
7668
|
-
Object.defineProperty(exports, "WorkDoneProgressCancelNotification", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCancelNotification; } });
|
|
7669
|
-
const protocol_callHierarchy_1 = protocol_callHierarchy;
|
|
7670
|
-
Object.defineProperty(exports, "CallHierarchyIncomingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest; } });
|
|
7671
|
-
Object.defineProperty(exports, "CallHierarchyOutgoingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } });
|
|
7672
|
-
Object.defineProperty(exports, "CallHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } });
|
|
7673
|
-
const protocol_semanticTokens_1 = protocol_semanticTokens;
|
|
7674
|
-
Object.defineProperty(exports, "SemanticTokenTypes", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokenTypes; } });
|
|
7675
|
-
Object.defineProperty(exports, "SemanticTokenModifiers", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokenModifiers; } });
|
|
7676
|
-
Object.defineProperty(exports, "SemanticTokens", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokens; } });
|
|
7677
|
-
Object.defineProperty(exports, "TokenFormat", { enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } });
|
|
7678
|
-
Object.defineProperty(exports, "SemanticTokensRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } });
|
|
7679
|
-
Object.defineProperty(exports, "SemanticTokensDeltaRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } });
|
|
7680
|
-
Object.defineProperty(exports, "SemanticTokensRangeRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRangeRequest; } });
|
|
7681
|
-
Object.defineProperty(exports, "SemanticTokensRefreshRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRefreshRequest; } });
|
|
7682
|
-
Object.defineProperty(exports, "SemanticTokensRegistrationType", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRegistrationType; } });
|
|
7683
|
-
const protocol_showDocument_1 = protocol_showDocument;
|
|
7684
|
-
Object.defineProperty(exports, "ShowDocumentRequest", { enumerable: true, get: function () { return protocol_showDocument_1.ShowDocumentRequest; } });
|
|
7685
|
-
const protocol_linkedEditingRange_1 = protocol_linkedEditingRange;
|
|
7686
|
-
Object.defineProperty(exports, "LinkedEditingRangeRequest", { enumerable: true, get: function () { return protocol_linkedEditingRange_1.LinkedEditingRangeRequest; } });
|
|
7687
|
-
const protocol_fileOperations_1 = protocol_fileOperations;
|
|
7688
|
-
Object.defineProperty(exports, "FileOperationPatternKind", { enumerable: true, get: function () { return protocol_fileOperations_1.FileOperationPatternKind; } });
|
|
7689
|
-
Object.defineProperty(exports, "DidCreateFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidCreateFilesNotification; } });
|
|
7690
|
-
Object.defineProperty(exports, "WillCreateFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillCreateFilesRequest; } });
|
|
7691
|
-
Object.defineProperty(exports, "DidRenameFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidRenameFilesNotification; } });
|
|
7692
|
-
Object.defineProperty(exports, "WillRenameFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillRenameFilesRequest; } });
|
|
7693
|
-
Object.defineProperty(exports, "DidDeleteFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidDeleteFilesNotification; } });
|
|
7694
|
-
Object.defineProperty(exports, "WillDeleteFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillDeleteFilesRequest; } });
|
|
7695
|
-
const protocol_moniker_1 = protocol_moniker;
|
|
7696
|
-
Object.defineProperty(exports, "UniquenessLevel", { enumerable: true, get: function () { return protocol_moniker_1.UniquenessLevel; } });
|
|
7697
|
-
Object.defineProperty(exports, "MonikerKind", { enumerable: true, get: function () { return protocol_moniker_1.MonikerKind; } });
|
|
7698
|
-
Object.defineProperty(exports, "MonikerRequest", { enumerable: true, get: function () { return protocol_moniker_1.MonikerRequest; } });
|
|
7699
|
-
/**
|
|
7700
|
-
* The DocumentFilter namespace provides helper functions to work with
|
|
7701
|
-
* [DocumentFilter](#DocumentFilter) literals.
|
|
7702
|
-
*/
|
|
7703
|
-
var DocumentFilter;
|
|
7704
|
-
(function (DocumentFilter) {
|
|
7705
|
-
function is(value) {
|
|
7706
|
-
const candidate = value;
|
|
7707
|
-
return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
|
|
7708
|
-
}
|
|
7709
|
-
DocumentFilter.is = is;
|
|
7710
|
-
})(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
|
|
7711
|
-
/**
|
|
7712
|
-
* The DocumentSelector namespace provides helper functions to work with
|
|
7713
|
-
* [DocumentSelector](#DocumentSelector)s.
|
|
7714
|
-
*/
|
|
7715
|
-
var DocumentSelector;
|
|
7716
|
-
(function (DocumentSelector) {
|
|
7717
|
-
function is(value) {
|
|
7718
|
-
if (!Array.isArray(value)) {
|
|
7719
|
-
return false;
|
|
7720
|
-
}
|
|
7721
|
-
for (let elem of value) {
|
|
7722
|
-
if (!Is.string(elem) && !DocumentFilter.is(elem)) {
|
|
7723
|
-
return false;
|
|
7724
|
-
}
|
|
7725
|
-
}
|
|
7726
|
-
return true;
|
|
7727
|
-
}
|
|
7728
|
-
DocumentSelector.is = is;
|
|
7729
|
-
})(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
|
|
7730
|
-
(function (RegistrationRequest) {
|
|
7731
|
-
RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
|
|
7732
|
-
})(exports.RegistrationRequest || (exports.RegistrationRequest = {}));
|
|
7733
|
-
(function (UnregistrationRequest) {
|
|
7734
|
-
UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
|
|
7735
|
-
})(exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
|
|
7736
|
-
(function (ResourceOperationKind) {
|
|
7737
|
-
/**
|
|
7738
|
-
* Supports creating new files and folders.
|
|
7739
|
-
*/
|
|
7740
|
-
ResourceOperationKind.Create = 'create';
|
|
7741
|
-
/**
|
|
7742
|
-
* Supports renaming existing files and folders.
|
|
7743
|
-
*/
|
|
7744
|
-
ResourceOperationKind.Rename = 'rename';
|
|
7745
|
-
/**
|
|
7746
|
-
* Supports deleting existing files and folders.
|
|
7747
|
-
*/
|
|
7748
|
-
ResourceOperationKind.Delete = 'delete';
|
|
7749
|
-
})(exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
|
|
7750
|
-
(function (FailureHandlingKind) {
|
|
7751
|
-
/**
|
|
7752
|
-
* Applying the workspace change is simply aborted if one of the changes provided
|
|
7753
|
-
* fails. All operations executed before the failing operation stay executed.
|
|
7754
|
-
*/
|
|
7755
|
-
FailureHandlingKind.Abort = 'abort';
|
|
7756
|
-
/**
|
|
7757
|
-
* All operations are executed transactional. That means they either all
|
|
7758
|
-
* succeed or no changes at all are applied to the workspace.
|
|
7759
|
-
*/
|
|
7760
|
-
FailureHandlingKind.Transactional = 'transactional';
|
|
7761
|
-
/**
|
|
7762
|
-
* If the workspace edit contains only textual file changes they are executed transactional.
|
|
7763
|
-
* If resource changes (create, rename or delete file) are part of the change the failure
|
|
7764
|
-
* handling strategy is abort.
|
|
7765
|
-
*/
|
|
7766
|
-
FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
|
|
7767
|
-
/**
|
|
7768
|
-
* The client tries to undo the operations already executed. But there is no
|
|
7769
|
-
* guarantee that this is succeeding.
|
|
7770
|
-
*/
|
|
7771
|
-
FailureHandlingKind.Undo = 'undo';
|
|
7772
|
-
})(exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
|
|
7773
|
-
(function (StaticRegistrationOptions) {
|
|
7774
|
-
function hasId(value) {
|
|
7775
|
-
const candidate = value;
|
|
7776
|
-
return candidate && Is.string(candidate.id) && candidate.id.length > 0;
|
|
7777
|
-
}
|
|
7778
|
-
StaticRegistrationOptions.hasId = hasId;
|
|
7779
|
-
})(exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
|
|
7780
|
-
(function (TextDocumentRegistrationOptions) {
|
|
7781
|
-
function is(value) {
|
|
7782
|
-
const candidate = value;
|
|
7783
|
-
return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
|
|
7784
|
-
}
|
|
7785
|
-
TextDocumentRegistrationOptions.is = is;
|
|
7786
|
-
})(exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
|
|
7787
|
-
(function (WorkDoneProgressOptions) {
|
|
7788
|
-
function is(value) {
|
|
7789
|
-
const candidate = value;
|
|
7790
|
-
return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
|
|
7791
|
-
}
|
|
7792
|
-
WorkDoneProgressOptions.is = is;
|
|
7793
|
-
function hasWorkDoneProgress(value) {
|
|
7794
|
-
const candidate = value;
|
|
7795
|
-
return candidate && Is.boolean(candidate.workDoneProgress);
|
|
7796
|
-
}
|
|
7797
|
-
WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
|
|
7798
|
-
})(exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
|
|
7799
|
-
(function (InitializeRequest) {
|
|
7800
|
-
InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
|
|
7801
|
-
})(exports.InitializeRequest || (exports.InitializeRequest = {}));
|
|
7802
|
-
(function (InitializeError) {
|
|
7803
|
-
/**
|
|
7804
|
-
* If the protocol version provided by the client can't be handled by the server.
|
|
7805
|
-
* @deprecated This initialize error got replaced by client capabilities. There is
|
|
7806
|
-
* no version handshake in version 3.0x
|
|
7807
|
-
*/
|
|
7808
|
-
InitializeError.unknownProtocolVersion = 1;
|
|
7809
|
-
})(exports.InitializeError || (exports.InitializeError = {}));
|
|
7810
|
-
(function (InitializedNotification) {
|
|
7811
|
-
InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
|
|
7812
|
-
})(exports.InitializedNotification || (exports.InitializedNotification = {}));
|
|
7813
|
-
(function (ShutdownRequest) {
|
|
7814
|
-
ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
|
|
7815
|
-
})(exports.ShutdownRequest || (exports.ShutdownRequest = {}));
|
|
7816
|
-
(function (ExitNotification) {
|
|
7817
|
-
ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
|
|
7818
|
-
})(exports.ExitNotification || (exports.ExitNotification = {}));
|
|
7819
|
-
(function (DidChangeConfigurationNotification) {
|
|
7820
|
-
DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
|
|
7821
|
-
})(exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
|
|
7822
|
-
(function (MessageType) {
|
|
7823
|
-
/**
|
|
7824
|
-
* An error message.
|
|
7825
|
-
*/
|
|
7826
|
-
MessageType.Error = 1;
|
|
7827
|
-
/**
|
|
7828
|
-
* A warning message.
|
|
7829
|
-
*/
|
|
7830
|
-
MessageType.Warning = 2;
|
|
7831
|
-
/**
|
|
7832
|
-
* An information message.
|
|
7833
|
-
*/
|
|
7834
|
-
MessageType.Info = 3;
|
|
7835
|
-
/**
|
|
7836
|
-
* A log message.
|
|
7837
|
-
*/
|
|
7838
|
-
MessageType.Log = 4;
|
|
7839
|
-
})(exports.MessageType || (exports.MessageType = {}));
|
|
7840
|
-
(function (ShowMessageNotification) {
|
|
7841
|
-
ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
|
|
7842
|
-
})(exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
|
|
7843
|
-
(function (ShowMessageRequest) {
|
|
7844
|
-
ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
|
|
7845
|
-
})(exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
|
|
7846
|
-
(function (LogMessageNotification) {
|
|
7847
|
-
LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
|
|
7848
|
-
})(exports.LogMessageNotification || (exports.LogMessageNotification = {}));
|
|
7849
|
-
(function (TelemetryEventNotification) {
|
|
7850
|
-
TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
|
|
7851
|
-
})(exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
|
|
7852
|
-
(function (TextDocumentSyncKind) {
|
|
7853
|
-
/**
|
|
7854
|
-
* Documents should not be synced at all.
|
|
7855
|
-
*/
|
|
7856
|
-
TextDocumentSyncKind.None = 0;
|
|
7857
|
-
/**
|
|
7858
|
-
* Documents are synced by always sending the full content
|
|
7859
|
-
* of the document.
|
|
7860
|
-
*/
|
|
7861
|
-
TextDocumentSyncKind.Full = 1;
|
|
7862
|
-
/**
|
|
7863
|
-
* Documents are synced by sending the full content on open.
|
|
7864
|
-
* After that only incremental updates to the document are
|
|
7865
|
-
* send.
|
|
7866
|
-
*/
|
|
7867
|
-
TextDocumentSyncKind.Incremental = 2;
|
|
7868
|
-
})(exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
|
|
7869
|
-
(function (DidOpenTextDocumentNotification) {
|
|
7870
|
-
DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
|
|
7871
|
-
DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
|
|
7872
|
-
})(exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
|
|
7873
|
-
(function (TextDocumentContentChangeEvent) {
|
|
7874
|
-
/**
|
|
7875
|
-
* Checks whether the information describes a delta event.
|
|
7876
|
-
*/
|
|
7877
|
-
function isIncremental(event) {
|
|
7878
|
-
let candidate = event;
|
|
7879
|
-
return candidate !== undefined && candidate !== null &&
|
|
7880
|
-
typeof candidate.text === 'string' && candidate.range !== undefined &&
|
|
7881
|
-
(candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
|
|
7882
|
-
}
|
|
7883
|
-
TextDocumentContentChangeEvent.isIncremental = isIncremental;
|
|
7884
|
-
/**
|
|
7885
|
-
* Checks whether the information describes a full replacement event.
|
|
7886
|
-
*/
|
|
7887
|
-
function isFull(event) {
|
|
7888
|
-
let candidate = event;
|
|
7889
|
-
return candidate !== undefined && candidate !== null &&
|
|
7890
|
-
typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
|
|
7891
|
-
}
|
|
7892
|
-
TextDocumentContentChangeEvent.isFull = isFull;
|
|
7893
|
-
})(exports.TextDocumentContentChangeEvent || (exports.TextDocumentContentChangeEvent = {}));
|
|
7894
|
-
(function (DidChangeTextDocumentNotification) {
|
|
7895
|
-
DidChangeTextDocumentNotification.method = 'textDocument/didChange';
|
|
7896
|
-
DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
|
|
7897
|
-
})(exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
|
|
7898
|
-
(function (DidCloseTextDocumentNotification) {
|
|
7899
|
-
DidCloseTextDocumentNotification.method = 'textDocument/didClose';
|
|
7900
|
-
DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
|
|
7901
|
-
})(exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
|
|
7902
|
-
(function (DidSaveTextDocumentNotification) {
|
|
7903
|
-
DidSaveTextDocumentNotification.method = 'textDocument/didSave';
|
|
7904
|
-
DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
|
|
7905
|
-
})(exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
|
|
7906
|
-
(function (TextDocumentSaveReason) {
|
|
7907
|
-
/**
|
|
7908
|
-
* Manually triggered, e.g. by the user pressing save, by starting debugging,
|
|
7909
|
-
* or by an API call.
|
|
7910
|
-
*/
|
|
7911
|
-
TextDocumentSaveReason.Manual = 1;
|
|
7912
|
-
/**
|
|
7913
|
-
* Automatic after a delay.
|
|
7914
|
-
*/
|
|
7915
|
-
TextDocumentSaveReason.AfterDelay = 2;
|
|
7916
|
-
/**
|
|
7917
|
-
* When the editor lost focus.
|
|
7918
|
-
*/
|
|
7919
|
-
TextDocumentSaveReason.FocusOut = 3;
|
|
7920
|
-
})(exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
|
|
7921
|
-
(function (WillSaveTextDocumentNotification) {
|
|
7922
|
-
WillSaveTextDocumentNotification.method = 'textDocument/willSave';
|
|
7923
|
-
WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
|
|
7924
|
-
})(exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
|
|
7925
|
-
(function (WillSaveTextDocumentWaitUntilRequest) {
|
|
7926
|
-
WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
|
|
7927
|
-
WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
|
|
7928
|
-
})(exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
|
|
7929
|
-
(function (DidChangeWatchedFilesNotification) {
|
|
7930
|
-
DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
|
|
7931
|
-
})(exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
|
|
7932
|
-
(function (FileChangeType) {
|
|
7933
|
-
/**
|
|
7934
|
-
* The file got created.
|
|
7935
|
-
*/
|
|
7936
|
-
FileChangeType.Created = 1;
|
|
7937
|
-
/**
|
|
7938
|
-
* The file got changed.
|
|
7939
|
-
*/
|
|
7940
|
-
FileChangeType.Changed = 2;
|
|
7941
|
-
/**
|
|
7942
|
-
* The file got deleted.
|
|
7943
|
-
*/
|
|
7944
|
-
FileChangeType.Deleted = 3;
|
|
7945
|
-
})(exports.FileChangeType || (exports.FileChangeType = {}));
|
|
7946
|
-
(function (WatchKind) {
|
|
7947
|
-
/**
|
|
7948
|
-
* Interested in create events.
|
|
7949
|
-
*/
|
|
7950
|
-
WatchKind.Create = 1;
|
|
7951
|
-
/**
|
|
7952
|
-
* Interested in change events
|
|
7953
|
-
*/
|
|
7954
|
-
WatchKind.Change = 2;
|
|
7955
|
-
/**
|
|
7956
|
-
* Interested in delete events
|
|
7957
|
-
*/
|
|
7958
|
-
WatchKind.Delete = 4;
|
|
7959
|
-
})(exports.WatchKind || (exports.WatchKind = {}));
|
|
7960
|
-
(function (PublishDiagnosticsNotification) {
|
|
7961
|
-
PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
|
|
7962
|
-
})(exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
|
|
7963
|
-
(function (CompletionTriggerKind) {
|
|
7964
|
-
/**
|
|
7965
|
-
* Completion was triggered by typing an identifier (24x7 code
|
|
7966
|
-
* complete), manual invocation (e.g Ctrl+Space) or via API.
|
|
7967
|
-
*/
|
|
7968
|
-
CompletionTriggerKind.Invoked = 1;
|
|
7969
|
-
/**
|
|
7970
|
-
* Completion was triggered by a trigger character specified by
|
|
7971
|
-
* the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
|
|
7972
|
-
*/
|
|
7973
|
-
CompletionTriggerKind.TriggerCharacter = 2;
|
|
7974
|
-
/**
|
|
7975
|
-
* Completion was re-triggered as current completion list is incomplete
|
|
7976
|
-
*/
|
|
7977
|
-
CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
|
|
7978
|
-
})(exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
|
|
7979
|
-
(function (CompletionRequest) {
|
|
7980
|
-
CompletionRequest.method = 'textDocument/completion';
|
|
7981
|
-
CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
|
|
7982
|
-
})(exports.CompletionRequest || (exports.CompletionRequest = {}));
|
|
7983
|
-
(function (CompletionResolveRequest) {
|
|
7984
|
-
CompletionResolveRequest.method = 'completionItem/resolve';
|
|
7985
|
-
CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
|
|
7986
|
-
})(exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
|
|
7987
|
-
(function (HoverRequest) {
|
|
7988
|
-
HoverRequest.method = 'textDocument/hover';
|
|
7989
|
-
HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
|
|
7990
|
-
})(exports.HoverRequest || (exports.HoverRequest = {}));
|
|
7991
|
-
(function (SignatureHelpTriggerKind) {
|
|
7992
|
-
/**
|
|
7993
|
-
* Signature help was invoked manually by the user or by a command.
|
|
7994
|
-
*/
|
|
7995
|
-
SignatureHelpTriggerKind.Invoked = 1;
|
|
7996
|
-
/**
|
|
7997
|
-
* Signature help was triggered by a trigger character.
|
|
7998
|
-
*/
|
|
7999
|
-
SignatureHelpTriggerKind.TriggerCharacter = 2;
|
|
8000
|
-
/**
|
|
8001
|
-
* Signature help was triggered by the cursor moving or by the document content changing.
|
|
8002
|
-
*/
|
|
8003
|
-
SignatureHelpTriggerKind.ContentChange = 3;
|
|
8004
|
-
})(exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
|
|
8005
|
-
(function (SignatureHelpRequest) {
|
|
8006
|
-
SignatureHelpRequest.method = 'textDocument/signatureHelp';
|
|
8007
|
-
SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
|
|
8008
|
-
})(exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
|
|
8009
|
-
(function (DefinitionRequest) {
|
|
8010
|
-
DefinitionRequest.method = 'textDocument/definition';
|
|
8011
|
-
DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
|
|
8012
|
-
})(exports.DefinitionRequest || (exports.DefinitionRequest = {}));
|
|
8013
|
-
(function (ReferencesRequest) {
|
|
8014
|
-
ReferencesRequest.method = 'textDocument/references';
|
|
8015
|
-
ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
|
|
8016
|
-
})(exports.ReferencesRequest || (exports.ReferencesRequest = {}));
|
|
8017
|
-
(function (DocumentHighlightRequest) {
|
|
8018
|
-
DocumentHighlightRequest.method = 'textDocument/documentHighlight';
|
|
8019
|
-
DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
|
|
8020
|
-
})(exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
|
|
8021
|
-
(function (DocumentSymbolRequest) {
|
|
8022
|
-
DocumentSymbolRequest.method = 'textDocument/documentSymbol';
|
|
8023
|
-
DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
|
|
8024
|
-
})(exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
|
|
8025
|
-
(function (CodeActionRequest) {
|
|
8026
|
-
CodeActionRequest.method = 'textDocument/codeAction';
|
|
8027
|
-
CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
|
|
8028
|
-
})(exports.CodeActionRequest || (exports.CodeActionRequest = {}));
|
|
8029
|
-
(function (CodeActionResolveRequest) {
|
|
8030
|
-
CodeActionResolveRequest.method = 'codeAction/resolve';
|
|
8031
|
-
CodeActionResolveRequest.type = new messages_1.ProtocolRequestType(CodeActionResolveRequest.method);
|
|
8032
|
-
})(exports.CodeActionResolveRequest || (exports.CodeActionResolveRequest = {}));
|
|
8033
|
-
(function (WorkspaceSymbolRequest) {
|
|
8034
|
-
WorkspaceSymbolRequest.method = 'workspace/symbol';
|
|
8035
|
-
WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
|
|
8036
|
-
})(exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
|
|
8037
|
-
(function (CodeLensRequest) {
|
|
8038
|
-
CodeLensRequest.method = 'textDocument/codeLens';
|
|
8039
|
-
CodeLensRequest.type = new messages_1.ProtocolRequestType(CodeLensRequest.method);
|
|
8040
|
-
})(exports.CodeLensRequest || (exports.CodeLensRequest = {}));
|
|
8041
|
-
(function (CodeLensResolveRequest) {
|
|
8042
|
-
CodeLensResolveRequest.method = 'codeLens/resolve';
|
|
8043
|
-
CodeLensResolveRequest.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest.method);
|
|
8044
|
-
})(exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
|
|
8045
|
-
(function (CodeLensRefreshRequest) {
|
|
8046
|
-
CodeLensRefreshRequest.method = `workspace/codeLens/refresh`;
|
|
8047
|
-
CodeLensRefreshRequest.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest.method);
|
|
8048
|
-
})(exports.CodeLensRefreshRequest || (exports.CodeLensRefreshRequest = {}));
|
|
8049
|
-
(function (DocumentLinkRequest) {
|
|
8050
|
-
DocumentLinkRequest.method = 'textDocument/documentLink';
|
|
8051
|
-
DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
|
|
8052
|
-
})(exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
|
|
8053
|
-
(function (DocumentLinkResolveRequest) {
|
|
8054
|
-
DocumentLinkResolveRequest.method = 'documentLink/resolve';
|
|
8055
|
-
DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType(DocumentLinkResolveRequest.method);
|
|
8056
|
-
})(exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
|
|
8057
|
-
(function (DocumentFormattingRequest) {
|
|
8058
|
-
DocumentFormattingRequest.method = 'textDocument/formatting';
|
|
8059
|
-
DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
|
|
8060
|
-
})(exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
|
|
8061
|
-
(function (DocumentRangeFormattingRequest) {
|
|
8062
|
-
DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
|
|
8063
|
-
DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
|
|
8064
|
-
})(exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
|
|
8065
|
-
(function (DocumentOnTypeFormattingRequest) {
|
|
8066
|
-
DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
|
|
8067
|
-
DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
|
|
8068
|
-
})(exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
|
|
8069
|
-
(function (PrepareSupportDefaultBehavior) {
|
|
8070
|
-
/**
|
|
8071
|
-
* The client's default behavior is to select the identifier
|
|
8072
|
-
* according the to language's syntax rule.
|
|
8073
|
-
*/
|
|
8074
|
-
PrepareSupportDefaultBehavior.Identifier = 1;
|
|
8075
|
-
})(exports.PrepareSupportDefaultBehavior || (exports.PrepareSupportDefaultBehavior = {}));
|
|
8076
|
-
(function (RenameRequest) {
|
|
8077
|
-
RenameRequest.method = 'textDocument/rename';
|
|
8078
|
-
RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
|
|
8079
|
-
})(exports.RenameRequest || (exports.RenameRequest = {}));
|
|
8080
|
-
(function (PrepareRenameRequest) {
|
|
8081
|
-
PrepareRenameRequest.method = 'textDocument/prepareRename';
|
|
8082
|
-
PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
|
|
8083
|
-
})(exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
|
|
8084
|
-
(function (ExecuteCommandRequest) {
|
|
8085
|
-
ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
|
|
8086
|
-
})(exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
|
|
8087
|
-
(function (ApplyWorkspaceEditRequest) {
|
|
8088
|
-
ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
|
|
8089
|
-
})(exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
|
|
8090
|
-
|
|
8091
|
-
}(protocol));
|
|
8092
|
-
|
|
8093
|
-
var connection$1 = {};
|
|
8094
|
-
|
|
8095
|
-
/* --------------------------------------------------------------------------------------------
|
|
8096
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8097
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8098
|
-
* ------------------------------------------------------------------------------------------ */
|
|
8099
|
-
Object.defineProperty(connection$1, "__esModule", { value: true });
|
|
8100
|
-
connection$1.createProtocolConnection = void 0;
|
|
8101
|
-
const vscode_jsonrpc_1 = main$2;
|
|
8102
|
-
function createProtocolConnection(input, output, logger, options) {
|
|
8103
|
-
if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {
|
|
8104
|
-
options = { connectionStrategy: options };
|
|
8105
|
-
}
|
|
8106
|
-
return vscode_jsonrpc_1.createMessageConnection(input, output, logger, options);
|
|
8107
|
-
}
|
|
8108
|
-
connection$1.createProtocolConnection = createProtocolConnection;
|
|
8109
|
-
|
|
8110
|
-
(function (exports) {
|
|
8111
|
-
/* --------------------------------------------------------------------------------------------
|
|
8112
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8113
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8114
|
-
* ------------------------------------------------------------------------------------------ */
|
|
8115
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8116
|
-
if (k2 === undefined) k2 = k;
|
|
8117
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
8118
|
-
}) : (function(o, m, k, k2) {
|
|
8119
|
-
if (k2 === undefined) k2 = k;
|
|
8120
|
-
o[k2] = m[k];
|
|
8121
|
-
}));
|
|
8122
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
8123
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
8124
|
-
};
|
|
8125
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8126
|
-
exports.LSPErrorCodes = exports.createProtocolConnection = void 0;
|
|
8127
|
-
__exportStar(main$2, exports);
|
|
8128
|
-
__exportStar(require$$1$2, exports);
|
|
8129
|
-
__exportStar(messages, exports);
|
|
8130
|
-
__exportStar(protocol, exports);
|
|
8131
|
-
var connection_1 = connection$1;
|
|
8132
|
-
Object.defineProperty(exports, "createProtocolConnection", { enumerable: true, get: function () { return connection_1.createProtocolConnection; } });
|
|
8133
|
-
(function (LSPErrorCodes) {
|
|
8134
|
-
/**
|
|
8135
|
-
* This is the start range of LSP reserved error codes.
|
|
8136
|
-
* It doesn't denote a real error code.
|
|
8137
|
-
*
|
|
8138
|
-
* @since 3.16.0
|
|
8139
|
-
*/
|
|
8140
|
-
LSPErrorCodes.lspReservedErrorRangeStart = -32899;
|
|
8141
|
-
LSPErrorCodes.ContentModified = -32801;
|
|
8142
|
-
LSPErrorCodes.RequestCancelled = -32800;
|
|
8143
|
-
/**
|
|
8144
|
-
* This is the end range of LSP reserved error codes.
|
|
8145
|
-
* It doesn't denote a real error code.
|
|
8146
|
-
*
|
|
8147
|
-
* @since 3.16.0
|
|
8148
|
-
*/
|
|
8149
|
-
LSPErrorCodes.lspReservedErrorRangeEnd = -32800;
|
|
8150
|
-
})(exports.LSPErrorCodes || (exports.LSPErrorCodes = {}));
|
|
8151
|
-
|
|
8152
|
-
}(api));
|
|
8153
|
-
|
|
8154
|
-
(function (exports) {
|
|
8155
|
-
/* --------------------------------------------------------------------------------------------
|
|
8156
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8157
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8158
|
-
* ------------------------------------------------------------------------------------------ */
|
|
8159
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8160
|
-
if (k2 === undefined) k2 = k;
|
|
8161
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
8162
|
-
}) : (function(o, m, k, k2) {
|
|
8163
|
-
if (k2 === undefined) k2 = k;
|
|
8164
|
-
o[k2] = m[k];
|
|
8165
|
-
}));
|
|
8166
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
8167
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
8168
|
-
};
|
|
8169
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8170
|
-
exports.createProtocolConnection = void 0;
|
|
8171
|
-
const node_1 = node;
|
|
8172
|
-
__exportStar(node, exports);
|
|
8173
|
-
__exportStar(api, exports);
|
|
8174
|
-
function createProtocolConnection(input, output, logger, options) {
|
|
8175
|
-
return node_1.createMessageConnection(input, output, logger, options);
|
|
8176
|
-
}
|
|
8177
|
-
exports.createProtocolConnection = createProtocolConnection;
|
|
8178
|
-
|
|
8179
|
-
}(main$3));
|
|
8180
|
-
|
|
8181
|
-
/* --------------------------------------------------------------------------------------------
|
|
8182
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8183
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8184
|
-
* ------------------------------------------------------------------------------------------ */
|
|
8185
|
-
class FullTextDocument {
|
|
8186
|
-
constructor(uri, languageId, version, content) {
|
|
8187
|
-
this._uri = uri;
|
|
8188
|
-
this._languageId = languageId;
|
|
8189
|
-
this._version = version;
|
|
8190
|
-
this._content = content;
|
|
8191
|
-
this._lineOffsets = undefined;
|
|
8192
|
-
}
|
|
8193
|
-
get uri() {
|
|
8194
|
-
return this._uri;
|
|
8195
|
-
}
|
|
8196
|
-
get languageId() {
|
|
8197
|
-
return this._languageId;
|
|
8198
|
-
}
|
|
8199
|
-
get version() {
|
|
8200
|
-
return this._version;
|
|
8201
|
-
}
|
|
8202
|
-
getText(range) {
|
|
8203
|
-
if (range) {
|
|
8204
|
-
const start = this.offsetAt(range.start);
|
|
8205
|
-
const end = this.offsetAt(range.end);
|
|
8206
|
-
return this._content.substring(start, end);
|
|
8207
|
-
}
|
|
8208
|
-
return this._content;
|
|
8209
|
-
}
|
|
8210
|
-
update(changes, version) {
|
|
8211
|
-
for (let change of changes) {
|
|
8212
|
-
if (FullTextDocument.isIncremental(change)) {
|
|
8213
|
-
// makes sure start is before end
|
|
8214
|
-
const range = getWellformedRange(change.range);
|
|
8215
|
-
// update content
|
|
8216
|
-
const startOffset = this.offsetAt(range.start);
|
|
8217
|
-
const endOffset = this.offsetAt(range.end);
|
|
8218
|
-
this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);
|
|
8219
|
-
// update the offsets
|
|
8220
|
-
const startLine = Math.max(range.start.line, 0);
|
|
8221
|
-
const endLine = Math.max(range.end.line, 0);
|
|
8222
|
-
let lineOffsets = this._lineOffsets;
|
|
8223
|
-
const addedLineOffsets = computeLineOffsets(change.text, false, startOffset);
|
|
8224
|
-
if (endLine - startLine === addedLineOffsets.length) {
|
|
8225
|
-
for (let i = 0, len = addedLineOffsets.length; i < len; i++) {
|
|
8226
|
-
lineOffsets[i + startLine + 1] = addedLineOffsets[i];
|
|
8227
|
-
}
|
|
8228
|
-
}
|
|
8229
|
-
else {
|
|
8230
|
-
if (addedLineOffsets.length < 10000) {
|
|
8231
|
-
lineOffsets.splice(startLine + 1, endLine - startLine, ...addedLineOffsets);
|
|
8232
|
-
}
|
|
8233
|
-
else { // avoid too many arguments for splice
|
|
8234
|
-
this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));
|
|
8235
|
-
}
|
|
8236
|
-
}
|
|
8237
|
-
const diff = change.text.length - (endOffset - startOffset);
|
|
8238
|
-
if (diff !== 0) {
|
|
8239
|
-
for (let i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {
|
|
8240
|
-
lineOffsets[i] = lineOffsets[i] + diff;
|
|
8241
|
-
}
|
|
8242
|
-
}
|
|
8243
|
-
}
|
|
8244
|
-
else if (FullTextDocument.isFull(change)) {
|
|
8245
|
-
this._content = change.text;
|
|
8246
|
-
this._lineOffsets = undefined;
|
|
8247
|
-
}
|
|
8248
|
-
else {
|
|
8249
|
-
throw new Error('Unknown change event received');
|
|
8250
|
-
}
|
|
8251
|
-
}
|
|
8252
|
-
this._version = version;
|
|
8253
|
-
}
|
|
8254
|
-
getLineOffsets() {
|
|
8255
|
-
if (this._lineOffsets === undefined) {
|
|
8256
|
-
this._lineOffsets = computeLineOffsets(this._content, true);
|
|
8257
|
-
}
|
|
8258
|
-
return this._lineOffsets;
|
|
8259
|
-
}
|
|
8260
|
-
positionAt(offset) {
|
|
8261
|
-
offset = Math.max(Math.min(offset, this._content.length), 0);
|
|
8262
|
-
let lineOffsets = this.getLineOffsets();
|
|
8263
|
-
let low = 0, high = lineOffsets.length;
|
|
8264
|
-
if (high === 0) {
|
|
8265
|
-
return { line: 0, character: offset };
|
|
8266
|
-
}
|
|
8267
|
-
while (low < high) {
|
|
8268
|
-
let mid = Math.floor((low + high) / 2);
|
|
8269
|
-
if (lineOffsets[mid] > offset) {
|
|
8270
|
-
high = mid;
|
|
8271
|
-
}
|
|
8272
|
-
else {
|
|
8273
|
-
low = mid + 1;
|
|
8274
|
-
}
|
|
8275
|
-
}
|
|
8276
|
-
// low is the least x for which the line offset is larger than the current offset
|
|
8277
|
-
// or array.length if no line offset is larger than the current offset
|
|
8278
|
-
let line = low - 1;
|
|
8279
|
-
return { line, character: offset - lineOffsets[line] };
|
|
8280
|
-
}
|
|
8281
|
-
offsetAt(position) {
|
|
8282
|
-
let lineOffsets = this.getLineOffsets();
|
|
8283
|
-
if (position.line >= lineOffsets.length) {
|
|
8284
|
-
return this._content.length;
|
|
8285
|
-
}
|
|
8286
|
-
else if (position.line < 0) {
|
|
8287
|
-
return 0;
|
|
8288
|
-
}
|
|
8289
|
-
let lineOffset = lineOffsets[position.line];
|
|
8290
|
-
let nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
|
|
8291
|
-
return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
|
|
8292
|
-
}
|
|
8293
|
-
get lineCount() {
|
|
8294
|
-
return this.getLineOffsets().length;
|
|
8295
|
-
}
|
|
8296
|
-
static isIncremental(event) {
|
|
8297
|
-
let candidate = event;
|
|
8298
|
-
return candidate !== undefined && candidate !== null &&
|
|
8299
|
-
typeof candidate.text === 'string' && candidate.range !== undefined &&
|
|
8300
|
-
(candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
|
|
8301
|
-
}
|
|
8302
|
-
static isFull(event) {
|
|
8303
|
-
let candidate = event;
|
|
8304
|
-
return candidate !== undefined && candidate !== null &&
|
|
8305
|
-
typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
|
|
8306
|
-
}
|
|
8307
|
-
}
|
|
8308
|
-
var TextDocument;
|
|
8309
|
-
(function (TextDocument) {
|
|
8310
|
-
/**
|
|
8311
|
-
* Creates a new text document.
|
|
8312
|
-
*
|
|
8313
|
-
* @param uri The document's uri.
|
|
8314
|
-
* @param languageId The document's language Id.
|
|
8315
|
-
* @param version The document's initial version number.
|
|
8316
|
-
* @param content The document's content.
|
|
8317
|
-
*/
|
|
8318
|
-
function create(uri, languageId, version, content) {
|
|
8319
|
-
return new FullTextDocument(uri, languageId, version, content);
|
|
8320
|
-
}
|
|
8321
|
-
TextDocument.create = create;
|
|
8322
|
-
/**
|
|
8323
|
-
* Updates a TextDocument by modifying its content.
|
|
8324
|
-
*
|
|
8325
|
-
* @param document the document to update. Only documents created by TextDocument.create are valid inputs.
|
|
8326
|
-
* @param changes the changes to apply to the document.
|
|
8327
|
-
* @param version the changes version for the document.
|
|
8328
|
-
* @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.
|
|
8329
|
-
*
|
|
8330
|
-
*/
|
|
8331
|
-
function update(document, changes, version) {
|
|
8332
|
-
if (document instanceof FullTextDocument) {
|
|
8333
|
-
document.update(changes, version);
|
|
8334
|
-
return document;
|
|
8335
|
-
}
|
|
8336
|
-
else {
|
|
8337
|
-
throw new Error('TextDocument.update: document must be created by TextDocument.create');
|
|
8338
|
-
}
|
|
8339
|
-
}
|
|
8340
|
-
TextDocument.update = update;
|
|
8341
|
-
function applyEdits(document, edits) {
|
|
8342
|
-
let text = document.getText();
|
|
8343
|
-
let sortedEdits = mergeSort(edits.map(getWellformedEdit), (a, b) => {
|
|
8344
|
-
let diff = a.range.start.line - b.range.start.line;
|
|
8345
|
-
if (diff === 0) {
|
|
8346
|
-
return a.range.start.character - b.range.start.character;
|
|
8347
|
-
}
|
|
8348
|
-
return diff;
|
|
8349
|
-
});
|
|
8350
|
-
let lastModifiedOffset = 0;
|
|
8351
|
-
const spans = [];
|
|
8352
|
-
for (const e of sortedEdits) {
|
|
8353
|
-
let startOffset = document.offsetAt(e.range.start);
|
|
8354
|
-
if (startOffset < lastModifiedOffset) {
|
|
8355
|
-
throw new Error('Overlapping edit');
|
|
8356
|
-
}
|
|
8357
|
-
else if (startOffset > lastModifiedOffset) {
|
|
8358
|
-
spans.push(text.substring(lastModifiedOffset, startOffset));
|
|
8359
|
-
}
|
|
8360
|
-
if (e.newText.length) {
|
|
8361
|
-
spans.push(e.newText);
|
|
8362
|
-
}
|
|
8363
|
-
lastModifiedOffset = document.offsetAt(e.range.end);
|
|
8364
|
-
}
|
|
8365
|
-
spans.push(text.substr(lastModifiedOffset));
|
|
8366
|
-
return spans.join('');
|
|
8367
|
-
}
|
|
8368
|
-
TextDocument.applyEdits = applyEdits;
|
|
8369
|
-
})(TextDocument || (TextDocument = {}));
|
|
8370
|
-
function mergeSort(data, compare) {
|
|
8371
|
-
if (data.length <= 1) {
|
|
8372
|
-
// sorted
|
|
8373
|
-
return data;
|
|
8374
|
-
}
|
|
8375
|
-
const p = (data.length / 2) | 0;
|
|
8376
|
-
const left = data.slice(0, p);
|
|
8377
|
-
const right = data.slice(p);
|
|
8378
|
-
mergeSort(left, compare);
|
|
8379
|
-
mergeSort(right, compare);
|
|
8380
|
-
let leftIdx = 0;
|
|
8381
|
-
let rightIdx = 0;
|
|
8382
|
-
let i = 0;
|
|
8383
|
-
while (leftIdx < left.length && rightIdx < right.length) {
|
|
8384
|
-
let ret = compare(left[leftIdx], right[rightIdx]);
|
|
8385
|
-
if (ret <= 0) {
|
|
8386
|
-
// smaller_equal -> take left to preserve order
|
|
8387
|
-
data[i++] = left[leftIdx++];
|
|
8388
|
-
}
|
|
8389
|
-
else {
|
|
8390
|
-
// greater -> take right
|
|
8391
|
-
data[i++] = right[rightIdx++];
|
|
8392
|
-
}
|
|
8393
|
-
}
|
|
8394
|
-
while (leftIdx < left.length) {
|
|
8395
|
-
data[i++] = left[leftIdx++];
|
|
8396
|
-
}
|
|
8397
|
-
while (rightIdx < right.length) {
|
|
8398
|
-
data[i++] = right[rightIdx++];
|
|
8399
|
-
}
|
|
8400
|
-
return data;
|
|
8401
|
-
}
|
|
8402
|
-
function computeLineOffsets(text, isAtLineStart, textOffset = 0) {
|
|
8403
|
-
const result = isAtLineStart ? [textOffset] : [];
|
|
8404
|
-
for (let i = 0; i < text.length; i++) {
|
|
8405
|
-
let ch = text.charCodeAt(i);
|
|
8406
|
-
if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) {
|
|
8407
|
-
if (ch === 13 /* CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* LineFeed */) {
|
|
8408
|
-
i++;
|
|
8409
|
-
}
|
|
8410
|
-
result.push(textOffset + i + 1);
|
|
8411
|
-
}
|
|
8412
|
-
}
|
|
8413
|
-
return result;
|
|
8414
|
-
}
|
|
8415
|
-
function getWellformedRange(range) {
|
|
8416
|
-
const start = range.start;
|
|
8417
|
-
const end = range.end;
|
|
8418
|
-
if (start.line > end.line || (start.line === end.line && start.character > end.character)) {
|
|
8419
|
-
return { start: end, end: start };
|
|
8420
|
-
}
|
|
8421
|
-
return range;
|
|
8422
|
-
}
|
|
8423
|
-
function getWellformedEdit(textEdit) {
|
|
8424
|
-
const range = getWellformedRange(textEdit.range);
|
|
8425
|
-
if (range !== textEdit.range) {
|
|
8426
|
-
return { newText: textEdit.newText, range };
|
|
8427
|
-
}
|
|
8428
|
-
return textEdit;
|
|
8429
|
-
}
|
|
8430
|
-
|
|
8431
|
-
var main = /*#__PURE__*/Object.freeze({
|
|
8432
|
-
__proto__: null,
|
|
8433
|
-
get TextDocument () { return TextDocument; }
|
|
8434
|
-
});
|
|
8435
|
-
|
|
8436
|
-
var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(main);
|
|
4877
|
+
}(main));
|
|
8437
4878
|
|
|
8438
4879
|
/* --------------------------------------------------------------------------------------------
|
|
8439
4880
|
* Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.
|
|
@@ -8469,15 +4910,15 @@ var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(main);
|
|
|
8469
4910
|
value: true
|
|
8470
4911
|
});
|
|
8471
4912
|
exports.ConfigurationTarget = exports.DocumentIdentifier = exports.ProgressLocation = exports.VsCodeDiagnosticSeverity = exports.SignatureHelpTriggerKind = exports.isDocumentSelector = exports.Services = exports.TextDocument = exports.Emitter = exports.Event = exports.CancellationToken = exports.Disposable = void 0;
|
|
8472
|
-
const vscode_languageserver_protocol_1 =
|
|
8473
|
-
const vscode_languageserver_textdocument_1 = require$$1$
|
|
4913
|
+
const vscode_languageserver_protocol_1 = require$$1$3;
|
|
4914
|
+
const vscode_languageserver_textdocument_1 = require$$1$2;
|
|
8474
4915
|
Object.defineProperty(exports, "TextDocument", {
|
|
8475
4916
|
enumerable: true,
|
|
8476
4917
|
get: function () {
|
|
8477
4918
|
return vscode_languageserver_textdocument_1.TextDocument;
|
|
8478
4919
|
}
|
|
8479
4920
|
});
|
|
8480
|
-
const vscode_jsonrpc_1 = main
|
|
4921
|
+
const vscode_jsonrpc_1 = main;
|
|
8481
4922
|
Object.defineProperty(exports, "Disposable", {
|
|
8482
4923
|
enumerable: true,
|
|
8483
4924
|
get: function () {
|
|
@@ -8503,7 +4944,7 @@ var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(main);
|
|
|
8503
4944
|
}
|
|
8504
4945
|
});
|
|
8505
4946
|
|
|
8506
|
-
__exportStar(
|
|
4947
|
+
__exportStar(require$$3$1, exports);
|
|
8507
4948
|
|
|
8508
4949
|
(function (Services) {
|
|
8509
4950
|
const global = window;
|
|
@@ -8668,8 +5109,8 @@ Object.defineProperty(connection, "__esModule", {
|
|
|
8668
5109
|
value: true
|
|
8669
5110
|
});
|
|
8670
5111
|
connection.createConnection = void 0;
|
|
8671
|
-
const vscode_languageserver_protocol_1$f =
|
|
8672
|
-
const Is$4 =
|
|
5112
|
+
const vscode_languageserver_protocol_1$f = require$$1$3;
|
|
5113
|
+
const Is$4 = require$$1$4;
|
|
8673
5114
|
|
|
8674
5115
|
function createConnection(connection, errorHandler, closeHandler) {
|
|
8675
5116
|
connection.onError(data => {
|
|
@@ -8795,7 +5236,7 @@ const vscode_uri_1 = require$$1;
|
|
|
8795
5236
|
const disposable_1$1 = disposable$1;
|
|
8796
5237
|
const services_1$3 = services$1;
|
|
8797
5238
|
const ServicesModule = services$1;
|
|
8798
|
-
const vscode_languageserver_protocol_1$e =
|
|
5239
|
+
const vscode_languageserver_protocol_1$e = require$$1$3;
|
|
8799
5240
|
|
|
8800
5241
|
function createVSCodeApi(servicesProvider) {
|
|
8801
5242
|
const unsupported = () => {
|
|
@@ -10188,7 +6629,7 @@ Object.defineProperty(configuration, "__esModule", {
|
|
|
10188
6629
|
});
|
|
10189
6630
|
configuration.toJSONObject = configuration.ConfigurationFeature = void 0;
|
|
10190
6631
|
const vscode_1$8 = vscodeCompatibility;
|
|
10191
|
-
const vscode_languageserver_protocol_1$d =
|
|
6632
|
+
const vscode_languageserver_protocol_1$d = require$$1$3;
|
|
10192
6633
|
|
|
10193
6634
|
class ConfigurationFeature {
|
|
10194
6635
|
constructor(_client) {
|
|
@@ -10525,7 +6966,7 @@ Object.defineProperty(codeConverter, "__esModule", {
|
|
|
10525
6966
|
});
|
|
10526
6967
|
codeConverter.createConverter = void 0;
|
|
10527
6968
|
const code$1 = vscodeCompatibility;
|
|
10528
|
-
const proto =
|
|
6969
|
+
const proto = require$$1$3;
|
|
10529
6970
|
const Is$3 = is;
|
|
10530
6971
|
const protocolCompletionItem_1$1 = protocolCompletionItem;
|
|
10531
6972
|
const protocolCodeLens_1$1 = protocolCodeLens;
|
|
@@ -10533,7 +6974,7 @@ const protocolDocumentLink_1$1 = protocolDocumentLink;
|
|
|
10533
6974
|
const protocolCodeAction_1$1 = protocolCodeAction;
|
|
10534
6975
|
const protocolDiagnostic_1$1 = protocolDiagnostic;
|
|
10535
6976
|
const protocolCallHierarchyItem_1$1 = protocolCallHierarchyItem;
|
|
10536
|
-
const vscode_languageserver_protocol_1$c =
|
|
6977
|
+
const vscode_languageserver_protocol_1$c = require$$1$3;
|
|
10537
6978
|
var InsertReplaceRange;
|
|
10538
6979
|
|
|
10539
6980
|
(function (InsertReplaceRange) {
|
|
@@ -11438,7 +7879,7 @@ Object.defineProperty(protocolConverter, "__esModule", {
|
|
|
11438
7879
|
});
|
|
11439
7880
|
protocolConverter.createConverter = void 0;
|
|
11440
7881
|
const code = vscodeCompatibility;
|
|
11441
|
-
const ls =
|
|
7882
|
+
const ls = require$$1$3;
|
|
11442
7883
|
const Is$2 = is;
|
|
11443
7884
|
const protocolCompletionItem_1 = protocolCompletionItem;
|
|
11444
7885
|
const protocolCodeLens_1 = protocolCodeLens;
|
|
@@ -11446,7 +7887,7 @@ const protocolDocumentLink_1 = protocolDocumentLink;
|
|
|
11446
7887
|
const protocolCodeAction_1 = protocolCodeAction;
|
|
11447
7888
|
const protocolDiagnostic_1 = protocolDiagnostic;
|
|
11448
7889
|
const protocolCallHierarchyItem_1 = protocolCallHierarchyItem;
|
|
11449
|
-
const vscode_languageserver_protocol_1$b =
|
|
7890
|
+
const vscode_languageserver_protocol_1$b = require$$1$3;
|
|
11450
7891
|
var CodeBlock;
|
|
11451
7892
|
|
|
11452
7893
|
(function (CodeBlock) {
|
|
@@ -12585,7 +9026,7 @@ Object.defineProperty(async, "__esModule", {
|
|
|
12585
9026
|
value: true
|
|
12586
9027
|
});
|
|
12587
9028
|
async.Delayer = void 0;
|
|
12588
|
-
const vscode_languageserver_protocol_1$a =
|
|
9029
|
+
const vscode_languageserver_protocol_1$a = require$$1$3;
|
|
12589
9030
|
|
|
12590
9031
|
class Delayer {
|
|
12591
9032
|
constructor(defaultDelay) {
|
|
@@ -12756,7 +9197,7 @@ Object.defineProperty(progressPart, "__esModule", {
|
|
|
12756
9197
|
});
|
|
12757
9198
|
progressPart.ProgressPart = void 0;
|
|
12758
9199
|
const vscode_1$7 = vscodeCompatibility;
|
|
12759
|
-
const vscode_languageserver_protocol_1$9 =
|
|
9200
|
+
const vscode_languageserver_protocol_1$9 = require$$1$3;
|
|
12760
9201
|
const Is$1 = is;
|
|
12761
9202
|
|
|
12762
9203
|
class ProgressPart {
|
|
@@ -12870,7 +9311,7 @@ progressPart.ProgressPart = ProgressPart;
|
|
|
12870
9311
|
});
|
|
12871
9312
|
exports.BaseLanguageClient = exports.MessageTransports = exports.TextDocumentFeature = exports.State = exports.RevealOutputChannelOn = exports.CloseAction = exports.ErrorAction = void 0;
|
|
12872
9313
|
const vscode_1 = vscodeCompatibility;
|
|
12873
|
-
const vscode_languageserver_protocol_1 =
|
|
9314
|
+
const vscode_languageserver_protocol_1 = require$$1$3;
|
|
12874
9315
|
const configuration_1 = configuration;
|
|
12875
9316
|
const c2p = codeConverter;
|
|
12876
9317
|
const p2c = protocolConverter;
|
|
@@ -16122,7 +12563,7 @@ Object.defineProperty(typeDefinition, "__esModule", {
|
|
|
16122
12563
|
});
|
|
16123
12564
|
typeDefinition.TypeDefinitionFeature = void 0;
|
|
16124
12565
|
const vscode_1$6 = vscodeCompatibility;
|
|
16125
|
-
const vscode_languageserver_protocol_1$8 =
|
|
12566
|
+
const vscode_languageserver_protocol_1$8 = require$$1$3;
|
|
16126
12567
|
const client_1$6 = client;
|
|
16127
12568
|
|
|
16128
12569
|
function ensure$7(target, key) {
|
|
@@ -16193,7 +12634,7 @@ Object.defineProperty(implementation, "__esModule", {
|
|
|
16193
12634
|
});
|
|
16194
12635
|
implementation.ImplementationFeature = void 0;
|
|
16195
12636
|
const vscode_1$5 = vscodeCompatibility;
|
|
16196
|
-
const vscode_languageserver_protocol_1$7 =
|
|
12637
|
+
const vscode_languageserver_protocol_1$7 = require$$1$3;
|
|
16197
12638
|
const client_1$5 = client;
|
|
16198
12639
|
|
|
16199
12640
|
function ensure$6(target, key) {
|
|
@@ -16263,7 +12704,7 @@ Object.defineProperty(colorProvider, "__esModule", {
|
|
|
16263
12704
|
});
|
|
16264
12705
|
colorProvider.ColorProviderFeature = void 0;
|
|
16265
12706
|
const vscode_1$4 = vscodeCompatibility;
|
|
16266
|
-
const vscode_languageserver_protocol_1$6 =
|
|
12707
|
+
const vscode_languageserver_protocol_1$6 = require$$1$3;
|
|
16267
12708
|
const client_1$4 = client;
|
|
16268
12709
|
|
|
16269
12710
|
function ensure$5(target, key) {
|
|
@@ -16379,7 +12820,7 @@ Object.defineProperty(workspaceFolders, "__esModule", {
|
|
|
16379
12820
|
workspaceFolders.WorkspaceFoldersFeature = workspaceFolders.arrayDiff = void 0;
|
|
16380
12821
|
const UUID = uuid;
|
|
16381
12822
|
const vscode_1$3 = vscodeCompatibility;
|
|
16382
|
-
const vscode_languageserver_protocol_1$5 =
|
|
12823
|
+
const vscode_languageserver_protocol_1$5 = require$$1$3;
|
|
16383
12824
|
|
|
16384
12825
|
function access(target, key) {
|
|
16385
12826
|
if (target === void 0) {
|
|
@@ -16552,7 +12993,7 @@ Object.defineProperty(foldingRange, "__esModule", {
|
|
|
16552
12993
|
});
|
|
16553
12994
|
foldingRange.FoldingRangeFeature = void 0;
|
|
16554
12995
|
const vscode_1$2 = vscodeCompatibility;
|
|
16555
|
-
const vscode_languageserver_protocol_1$4 =
|
|
12996
|
+
const vscode_languageserver_protocol_1$4 = require$$1$3;
|
|
16556
12997
|
const client_1$3 = client;
|
|
16557
12998
|
|
|
16558
12999
|
function ensure$4(target, key) {
|
|
@@ -16653,7 +13094,7 @@ Object.defineProperty(callHierarchy, "__esModule", {
|
|
|
16653
13094
|
});
|
|
16654
13095
|
callHierarchy.CallHierarchyFeature = void 0;
|
|
16655
13096
|
const vscode_1$1 = vscodeCompatibility;
|
|
16656
|
-
const vscode_languageserver_protocol_1$3 =
|
|
13097
|
+
const vscode_languageserver_protocol_1$3 = require$$1$3;
|
|
16657
13098
|
const client_1$2 = client;
|
|
16658
13099
|
|
|
16659
13100
|
function ensure$3(target, key) {
|
|
@@ -16770,7 +13211,7 @@ Object.defineProperty(progress, "__esModule", {
|
|
|
16770
13211
|
value: true
|
|
16771
13212
|
});
|
|
16772
13213
|
progress.ProgressFeature = void 0;
|
|
16773
|
-
const vscode_languageserver_protocol_1$2 =
|
|
13214
|
+
const vscode_languageserver_protocol_1$2 = require$$1$3;
|
|
16774
13215
|
const progressPart_1 = progressPart;
|
|
16775
13216
|
|
|
16776
13217
|
function ensure$2(target, key) {
|
|
@@ -16831,7 +13272,7 @@ Object.defineProperty(semanticTokens, "__esModule", {
|
|
|
16831
13272
|
semanticTokens.SemanticTokensFeature = void 0;
|
|
16832
13273
|
const vscode = vscodeCompatibility;
|
|
16833
13274
|
const client_1$1 = client;
|
|
16834
|
-
const vscode_languageserver_protocol_1$1 =
|
|
13275
|
+
const vscode_languageserver_protocol_1$1 = require$$1$3;
|
|
16835
13276
|
const Is = is;
|
|
16836
13277
|
|
|
16837
13278
|
function ensure$1(target, key) {
|
|
@@ -16986,7 +13427,7 @@ Object.defineProperty(declaration, "__esModule", {
|
|
|
16986
13427
|
});
|
|
16987
13428
|
declaration.DeclarationFeature = void 0;
|
|
16988
13429
|
const vscode_1 = vscodeCompatibility;
|
|
16989
|
-
const vscode_languageserver_protocol_1 =
|
|
13430
|
+
const vscode_languageserver_protocol_1 = require$$1$3;
|
|
16990
13431
|
const client_1 = client;
|
|
16991
13432
|
|
|
16992
13433
|
function ensure(target, key) {
|
|
@@ -18049,7 +14490,7 @@ Object.defineProperty(monacoWorkspace, "__esModule", {
|
|
|
18049
14490
|
});
|
|
18050
14491
|
monacoWorkspace.MonacoWorkspace = void 0;
|
|
18051
14492
|
const services_1 = services$1;
|
|
18052
|
-
const vscode_languageserver_textdocument_1 = require$$1$
|
|
14493
|
+
const vscode_languageserver_textdocument_1 = require$$1$2;
|
|
18053
14494
|
|
|
18054
14495
|
class MonacoWorkspace {
|
|
18055
14496
|
constructor(_monaco, p2m, m2p) {
|
|
@@ -18204,8 +14645,8 @@ var monacoConverter = {};
|
|
|
18204
14645
|
value: true
|
|
18205
14646
|
});
|
|
18206
14647
|
exports.ProtocolToMonacoConverter = exports.MonacoToProtocolConverter = exports.ProtocolCodeAction = exports.ProtocolIMarkerData = exports.ProtocolCompletionItem = exports.ProtocolCodeLens = exports.ProtocolDocumentLink = void 0;
|
|
18207
|
-
const ls =
|
|
18208
|
-
const Is =
|
|
14648
|
+
const ls = require$$1$3;
|
|
14649
|
+
const Is = require$$1$4;
|
|
18209
14650
|
const services_1 = services$1;
|
|
18210
14651
|
var ProtocolDocumentLink;
|
|
18211
14652
|
|
|
@@ -20239,9 +16680,9 @@ function _defineProperty(obj, key, value) {
|
|
|
20239
16680
|
return obj;
|
|
20240
16681
|
}
|
|
20241
16682
|
|
|
20242
|
-
const willShutdownNotificationType = new
|
|
20243
|
-
const saveTextDocumentRequestType = new
|
|
20244
|
-
const getTextDocumentRequestType = new
|
|
16683
|
+
const willShutdownNotificationType = new ProtocolNotificationType('willShutdown');
|
|
16684
|
+
const saveTextDocumentRequestType = new ProtocolRequestType('textDocument/save');
|
|
16685
|
+
const getTextDocumentRequestType = new ProtocolRequestType('textDocument/get');
|
|
20245
16686
|
function updateFile(uri, text, languageClient) {
|
|
20246
16687
|
return languageClient.sendRequest(saveTextDocumentRequestType, {
|
|
20247
16688
|
textDocument: {
|
|
@@ -20673,7 +17114,7 @@ function installCommands(services) {
|
|
|
20673
17114
|
// Other commands needs to be implemented as well?
|
|
20674
17115
|
// (https://github.com/eclipse/eclipse.jdt.ls/issues/376#issuecomment-333923685)
|
|
20675
17116
|
services.commands.registerCommand('java.apply.workspaceEdit', edit => {
|
|
20676
|
-
if (edit.documentChanges != null && edit.documentChanges.some(change =>
|
|
17117
|
+
if (edit.documentChanges != null && edit.documentChanges.some(change => RenameFile.is(change) || CreateFile.is(change))) {
|
|
20677
17118
|
alert('Unimplemented command');
|
|
20678
17119
|
return;
|
|
20679
17120
|
}
|