@abaplint/cli 2.102.45 → 2.102.47
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/build/cli.js +2271 -2166
- package/package.json +5 -5
package/build/cli.js
CHANGED
|
@@ -3401,6 +3401,27 @@ exports.AttributeName = AttributeName;
|
|
|
3401
3401
|
|
|
3402
3402
|
/***/ }),
|
|
3403
3403
|
|
|
3404
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/behavior_definition_name.js":
|
|
3405
|
+
/*!*********************************************************************************************************!*\
|
|
3406
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/behavior_definition_name.js ***!
|
|
3407
|
+
\*********************************************************************************************************/
|
|
3408
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
3409
|
+
|
|
3410
|
+
"use strict";
|
|
3411
|
+
|
|
3412
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3413
|
+
exports.BehaviorDefinitionName = void 0;
|
|
3414
|
+
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
3415
|
+
class BehaviorDefinitionName extends combi_1.Expression {
|
|
3416
|
+
getRunnable() {
|
|
3417
|
+
return (0, combi_1.regex)(/^((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%]+)$/);
|
|
3418
|
+
}
|
|
3419
|
+
}
|
|
3420
|
+
exports.BehaviorDefinitionName = BehaviorDefinitionName;
|
|
3421
|
+
//# sourceMappingURL=behavior_definition_name.js.map
|
|
3422
|
+
|
|
3423
|
+
/***/ }),
|
|
3424
|
+
|
|
3404
3425
|
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/block_name.js":
|
|
3405
3426
|
/*!*******************************************************************************************!*\
|
|
3406
3427
|
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/block_name.js ***!
|
|
@@ -5048,6 +5069,7 @@ __exportStar(__webpack_require__(/*! ./assign_source */ "./node_modules/@abaplin
|
|
|
5048
5069
|
__exportStar(__webpack_require__(/*! ./association_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/association_name.js"), exports);
|
|
5049
5070
|
__exportStar(__webpack_require__(/*! ./attribute_chain */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/attribute_chain.js"), exports);
|
|
5050
5071
|
__exportStar(__webpack_require__(/*! ./attribute_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/attribute_name.js"), exports);
|
|
5072
|
+
__exportStar(__webpack_require__(/*! ./behavior_definition_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/behavior_definition_name.js"), exports);
|
|
5051
5073
|
__exportStar(__webpack_require__(/*! ./block_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/block_name.js"), exports);
|
|
5052
5074
|
__exportStar(__webpack_require__(/*! ./call_transformation_options */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/call_transformation_options.js"), exports);
|
|
5053
5075
|
__exportStar(__webpack_require__(/*! ./call_transformation_parameters */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/call_transformation_parameters.js"), exports);
|
|
@@ -10038,7 +10060,7 @@ class ClassDefinition {
|
|
|
10038
10060
|
const risk = (0, combi_1.seq)("RISK LEVEL", level);
|
|
10039
10061
|
const time = (0, combi_1.altPrio)("LONG", "MEDIUM", "SHORT");
|
|
10040
10062
|
const duration = (0, combi_1.seq)("DURATION", time);
|
|
10041
|
-
const blah = (0, combi_1.per)(expressions_1.ClassGlobal, expressions_1.ClassFinal, "ABSTRACT", (0, combi_1.seq)("INHERITING FROM", expressions_1.SuperClassName), create, "FOR TESTING", risk, "SHARED MEMORY ENABLED", duration, (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("FOR BEHAVIOR OF", expressions_1.
|
|
10063
|
+
const blah = (0, combi_1.per)(expressions_1.ClassGlobal, expressions_1.ClassFinal, "ABSTRACT", (0, combi_1.seq)("INHERITING FROM", expressions_1.SuperClassName), create, "FOR TESTING", risk, "SHARED MEMORY ENABLED", duration, (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("FOR BEHAVIOR OF", expressions_1.BehaviorDefinitionName)), expressions_1.ClassFriends);
|
|
10042
10064
|
const def = (0, combi_1.seq)("DEFINITION", (0, combi_1.optPrio)(blah));
|
|
10043
10065
|
return (0, combi_1.seq)("CLASS", expressions_1.ClassName, def);
|
|
10044
10066
|
}
|
|
@@ -21792,11 +21814,10 @@ class TypeUtils {
|
|
|
21792
21814
|
}
|
|
21793
21815
|
}
|
|
21794
21816
|
else if (source instanceof basic_1.IntegerType) {
|
|
21795
|
-
if (target instanceof basic_1.StringType
|
|
21796
|
-
|| target instanceof basic_1.PackedType) {
|
|
21817
|
+
if (target instanceof basic_1.StringType) {
|
|
21797
21818
|
return false;
|
|
21798
21819
|
}
|
|
21799
|
-
else if (target instanceof basic_1.Integer8Type) {
|
|
21820
|
+
else if (target instanceof basic_1.Integer8Type || target instanceof basic_1.PackedType) {
|
|
21800
21821
|
if (((_h = source.getAbstractTypeData()) === null || _h === void 0 ? void 0 : _h.derivedFromConstant) === true) {
|
|
21801
21822
|
return true;
|
|
21802
21823
|
}
|
|
@@ -25543,9 +25564,15 @@ class Select {
|
|
|
25543
25564
|
const token = node.getFirstToken();
|
|
25544
25565
|
const from = node.findDirectExpression(Expressions.SQLFrom);
|
|
25545
25566
|
const dbSources = from ? new sql_from_1.SQLFrom().runSyntax(from, scope, filename) : [];
|
|
25567
|
+
const fields = this.findFields(node);
|
|
25568
|
+
if (fields.length === 0
|
|
25569
|
+
&& node.findDirectExpression(Expressions.SQLFieldListLoop) === undefined) {
|
|
25570
|
+
throw new Error(`fields missing`);
|
|
25571
|
+
}
|
|
25572
|
+
this.checkFields(fields, dbSources, scope);
|
|
25546
25573
|
for (const inline of node.findAllExpressions(Expressions.InlineData)) {
|
|
25547
25574
|
// todo, for now these are voided
|
|
25548
|
-
new inline_data_1.InlineData().runSyntax(inline, scope, filename,
|
|
25575
|
+
new inline_data_1.InlineData().runSyntax(inline, scope, filename, this.buildType(fields));
|
|
25549
25576
|
}
|
|
25550
25577
|
const fae = node.findDirectExpression(Expressions.SQLForAllEntries);
|
|
25551
25578
|
if (fae) {
|
|
@@ -25589,6 +25616,59 @@ class Select {
|
|
|
25589
25616
|
scope.pop(node.getLastToken().getEnd());
|
|
25590
25617
|
}
|
|
25591
25618
|
}
|
|
25619
|
+
checkFields(fields, dbSources, scope) {
|
|
25620
|
+
if (dbSources.length > 1) {
|
|
25621
|
+
return;
|
|
25622
|
+
}
|
|
25623
|
+
const first = dbSources[0];
|
|
25624
|
+
if (first === undefined) {
|
|
25625
|
+
// then its voided
|
|
25626
|
+
return;
|
|
25627
|
+
}
|
|
25628
|
+
const type = first.parseType(scope.getRegistry());
|
|
25629
|
+
if (type instanceof basic_1.VoidType || type instanceof basic_1.UnknownType) {
|
|
25630
|
+
return;
|
|
25631
|
+
}
|
|
25632
|
+
if (!(type instanceof basic_1.StructureType)) {
|
|
25633
|
+
throw new Error("checkFields, expected structure, " + type.constructor.name);
|
|
25634
|
+
}
|
|
25635
|
+
const isSimple = /^\w+$/;
|
|
25636
|
+
for (const field of fields) {
|
|
25637
|
+
if (field.code === "*") {
|
|
25638
|
+
continue;
|
|
25639
|
+
}
|
|
25640
|
+
if (isSimple.test(field.code) && type.getComponentByName(field.code) === undefined) {
|
|
25641
|
+
throw new Error(`checkFields, field ${field.code} not found`);
|
|
25642
|
+
}
|
|
25643
|
+
}
|
|
25644
|
+
}
|
|
25645
|
+
buildType(_fields) {
|
|
25646
|
+
return new basic_1.VoidType("SELECT_todo");
|
|
25647
|
+
}
|
|
25648
|
+
findFields(node) {
|
|
25649
|
+
var _a;
|
|
25650
|
+
let expr = undefined;
|
|
25651
|
+
const ret = [];
|
|
25652
|
+
expr = node.findDirectExpression(Expressions.SQLFieldList);
|
|
25653
|
+
if (expr === undefined) {
|
|
25654
|
+
expr = node.findDirectExpression(Expressions.SQLFields);
|
|
25655
|
+
}
|
|
25656
|
+
if (expr === undefined) {
|
|
25657
|
+
node.findDirectExpression(Expressions.SQLFieldName);
|
|
25658
|
+
}
|
|
25659
|
+
for (const field of (expr === null || expr === void 0 ? void 0 : expr.findAllExpressions(Expressions.SQLField)) || []) {
|
|
25660
|
+
let code = field.concatTokens().toUpperCase();
|
|
25661
|
+
const as = ((_a = field.findDirectExpression(Expressions.SQLAsName)) === null || _a === void 0 ? void 0 : _a.concatTokens()) || "";
|
|
25662
|
+
if (as !== "") {
|
|
25663
|
+
code = code.replace(" AS " + as, "");
|
|
25664
|
+
}
|
|
25665
|
+
ret.push({ code, as, expression: field });
|
|
25666
|
+
}
|
|
25667
|
+
if (ret.length === 0 && expr) {
|
|
25668
|
+
ret.push({ code: expr.concatTokens(), as: "", expression: expr });
|
|
25669
|
+
}
|
|
25670
|
+
return ret;
|
|
25671
|
+
}
|
|
25592
25672
|
}
|
|
25593
25673
|
exports.Select = Select;
|
|
25594
25674
|
//# sourceMappingURL=select.js.map
|
|
@@ -40020,7 +40100,7 @@ exports.Issue = Issue;
|
|
|
40020
40100
|
|
|
40021
40101
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40022
40102
|
exports.LSPEdit = void 0;
|
|
40023
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
40103
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
40024
40104
|
class LSPEdit {
|
|
40025
40105
|
static mapEdits(edits) {
|
|
40026
40106
|
const workspace = { changes: {} };
|
|
@@ -40095,7 +40175,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
40095
40175
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40096
40176
|
exports.LSPLookup = void 0;
|
|
40097
40177
|
/* eslint-disable max-len */
|
|
40098
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
40178
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
40099
40179
|
const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
40100
40180
|
const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
40101
40181
|
const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
|
|
@@ -40452,7 +40532,7 @@ const nodes_1 = __webpack_require__(/*! ../abap/nodes */ "./node_modules/@abapli
|
|
|
40452
40532
|
const _identifier_1 = __webpack_require__(/*! ../abap/4_file_information/_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
|
|
40453
40533
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
40454
40534
|
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
40455
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
40535
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
40456
40536
|
class LSPUtils {
|
|
40457
40537
|
static getABAPFile(reg, filename) {
|
|
40458
40538
|
const file = reg.getFileByName(filename);
|
|
@@ -40537,7 +40617,7 @@ exports.LSPUtils = LSPUtils;
|
|
|
40537
40617
|
|
|
40538
40618
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40539
40619
|
exports.CodeActions = void 0;
|
|
40540
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
40620
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
40541
40621
|
const diagnostics_1 = __webpack_require__(/*! ./diagnostics */ "./node_modules/@abaplint/core/build/src/lsp/diagnostics.js");
|
|
40542
40622
|
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
40543
40623
|
const _edit_1 = __webpack_require__(/*! ./_edit */ "./node_modules/@abaplint/core/build/src/lsp/_edit.js");
|
|
@@ -40627,7 +40707,7 @@ exports.CodeActions = CodeActions;
|
|
|
40627
40707
|
|
|
40628
40708
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40629
40709
|
exports.CodeLens = void 0;
|
|
40630
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
40710
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
40631
40711
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
40632
40712
|
const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
|
|
40633
40713
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
@@ -40775,7 +40855,7 @@ exports.Definition = Definition;
|
|
|
40775
40855
|
|
|
40776
40856
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40777
40857
|
exports.Diagnostics = void 0;
|
|
40778
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
40858
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
40779
40859
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
40780
40860
|
const severity_1 = __webpack_require__(/*! ../severity */ "./node_modules/@abaplint/core/build/src/severity.js");
|
|
40781
40861
|
class Diagnostics {
|
|
@@ -41274,7 +41354,7 @@ exports.Highlight = Highlight;
|
|
|
41274
41354
|
|
|
41275
41355
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41276
41356
|
exports.Hover = void 0;
|
|
41277
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
41357
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
41278
41358
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
41279
41359
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
41280
41360
|
const Tokens = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
@@ -41411,7 +41491,7 @@ exports.Implementation = Implementation;
|
|
|
41411
41491
|
|
|
41412
41492
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41413
41493
|
exports.InlayHints = void 0;
|
|
41414
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
41494
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
41415
41495
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
41416
41496
|
const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
|
|
41417
41497
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
@@ -41486,7 +41566,7 @@ exports.InlayHints = InlayHints;
|
|
|
41486
41566
|
|
|
41487
41567
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41488
41568
|
exports.LanguageServer = void 0;
|
|
41489
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
41569
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
41490
41570
|
const symbols_1 = __webpack_require__(/*! ./symbols */ "./node_modules/@abaplint/core/build/src/lsp/symbols.js");
|
|
41491
41571
|
const hover_1 = __webpack_require__(/*! ./hover */ "./node_modules/@abaplint/core/build/src/lsp/hover.js");
|
|
41492
41572
|
const diagnostics_1 = __webpack_require__(/*! ./diagnostics */ "./node_modules/@abaplint/core/build/src/lsp/diagnostics.js");
|
|
@@ -41751,7 +41831,7 @@ exports.References = References;
|
|
|
41751
41831
|
|
|
41752
41832
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41753
41833
|
exports.Rename = exports.RenameType = void 0;
|
|
41754
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
41834
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
41755
41835
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
41756
41836
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
41757
41837
|
const _lookup_1 = __webpack_require__(/*! ./_lookup */ "./node_modules/@abaplint/core/build/src/lsp/_lookup.js");
|
|
@@ -41868,7 +41948,7 @@ exports.Rename = Rename;
|
|
|
41868
41948
|
|
|
41869
41949
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41870
41950
|
exports.SemanticHighlighting = void 0;
|
|
41871
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
41951
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
41872
41952
|
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
41873
41953
|
const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
41874
41954
|
const nodes_1 = __webpack_require__(/*! ../abap/nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
@@ -42010,8 +42090,10 @@ SemanticHighlighting.tokenTypes = [];
|
|
|
42010
42090
|
|
|
42011
42091
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
42012
42092
|
exports.Symbols = void 0;
|
|
42013
|
-
|
|
42093
|
+
/* eslint-disable max-len */
|
|
42094
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
42014
42095
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
42096
|
+
const statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
42015
42097
|
class Symbols {
|
|
42016
42098
|
constructor(reg) {
|
|
42017
42099
|
this.reg = reg;
|
|
@@ -42036,6 +42118,16 @@ class Symbols {
|
|
|
42036
42118
|
const end = identifer.getEnd();
|
|
42037
42119
|
return LServer.Range.create(start.getRow() - 1, start.getCol() - 1, end.getRow() - 1, end.getCol() - 1);
|
|
42038
42120
|
}
|
|
42121
|
+
newSymbolRanged(identifier, kind, children, range) {
|
|
42122
|
+
const symbol = {
|
|
42123
|
+
name: identifier.getName(),
|
|
42124
|
+
kind: kind,
|
|
42125
|
+
range: range,
|
|
42126
|
+
selectionRange: this.selectionRange(identifier),
|
|
42127
|
+
children,
|
|
42128
|
+
};
|
|
42129
|
+
return symbol;
|
|
42130
|
+
}
|
|
42039
42131
|
newSymbol(identifier, kind, children) {
|
|
42040
42132
|
const symbol = {
|
|
42041
42133
|
name: identifier.getName(),
|
|
@@ -42059,22 +42151,36 @@ class Symbols {
|
|
|
42059
42151
|
for (const cla of file.getInfo().listClassDefinitions()) {
|
|
42060
42152
|
const children = [];
|
|
42061
42153
|
children.push(...this.outputClassAttributes(cla.attributes));
|
|
42062
|
-
children.push(...this.outputMethodDefinitions(cla.methods));
|
|
42063
42154
|
const symbol = this.newSymbol(cla.identifier, LServer.SymbolKind.Class, children);
|
|
42064
42155
|
ret.push(symbol);
|
|
42065
42156
|
}
|
|
42066
42157
|
for (const cla of file.getInfo().listClassImplementations()) {
|
|
42067
42158
|
const children = [];
|
|
42068
|
-
children.push(...this.outputMethodImplementations(cla.methods));
|
|
42159
|
+
children.push(...this.outputMethodImplementations(cla.methods, file));
|
|
42069
42160
|
const symbol = this.newSymbol(cla.identifier, LServer.SymbolKind.Class, children);
|
|
42070
42161
|
ret.push(symbol);
|
|
42071
42162
|
}
|
|
42072
42163
|
return ret;
|
|
42073
42164
|
}
|
|
42074
|
-
outputMethodImplementations(methods) {
|
|
42165
|
+
outputMethodImplementations(methods, file) {
|
|
42075
42166
|
const ret = [];
|
|
42076
42167
|
for (const method of methods) {
|
|
42077
|
-
const
|
|
42168
|
+
const start = method.getStart();
|
|
42169
|
+
let end = undefined;
|
|
42170
|
+
for (const s of file.getStatements()) {
|
|
42171
|
+
if (s.getFirstToken().getStart().isBefore(start)) {
|
|
42172
|
+
continue;
|
|
42173
|
+
}
|
|
42174
|
+
if (s.get() instanceof statements_1.EndMethod) {
|
|
42175
|
+
end = s.getLastToken().getEnd();
|
|
42176
|
+
break;
|
|
42177
|
+
}
|
|
42178
|
+
}
|
|
42179
|
+
if (end === undefined) {
|
|
42180
|
+
continue;
|
|
42181
|
+
}
|
|
42182
|
+
const range = LServer.Range.create(start.getRow() - 1, start.getCol() - 1, end.getRow() - 1, end.getCol() - 1);
|
|
42183
|
+
const symbol = this.newSymbolRanged(method, LServer.SymbolKind.Method, [], range);
|
|
42078
42184
|
ret.push(symbol);
|
|
42079
42185
|
}
|
|
42080
42186
|
return ret;
|
|
@@ -42090,13 +42196,6 @@ class Symbols {
|
|
|
42090
42196
|
// todo, also add constants
|
|
42091
42197
|
return ret;
|
|
42092
42198
|
}
|
|
42093
|
-
outputMethodDefinitions(methods) {
|
|
42094
|
-
if (methods === undefined) {
|
|
42095
|
-
return [];
|
|
42096
|
-
}
|
|
42097
|
-
// todo
|
|
42098
|
-
return [];
|
|
42099
|
-
}
|
|
42100
42199
|
}
|
|
42101
42200
|
exports.Symbols = Symbols;
|
|
42102
42201
|
//# sourceMappingURL=symbols.js.map
|
|
@@ -46477,7 +46576,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
46477
46576
|
exports.RenameGlobalClass = void 0;
|
|
46478
46577
|
const Statements = __webpack_require__(/*! ../../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
46479
46578
|
const Expressions = __webpack_require__(/*! ../../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
46480
|
-
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
46579
|
+
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
46481
46580
|
const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
46482
46581
|
const _lsp_utils_1 = __webpack_require__(/*! ../../lsp/_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
46483
46582
|
const renamer_helper_1 = __webpack_require__(/*! ./renamer_helper */ "./node_modules/@abaplint/core/build/src/objects/rename/renamer_helper.js");
|
|
@@ -46542,7 +46641,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
46542
46641
|
exports.RenameGlobalInterface = void 0;
|
|
46543
46642
|
const Statements = __webpack_require__(/*! ../../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
46544
46643
|
const Expressions = __webpack_require__(/*! ../../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
46545
|
-
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
46644
|
+
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
46546
46645
|
const _lsp_utils_1 = __webpack_require__(/*! ../../lsp/_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
46547
46646
|
const renamer_helper_1 = __webpack_require__(/*! ./renamer_helper */ "./node_modules/@abaplint/core/build/src/objects/rename/renamer_helper.js");
|
|
46548
46647
|
const interface_1 = __webpack_require__(/*! ../interface */ "./node_modules/@abaplint/core/build/src/objects/interface.js");
|
|
@@ -46671,7 +46770,7 @@ exports.RenameTableType = RenameTableType;
|
|
|
46671
46770
|
|
|
46672
46771
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
46673
46772
|
exports.Renamer = void 0;
|
|
46674
|
-
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
46773
|
+
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
46675
46774
|
const memory_file_1 = __webpack_require__(/*! ../../files/memory_file */ "./node_modules/@abaplint/core/build/src/files/memory_file.js");
|
|
46676
46775
|
const rename_data_element_1 = __webpack_require__(/*! ./rename_data_element */ "./node_modules/@abaplint/core/build/src/objects/rename/rename_data_element.js");
|
|
46677
46776
|
const rename_domain_1 = __webpack_require__(/*! ./rename_domain */ "./node_modules/@abaplint/core/build/src/objects/rename/rename_domain.js");
|
|
@@ -46803,7 +46902,7 @@ exports.Renamer = Renamer;
|
|
|
46803
46902
|
|
|
46804
46903
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
46805
46904
|
exports.RenamerHelper = void 0;
|
|
46806
|
-
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
46905
|
+
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
46807
46906
|
const __1 = __webpack_require__(/*! ../.. */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
46808
46907
|
const syntax_1 = __webpack_require__(/*! ../../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
|
|
46809
46908
|
const _scope_type_1 = __webpack_require__(/*! ../../abap/5_syntax/_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
|
|
@@ -48934,7 +49033,7 @@ class Registry {
|
|
|
48934
49033
|
}
|
|
48935
49034
|
static abaplintVersion() {
|
|
48936
49035
|
// magic, see build script "version.sh"
|
|
48937
|
-
return "2.102.
|
|
49036
|
+
return "2.102.47";
|
|
48938
49037
|
}
|
|
48939
49038
|
getDDICReferences() {
|
|
48940
49039
|
return this.ddicReferences;
|
|
@@ -78238,2301 +78337,2307 @@ module.exports = toNumber
|
|
|
78238
78337
|
|
|
78239
78338
|
/***/ }),
|
|
78240
78339
|
|
|
78241
|
-
/***/ "./node_modules/vscode-languageserver-types/lib/
|
|
78340
|
+
/***/ "./node_modules/vscode-languageserver-types/lib/umd/main.js":
|
|
78242
78341
|
/*!******************************************************************!*\
|
|
78243
|
-
!*** ./node_modules/vscode-languageserver-types/lib/
|
|
78342
|
+
!*** ./node_modules/vscode-languageserver-types/lib/umd/main.js ***!
|
|
78244
78343
|
\******************************************************************/
|
|
78245
|
-
/***/ ((
|
|
78246
|
-
|
|
78247
|
-
|
|
78248
|
-
|
|
78249
|
-
|
|
78250
|
-
|
|
78251
|
-
|
|
78252
|
-
|
|
78253
|
-
|
|
78254
|
-
|
|
78255
|
-
|
|
78256
|
-
|
|
78257
|
-
|
|
78258
|
-
|
|
78259
|
-
/*
|
|
78260
|
-
|
|
78261
|
-
|
|
78262
|
-
|
|
78263
|
-
|
|
78264
|
-
|
|
78265
|
-
|
|
78266
|
-
|
|
78267
|
-
|
|
78268
|
-
|
|
78269
|
-
|
|
78270
|
-
|
|
78271
|
-
|
|
78272
|
-
|
|
78273
|
-
|
|
78274
|
-
|
|
78275
|
-
|
|
78276
|
-
|
|
78277
|
-
|
|
78278
|
-
|
|
78279
|
-
|
|
78280
|
-
|
|
78281
|
-
|
|
78282
|
-
|
|
78283
|
-
|
|
78284
|
-
|
|
78285
|
-
|
|
78286
|
-
|
|
78287
|
-
|
|
78288
|
-
|
|
78289
|
-
|
|
78290
|
-
|
|
78291
|
-
|
|
78292
|
-
|
|
78293
|
-
|
|
78294
|
-
|
|
78295
|
-
|
|
78296
|
-
|
|
78297
|
-
|
|
78298
|
-
/* harmony export */ MarkupKind: () => (/* binding */ MarkupKind),
|
|
78299
|
-
/* harmony export */ OptionalVersionedTextDocumentIdentifier: () => (/* binding */ OptionalVersionedTextDocumentIdentifier),
|
|
78300
|
-
/* harmony export */ ParameterInformation: () => (/* binding */ ParameterInformation),
|
|
78301
|
-
/* harmony export */ Position: () => (/* binding */ Position),
|
|
78302
|
-
/* harmony export */ Range: () => (/* binding */ Range),
|
|
78303
|
-
/* harmony export */ RenameFile: () => (/* binding */ RenameFile),
|
|
78304
|
-
/* harmony export */ SelectionRange: () => (/* binding */ SelectionRange),
|
|
78305
|
-
/* harmony export */ SemanticTokenModifiers: () => (/* binding */ SemanticTokenModifiers),
|
|
78306
|
-
/* harmony export */ SemanticTokenTypes: () => (/* binding */ SemanticTokenTypes),
|
|
78307
|
-
/* harmony export */ SemanticTokens: () => (/* binding */ SemanticTokens),
|
|
78308
|
-
/* harmony export */ SignatureInformation: () => (/* binding */ SignatureInformation),
|
|
78309
|
-
/* harmony export */ SymbolInformation: () => (/* binding */ SymbolInformation),
|
|
78310
|
-
/* harmony export */ SymbolKind: () => (/* binding */ SymbolKind),
|
|
78311
|
-
/* harmony export */ SymbolTag: () => (/* binding */ SymbolTag),
|
|
78312
|
-
/* harmony export */ TextDocument: () => (/* binding */ TextDocument),
|
|
78313
|
-
/* harmony export */ TextDocumentEdit: () => (/* binding */ TextDocumentEdit),
|
|
78314
|
-
/* harmony export */ TextDocumentIdentifier: () => (/* binding */ TextDocumentIdentifier),
|
|
78315
|
-
/* harmony export */ TextDocumentItem: () => (/* binding */ TextDocumentItem),
|
|
78316
|
-
/* harmony export */ TextEdit: () => (/* binding */ TextEdit),
|
|
78317
|
-
/* harmony export */ URI: () => (/* binding */ URI),
|
|
78318
|
-
/* harmony export */ VersionedTextDocumentIdentifier: () => (/* binding */ VersionedTextDocumentIdentifier),
|
|
78319
|
-
/* harmony export */ WorkspaceChange: () => (/* binding */ WorkspaceChange),
|
|
78320
|
-
/* harmony export */ WorkspaceEdit: () => (/* binding */ WorkspaceEdit),
|
|
78321
|
-
/* harmony export */ WorkspaceFolder: () => (/* binding */ WorkspaceFolder),
|
|
78322
|
-
/* harmony export */ WorkspaceSymbol: () => (/* binding */ WorkspaceSymbol),
|
|
78323
|
-
/* harmony export */ integer: () => (/* binding */ integer),
|
|
78324
|
-
/* harmony export */ uinteger: () => (/* binding */ uinteger)
|
|
78325
|
-
/* harmony export */ });
|
|
78326
|
-
/* --------------------------------------------------------------------------------------------
|
|
78327
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
78328
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
78329
|
-
* ------------------------------------------------------------------------------------------ */
|
|
78330
|
-
|
|
78331
|
-
var DocumentUri;
|
|
78332
|
-
(function (DocumentUri) {
|
|
78333
|
-
function is(value) {
|
|
78334
|
-
return typeof value === 'string';
|
|
78335
|
-
}
|
|
78336
|
-
DocumentUri.is = is;
|
|
78337
|
-
})(DocumentUri || (DocumentUri = {}));
|
|
78338
|
-
var URI;
|
|
78339
|
-
(function (URI) {
|
|
78340
|
-
function is(value) {
|
|
78341
|
-
return typeof value === 'string';
|
|
78342
|
-
}
|
|
78343
|
-
URI.is = is;
|
|
78344
|
-
})(URI || (URI = {}));
|
|
78345
|
-
var integer;
|
|
78346
|
-
(function (integer) {
|
|
78347
|
-
integer.MIN_VALUE = -2147483648;
|
|
78348
|
-
integer.MAX_VALUE = 2147483647;
|
|
78349
|
-
function is(value) {
|
|
78350
|
-
return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;
|
|
78351
|
-
}
|
|
78352
|
-
integer.is = is;
|
|
78353
|
-
})(integer || (integer = {}));
|
|
78354
|
-
var uinteger;
|
|
78355
|
-
(function (uinteger) {
|
|
78356
|
-
uinteger.MIN_VALUE = 0;
|
|
78357
|
-
uinteger.MAX_VALUE = 2147483647;
|
|
78358
|
-
function is(value) {
|
|
78359
|
-
return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;
|
|
78360
|
-
}
|
|
78361
|
-
uinteger.is = is;
|
|
78362
|
-
})(uinteger || (uinteger = {}));
|
|
78363
|
-
/**
|
|
78364
|
-
* The Position namespace provides helper functions to work with
|
|
78365
|
-
* {@link Position} literals.
|
|
78366
|
-
*/
|
|
78367
|
-
var Position;
|
|
78368
|
-
(function (Position) {
|
|
78344
|
+
/***/ ((module, exports, __webpack_require__) => {
|
|
78345
|
+
|
|
78346
|
+
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (factory) {
|
|
78347
|
+
if ( true && typeof module.exports === "object") {
|
|
78348
|
+
var v = factory(__webpack_require__("./node_modules/vscode-languageserver-types/lib/umd sync recursive"), exports);
|
|
78349
|
+
if (v !== undefined) module.exports = v;
|
|
78350
|
+
}
|
|
78351
|
+
else if (true) {
|
|
78352
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
78353
|
+
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
78354
|
+
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
78355
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
78356
|
+
}
|
|
78357
|
+
})(function (require, exports) {
|
|
78358
|
+
/* --------------------------------------------------------------------------------------------
|
|
78359
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
78360
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
78361
|
+
* ------------------------------------------------------------------------------------------ */
|
|
78362
|
+
'use strict';
|
|
78363
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78364
|
+
exports.TextDocument = exports.EOL = exports.WorkspaceFolder = exports.InlineCompletionContext = exports.SelectedCompletionInfo = exports.InlineCompletionTriggerKind = exports.InlineCompletionList = exports.InlineCompletionItem = exports.StringValue = exports.InlayHint = exports.InlayHintLabelPart = exports.InlayHintKind = exports.InlineValueContext = exports.InlineValueEvaluatableExpression = exports.InlineValueVariableLookup = exports.InlineValueText = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = exports.SelectionRange = exports.DocumentLink = exports.FormattingOptions = exports.CodeLens = exports.CodeAction = exports.CodeActionContext = exports.CodeActionTriggerKind = exports.CodeActionKind = exports.DocumentSymbol = exports.WorkspaceSymbol = exports.SymbolInformation = exports.SymbolTag = exports.SymbolKind = exports.DocumentHighlight = exports.DocumentHighlightKind = exports.SignatureInformation = exports.ParameterInformation = exports.Hover = exports.MarkedString = exports.CompletionList = exports.CompletionItem = exports.CompletionItemLabelDetails = exports.InsertTextMode = exports.InsertReplaceEdit = exports.CompletionItemTag = exports.InsertTextFormat = exports.CompletionItemKind = exports.MarkupContent = exports.MarkupKind = exports.TextDocumentItem = exports.OptionalVersionedTextDocumentIdentifier = exports.VersionedTextDocumentIdentifier = exports.TextDocumentIdentifier = exports.WorkspaceChange = exports.WorkspaceEdit = exports.DeleteFile = exports.RenameFile = exports.CreateFile = exports.TextDocumentEdit = exports.AnnotatedTextEdit = exports.ChangeAnnotationIdentifier = exports.ChangeAnnotation = exports.TextEdit = exports.Command = exports.Diagnostic = exports.CodeDescription = exports.DiagnosticTag = exports.DiagnosticSeverity = exports.DiagnosticRelatedInformation = exports.FoldingRange = exports.FoldingRangeKind = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.LocationLink = exports.Location = exports.Range = exports.Position = exports.uinteger = exports.integer = exports.URI = exports.DocumentUri = void 0;
|
|
78365
|
+
var DocumentUri;
|
|
78366
|
+
(function (DocumentUri) {
|
|
78367
|
+
function is(value) {
|
|
78368
|
+
return typeof value === 'string';
|
|
78369
|
+
}
|
|
78370
|
+
DocumentUri.is = is;
|
|
78371
|
+
})(DocumentUri || (exports.DocumentUri = DocumentUri = {}));
|
|
78372
|
+
var URI;
|
|
78373
|
+
(function (URI) {
|
|
78374
|
+
function is(value) {
|
|
78375
|
+
return typeof value === 'string';
|
|
78376
|
+
}
|
|
78377
|
+
URI.is = is;
|
|
78378
|
+
})(URI || (exports.URI = URI = {}));
|
|
78379
|
+
var integer;
|
|
78380
|
+
(function (integer) {
|
|
78381
|
+
integer.MIN_VALUE = -2147483648;
|
|
78382
|
+
integer.MAX_VALUE = 2147483647;
|
|
78383
|
+
function is(value) {
|
|
78384
|
+
return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;
|
|
78385
|
+
}
|
|
78386
|
+
integer.is = is;
|
|
78387
|
+
})(integer || (exports.integer = integer = {}));
|
|
78388
|
+
var uinteger;
|
|
78389
|
+
(function (uinteger) {
|
|
78390
|
+
uinteger.MIN_VALUE = 0;
|
|
78391
|
+
uinteger.MAX_VALUE = 2147483647;
|
|
78392
|
+
function is(value) {
|
|
78393
|
+
return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;
|
|
78394
|
+
}
|
|
78395
|
+
uinteger.is = is;
|
|
78396
|
+
})(uinteger || (exports.uinteger = uinteger = {}));
|
|
78369
78397
|
/**
|
|
78370
|
-
*
|
|
78371
|
-
* @
|
|
78372
|
-
* @param character The position's character.
|
|
78398
|
+
* The Position namespace provides helper functions to work with
|
|
78399
|
+
* {@link Position} literals.
|
|
78373
78400
|
*/
|
|
78374
|
-
|
|
78375
|
-
|
|
78376
|
-
|
|
78401
|
+
var Position;
|
|
78402
|
+
(function (Position) {
|
|
78403
|
+
/**
|
|
78404
|
+
* Creates a new Position literal from the given line and character.
|
|
78405
|
+
* @param line The position's line.
|
|
78406
|
+
* @param character The position's character.
|
|
78407
|
+
*/
|
|
78408
|
+
function create(line, character) {
|
|
78409
|
+
if (line === Number.MAX_VALUE) {
|
|
78410
|
+
line = uinteger.MAX_VALUE;
|
|
78411
|
+
}
|
|
78412
|
+
if (character === Number.MAX_VALUE) {
|
|
78413
|
+
character = uinteger.MAX_VALUE;
|
|
78414
|
+
}
|
|
78415
|
+
return { line: line, character: character };
|
|
78377
78416
|
}
|
|
78378
|
-
|
|
78379
|
-
|
|
78417
|
+
Position.create = create;
|
|
78418
|
+
/**
|
|
78419
|
+
* Checks whether the given literal conforms to the {@link Position} interface.
|
|
78420
|
+
*/
|
|
78421
|
+
function is(value) {
|
|
78422
|
+
var candidate = value;
|
|
78423
|
+
return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
|
|
78380
78424
|
}
|
|
78381
|
-
|
|
78382
|
-
}
|
|
78383
|
-
Position.create = create;
|
|
78425
|
+
Position.is = is;
|
|
78426
|
+
})(Position || (exports.Position = Position = {}));
|
|
78384
78427
|
/**
|
|
78385
|
-
*
|
|
78428
|
+
* The Range namespace provides helper functions to work with
|
|
78429
|
+
* {@link Range} literals.
|
|
78386
78430
|
*/
|
|
78387
|
-
|
|
78388
|
-
|
|
78389
|
-
|
|
78390
|
-
|
|
78391
|
-
|
|
78392
|
-
}
|
|
78393
|
-
|
|
78394
|
-
|
|
78395
|
-
|
|
78396
|
-
|
|
78397
|
-
|
|
78398
|
-
|
|
78399
|
-
function create(one, two, three, four) {
|
|
78400
|
-
if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
|
|
78401
|
-
return { start: Position.create(one, two), end: Position.create(three, four) };
|
|
78402
|
-
}
|
|
78403
|
-
else if (Position.is(one) && Position.is(two)) {
|
|
78404
|
-
return { start: one, end: two };
|
|
78431
|
+
var Range;
|
|
78432
|
+
(function (Range) {
|
|
78433
|
+
function create(one, two, three, four) {
|
|
78434
|
+
if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
|
|
78435
|
+
return { start: Position.create(one, two), end: Position.create(three, four) };
|
|
78436
|
+
}
|
|
78437
|
+
else if (Position.is(one) && Position.is(two)) {
|
|
78438
|
+
return { start: one, end: two };
|
|
78439
|
+
}
|
|
78440
|
+
else {
|
|
78441
|
+
throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]"));
|
|
78442
|
+
}
|
|
78405
78443
|
}
|
|
78406
|
-
|
|
78407
|
-
|
|
78444
|
+
Range.create = create;
|
|
78445
|
+
/**
|
|
78446
|
+
* Checks whether the given literal conforms to the {@link Range} interface.
|
|
78447
|
+
*/
|
|
78448
|
+
function is(value) {
|
|
78449
|
+
var candidate = value;
|
|
78450
|
+
return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
|
|
78408
78451
|
}
|
|
78409
|
-
|
|
78410
|
-
Range.
|
|
78452
|
+
Range.is = is;
|
|
78453
|
+
})(Range || (exports.Range = Range = {}));
|
|
78411
78454
|
/**
|
|
78412
|
-
*
|
|
78455
|
+
* The Location namespace provides helper functions to work with
|
|
78456
|
+
* {@link Location} literals.
|
|
78413
78457
|
*/
|
|
78414
|
-
|
|
78415
|
-
|
|
78416
|
-
|
|
78417
|
-
|
|
78418
|
-
|
|
78419
|
-
|
|
78420
|
-
|
|
78421
|
-
|
|
78422
|
-
|
|
78423
|
-
|
|
78424
|
-
|
|
78425
|
-
|
|
78458
|
+
var Location;
|
|
78459
|
+
(function (Location) {
|
|
78460
|
+
/**
|
|
78461
|
+
* Creates a Location literal.
|
|
78462
|
+
* @param uri The location's uri.
|
|
78463
|
+
* @param range The location's range.
|
|
78464
|
+
*/
|
|
78465
|
+
function create(uri, range) {
|
|
78466
|
+
return { uri: uri, range: range };
|
|
78467
|
+
}
|
|
78468
|
+
Location.create = create;
|
|
78469
|
+
/**
|
|
78470
|
+
* Checks whether the given literal conforms to the {@link Location} interface.
|
|
78471
|
+
*/
|
|
78472
|
+
function is(value) {
|
|
78473
|
+
var candidate = value;
|
|
78474
|
+
return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
|
|
78475
|
+
}
|
|
78476
|
+
Location.is = is;
|
|
78477
|
+
})(Location || (exports.Location = Location = {}));
|
|
78426
78478
|
/**
|
|
78427
|
-
*
|
|
78428
|
-
* @
|
|
78429
|
-
* @param range The location's range.
|
|
78479
|
+
* The LocationLink namespace provides helper functions to work with
|
|
78480
|
+
* {@link LocationLink} literals.
|
|
78430
78481
|
*/
|
|
78431
|
-
|
|
78432
|
-
|
|
78433
|
-
|
|
78434
|
-
|
|
78482
|
+
var LocationLink;
|
|
78483
|
+
(function (LocationLink) {
|
|
78484
|
+
/**
|
|
78485
|
+
* Creates a LocationLink literal.
|
|
78486
|
+
* @param targetUri The definition's uri.
|
|
78487
|
+
* @param targetRange The full range of the definition.
|
|
78488
|
+
* @param targetSelectionRange The span of the symbol definition at the target.
|
|
78489
|
+
* @param originSelectionRange The span of the symbol being defined in the originating source file.
|
|
78490
|
+
*/
|
|
78491
|
+
function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
|
|
78492
|
+
return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
|
|
78493
|
+
}
|
|
78494
|
+
LocationLink.create = create;
|
|
78495
|
+
/**
|
|
78496
|
+
* Checks whether the given literal conforms to the {@link LocationLink} interface.
|
|
78497
|
+
*/
|
|
78498
|
+
function is(value) {
|
|
78499
|
+
var candidate = value;
|
|
78500
|
+
return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
|
|
78501
|
+
&& Range.is(candidate.targetSelectionRange)
|
|
78502
|
+
&& (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
|
|
78503
|
+
}
|
|
78504
|
+
LocationLink.is = is;
|
|
78505
|
+
})(LocationLink || (exports.LocationLink = LocationLink = {}));
|
|
78435
78506
|
/**
|
|
78436
|
-
*
|
|
78507
|
+
* The Color namespace provides helper functions to work with
|
|
78508
|
+
* {@link Color} literals.
|
|
78437
78509
|
*/
|
|
78438
|
-
|
|
78439
|
-
|
|
78440
|
-
|
|
78441
|
-
|
|
78442
|
-
|
|
78443
|
-
|
|
78444
|
-
|
|
78445
|
-
|
|
78446
|
-
|
|
78447
|
-
|
|
78448
|
-
|
|
78449
|
-
|
|
78510
|
+
var Color;
|
|
78511
|
+
(function (Color) {
|
|
78512
|
+
/**
|
|
78513
|
+
* Creates a new Color literal.
|
|
78514
|
+
*/
|
|
78515
|
+
function create(red, green, blue, alpha) {
|
|
78516
|
+
return {
|
|
78517
|
+
red: red,
|
|
78518
|
+
green: green,
|
|
78519
|
+
blue: blue,
|
|
78520
|
+
alpha: alpha,
|
|
78521
|
+
};
|
|
78522
|
+
}
|
|
78523
|
+
Color.create = create;
|
|
78524
|
+
/**
|
|
78525
|
+
* Checks whether the given literal conforms to the {@link Color} interface.
|
|
78526
|
+
*/
|
|
78527
|
+
function is(value) {
|
|
78528
|
+
var candidate = value;
|
|
78529
|
+
return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1)
|
|
78530
|
+
&& Is.numberRange(candidate.green, 0, 1)
|
|
78531
|
+
&& Is.numberRange(candidate.blue, 0, 1)
|
|
78532
|
+
&& Is.numberRange(candidate.alpha, 0, 1);
|
|
78533
|
+
}
|
|
78534
|
+
Color.is = is;
|
|
78535
|
+
})(Color || (exports.Color = Color = {}));
|
|
78450
78536
|
/**
|
|
78451
|
-
*
|
|
78452
|
-
* @
|
|
78453
|
-
* @param targetRange The full range of the definition.
|
|
78454
|
-
* @param targetSelectionRange The span of the symbol definition at the target.
|
|
78455
|
-
* @param originSelectionRange The span of the symbol being defined in the originating source file.
|
|
78537
|
+
* The ColorInformation namespace provides helper functions to work with
|
|
78538
|
+
* {@link ColorInformation} literals.
|
|
78456
78539
|
*/
|
|
78457
|
-
|
|
78458
|
-
|
|
78459
|
-
|
|
78460
|
-
|
|
78540
|
+
var ColorInformation;
|
|
78541
|
+
(function (ColorInformation) {
|
|
78542
|
+
/**
|
|
78543
|
+
* Creates a new ColorInformation literal.
|
|
78544
|
+
*/
|
|
78545
|
+
function create(range, color) {
|
|
78546
|
+
return {
|
|
78547
|
+
range: range,
|
|
78548
|
+
color: color,
|
|
78549
|
+
};
|
|
78550
|
+
}
|
|
78551
|
+
ColorInformation.create = create;
|
|
78552
|
+
/**
|
|
78553
|
+
* Checks whether the given literal conforms to the {@link ColorInformation} interface.
|
|
78554
|
+
*/
|
|
78555
|
+
function is(value) {
|
|
78556
|
+
var candidate = value;
|
|
78557
|
+
return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);
|
|
78558
|
+
}
|
|
78559
|
+
ColorInformation.is = is;
|
|
78560
|
+
})(ColorInformation || (exports.ColorInformation = ColorInformation = {}));
|
|
78461
78561
|
/**
|
|
78462
|
-
*
|
|
78562
|
+
* The Color namespace provides helper functions to work with
|
|
78563
|
+
* {@link ColorPresentation} literals.
|
|
78463
78564
|
*/
|
|
78464
|
-
|
|
78465
|
-
|
|
78466
|
-
|
|
78467
|
-
|
|
78468
|
-
|
|
78469
|
-
|
|
78470
|
-
|
|
78471
|
-
|
|
78472
|
-
|
|
78473
|
-
|
|
78474
|
-
|
|
78475
|
-
|
|
78476
|
-
|
|
78477
|
-
|
|
78565
|
+
var ColorPresentation;
|
|
78566
|
+
(function (ColorPresentation) {
|
|
78567
|
+
/**
|
|
78568
|
+
* Creates a new ColorInformation literal.
|
|
78569
|
+
*/
|
|
78570
|
+
function create(label, textEdit, additionalTextEdits) {
|
|
78571
|
+
return {
|
|
78572
|
+
label: label,
|
|
78573
|
+
textEdit: textEdit,
|
|
78574
|
+
additionalTextEdits: additionalTextEdits,
|
|
78575
|
+
};
|
|
78576
|
+
}
|
|
78577
|
+
ColorPresentation.create = create;
|
|
78578
|
+
/**
|
|
78579
|
+
* Checks whether the given literal conforms to the {@link ColorInformation} interface.
|
|
78580
|
+
*/
|
|
78581
|
+
function is(value) {
|
|
78582
|
+
var candidate = value;
|
|
78583
|
+
return Is.objectLiteral(candidate) && Is.string(candidate.label)
|
|
78584
|
+
&& (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
|
|
78585
|
+
&& (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
|
|
78586
|
+
}
|
|
78587
|
+
ColorPresentation.is = is;
|
|
78588
|
+
})(ColorPresentation || (exports.ColorPresentation = ColorPresentation = {}));
|
|
78478
78589
|
/**
|
|
78479
|
-
*
|
|
78590
|
+
* A set of predefined range kinds.
|
|
78480
78591
|
*/
|
|
78481
|
-
|
|
78482
|
-
|
|
78483
|
-
|
|
78484
|
-
|
|
78485
|
-
|
|
78486
|
-
|
|
78487
|
-
|
|
78488
|
-
|
|
78489
|
-
|
|
78592
|
+
var FoldingRangeKind;
|
|
78593
|
+
(function (FoldingRangeKind) {
|
|
78594
|
+
/**
|
|
78595
|
+
* Folding range for a comment
|
|
78596
|
+
*/
|
|
78597
|
+
FoldingRangeKind.Comment = 'comment';
|
|
78598
|
+
/**
|
|
78599
|
+
* Folding range for an import or include
|
|
78600
|
+
*/
|
|
78601
|
+
FoldingRangeKind.Imports = 'imports';
|
|
78602
|
+
/**
|
|
78603
|
+
* Folding range for a region (e.g. `#region`)
|
|
78604
|
+
*/
|
|
78605
|
+
FoldingRangeKind.Region = 'region';
|
|
78606
|
+
})(FoldingRangeKind || (exports.FoldingRangeKind = FoldingRangeKind = {}));
|
|
78490
78607
|
/**
|
|
78491
|
-
*
|
|
78608
|
+
* The folding range namespace provides helper functions to work with
|
|
78609
|
+
* {@link FoldingRange} literals.
|
|
78492
78610
|
*/
|
|
78493
|
-
|
|
78494
|
-
|
|
78495
|
-
|
|
78496
|
-
|
|
78497
|
-
|
|
78498
|
-
|
|
78499
|
-
|
|
78500
|
-
|
|
78501
|
-
|
|
78502
|
-
|
|
78503
|
-
|
|
78504
|
-
|
|
78505
|
-
|
|
78506
|
-
|
|
78507
|
-
|
|
78611
|
+
var FoldingRange;
|
|
78612
|
+
(function (FoldingRange) {
|
|
78613
|
+
/**
|
|
78614
|
+
* Creates a new FoldingRange literal.
|
|
78615
|
+
*/
|
|
78616
|
+
function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {
|
|
78617
|
+
var result = {
|
|
78618
|
+
startLine: startLine,
|
|
78619
|
+
endLine: endLine
|
|
78620
|
+
};
|
|
78621
|
+
if (Is.defined(startCharacter)) {
|
|
78622
|
+
result.startCharacter = startCharacter;
|
|
78623
|
+
}
|
|
78624
|
+
if (Is.defined(endCharacter)) {
|
|
78625
|
+
result.endCharacter = endCharacter;
|
|
78626
|
+
}
|
|
78627
|
+
if (Is.defined(kind)) {
|
|
78628
|
+
result.kind = kind;
|
|
78629
|
+
}
|
|
78630
|
+
if (Is.defined(collapsedText)) {
|
|
78631
|
+
result.collapsedText = collapsedText;
|
|
78632
|
+
}
|
|
78633
|
+
return result;
|
|
78634
|
+
}
|
|
78635
|
+
FoldingRange.create = create;
|
|
78636
|
+
/**
|
|
78637
|
+
* Checks whether the given literal conforms to the {@link FoldingRange} interface.
|
|
78638
|
+
*/
|
|
78639
|
+
function is(value) {
|
|
78640
|
+
var candidate = value;
|
|
78641
|
+
return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)
|
|
78642
|
+
&& (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))
|
|
78643
|
+
&& (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))
|
|
78644
|
+
&& (Is.undefined(candidate.kind) || Is.string(candidate.kind));
|
|
78645
|
+
}
|
|
78646
|
+
FoldingRange.is = is;
|
|
78647
|
+
})(FoldingRange || (exports.FoldingRange = FoldingRange = {}));
|
|
78508
78648
|
/**
|
|
78509
|
-
*
|
|
78649
|
+
* The DiagnosticRelatedInformation namespace provides helper functions to work with
|
|
78650
|
+
* {@link DiagnosticRelatedInformation} literals.
|
|
78510
78651
|
*/
|
|
78511
|
-
|
|
78512
|
-
|
|
78513
|
-
|
|
78514
|
-
|
|
78515
|
-
|
|
78516
|
-
|
|
78517
|
-
|
|
78652
|
+
var DiagnosticRelatedInformation;
|
|
78653
|
+
(function (DiagnosticRelatedInformation) {
|
|
78654
|
+
/**
|
|
78655
|
+
* Creates a new DiagnosticRelatedInformation literal.
|
|
78656
|
+
*/
|
|
78657
|
+
function create(location, message) {
|
|
78658
|
+
return {
|
|
78659
|
+
location: location,
|
|
78660
|
+
message: message
|
|
78661
|
+
};
|
|
78662
|
+
}
|
|
78663
|
+
DiagnosticRelatedInformation.create = create;
|
|
78664
|
+
/**
|
|
78665
|
+
* Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface.
|
|
78666
|
+
*/
|
|
78667
|
+
function is(value) {
|
|
78668
|
+
var candidate = value;
|
|
78669
|
+
return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
|
|
78670
|
+
}
|
|
78671
|
+
DiagnosticRelatedInformation.is = is;
|
|
78672
|
+
})(DiagnosticRelatedInformation || (exports.DiagnosticRelatedInformation = DiagnosticRelatedInformation = {}));
|
|
78518
78673
|
/**
|
|
78519
|
-
*
|
|
78674
|
+
* The diagnostic's severity.
|
|
78520
78675
|
*/
|
|
78521
|
-
|
|
78522
|
-
|
|
78523
|
-
|
|
78524
|
-
|
|
78525
|
-
|
|
78526
|
-
|
|
78527
|
-
/**
|
|
78528
|
-
|
|
78529
|
-
|
|
78530
|
-
|
|
78531
|
-
|
|
78532
|
-
|
|
78676
|
+
var DiagnosticSeverity;
|
|
78677
|
+
(function (DiagnosticSeverity) {
|
|
78678
|
+
/**
|
|
78679
|
+
* Reports an error.
|
|
78680
|
+
*/
|
|
78681
|
+
DiagnosticSeverity.Error = 1;
|
|
78682
|
+
/**
|
|
78683
|
+
* Reports a warning.
|
|
78684
|
+
*/
|
|
78685
|
+
DiagnosticSeverity.Warning = 2;
|
|
78686
|
+
/**
|
|
78687
|
+
* Reports an information.
|
|
78688
|
+
*/
|
|
78689
|
+
DiagnosticSeverity.Information = 3;
|
|
78690
|
+
/**
|
|
78691
|
+
* Reports a hint.
|
|
78692
|
+
*/
|
|
78693
|
+
DiagnosticSeverity.Hint = 4;
|
|
78694
|
+
})(DiagnosticSeverity || (exports.DiagnosticSeverity = DiagnosticSeverity = {}));
|
|
78533
78695
|
/**
|
|
78534
|
-
*
|
|
78696
|
+
* The diagnostic tags.
|
|
78697
|
+
*
|
|
78698
|
+
* @since 3.15.0
|
|
78535
78699
|
*/
|
|
78536
|
-
|
|
78537
|
-
|
|
78538
|
-
|
|
78539
|
-
|
|
78540
|
-
|
|
78541
|
-
|
|
78542
|
-
|
|
78543
|
-
|
|
78700
|
+
var DiagnosticTag;
|
|
78701
|
+
(function (DiagnosticTag) {
|
|
78702
|
+
/**
|
|
78703
|
+
* Unused or unnecessary code.
|
|
78704
|
+
*
|
|
78705
|
+
* Clients are allowed to render diagnostics with this tag faded out instead of having
|
|
78706
|
+
* an error squiggle.
|
|
78707
|
+
*/
|
|
78708
|
+
DiagnosticTag.Unnecessary = 1;
|
|
78709
|
+
/**
|
|
78710
|
+
* Deprecated or obsolete code.
|
|
78711
|
+
*
|
|
78712
|
+
* Clients are allowed to rendered diagnostics with this tag strike through.
|
|
78713
|
+
*/
|
|
78714
|
+
DiagnosticTag.Deprecated = 2;
|
|
78715
|
+
})(DiagnosticTag || (exports.DiagnosticTag = DiagnosticTag = {}));
|
|
78544
78716
|
/**
|
|
78545
|
-
*
|
|
78717
|
+
* The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.
|
|
78718
|
+
*
|
|
78719
|
+
* @since 3.16.0
|
|
78546
78720
|
*/
|
|
78547
|
-
|
|
78548
|
-
|
|
78549
|
-
|
|
78550
|
-
|
|
78551
|
-
|
|
78552
|
-
|
|
78553
|
-
|
|
78554
|
-
})(
|
|
78555
|
-
/**
|
|
78556
|
-
* A set of predefined range kinds.
|
|
78557
|
-
*/
|
|
78558
|
-
var FoldingRangeKind;
|
|
78559
|
-
(function (FoldingRangeKind) {
|
|
78721
|
+
var CodeDescription;
|
|
78722
|
+
(function (CodeDescription) {
|
|
78723
|
+
function is(value) {
|
|
78724
|
+
var candidate = value;
|
|
78725
|
+
return Is.objectLiteral(candidate) && Is.string(candidate.href);
|
|
78726
|
+
}
|
|
78727
|
+
CodeDescription.is = is;
|
|
78728
|
+
})(CodeDescription || (exports.CodeDescription = CodeDescription = {}));
|
|
78560
78729
|
/**
|
|
78561
|
-
*
|
|
78730
|
+
* The Diagnostic namespace provides helper functions to work with
|
|
78731
|
+
* {@link Diagnostic} literals.
|
|
78562
78732
|
*/
|
|
78563
|
-
|
|
78733
|
+
var Diagnostic;
|
|
78734
|
+
(function (Diagnostic) {
|
|
78735
|
+
/**
|
|
78736
|
+
* Creates a new Diagnostic literal.
|
|
78737
|
+
*/
|
|
78738
|
+
function create(range, message, severity, code, source, relatedInformation) {
|
|
78739
|
+
var result = { range: range, message: message };
|
|
78740
|
+
if (Is.defined(severity)) {
|
|
78741
|
+
result.severity = severity;
|
|
78742
|
+
}
|
|
78743
|
+
if (Is.defined(code)) {
|
|
78744
|
+
result.code = code;
|
|
78745
|
+
}
|
|
78746
|
+
if (Is.defined(source)) {
|
|
78747
|
+
result.source = source;
|
|
78748
|
+
}
|
|
78749
|
+
if (Is.defined(relatedInformation)) {
|
|
78750
|
+
result.relatedInformation = relatedInformation;
|
|
78751
|
+
}
|
|
78752
|
+
return result;
|
|
78753
|
+
}
|
|
78754
|
+
Diagnostic.create = create;
|
|
78755
|
+
/**
|
|
78756
|
+
* Checks whether the given literal conforms to the {@link Diagnostic} interface.
|
|
78757
|
+
*/
|
|
78758
|
+
function is(value) {
|
|
78759
|
+
var _a;
|
|
78760
|
+
var candidate = value;
|
|
78761
|
+
return Is.defined(candidate)
|
|
78762
|
+
&& Range.is(candidate.range)
|
|
78763
|
+
&& Is.string(candidate.message)
|
|
78764
|
+
&& (Is.number(candidate.severity) || Is.undefined(candidate.severity))
|
|
78765
|
+
&& (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
|
|
78766
|
+
&& (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))
|
|
78767
|
+
&& (Is.string(candidate.source) || Is.undefined(candidate.source))
|
|
78768
|
+
&& (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
|
|
78769
|
+
}
|
|
78770
|
+
Diagnostic.is = is;
|
|
78771
|
+
})(Diagnostic || (exports.Diagnostic = Diagnostic = {}));
|
|
78564
78772
|
/**
|
|
78565
|
-
*
|
|
78773
|
+
* The Command namespace provides helper functions to work with
|
|
78774
|
+
* {@link Command} literals.
|
|
78566
78775
|
*/
|
|
78567
|
-
|
|
78776
|
+
var Command;
|
|
78777
|
+
(function (Command) {
|
|
78778
|
+
/**
|
|
78779
|
+
* Creates a new Command literal.
|
|
78780
|
+
*/
|
|
78781
|
+
function create(title, command) {
|
|
78782
|
+
var args = [];
|
|
78783
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
78784
|
+
args[_i - 2] = arguments[_i];
|
|
78785
|
+
}
|
|
78786
|
+
var result = { title: title, command: command };
|
|
78787
|
+
if (Is.defined(args) && args.length > 0) {
|
|
78788
|
+
result.arguments = args;
|
|
78789
|
+
}
|
|
78790
|
+
return result;
|
|
78791
|
+
}
|
|
78792
|
+
Command.create = create;
|
|
78793
|
+
/**
|
|
78794
|
+
* Checks whether the given literal conforms to the {@link Command} interface.
|
|
78795
|
+
*/
|
|
78796
|
+
function is(value) {
|
|
78797
|
+
var candidate = value;
|
|
78798
|
+
return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
|
|
78799
|
+
}
|
|
78800
|
+
Command.is = is;
|
|
78801
|
+
})(Command || (exports.Command = Command = {}));
|
|
78568
78802
|
/**
|
|
78569
|
-
*
|
|
78803
|
+
* The TextEdit namespace provides helper function to create replace,
|
|
78804
|
+
* insert and delete edits more easily.
|
|
78570
78805
|
*/
|
|
78571
|
-
|
|
78572
|
-
|
|
78573
|
-
/**
|
|
78574
|
-
|
|
78575
|
-
|
|
78576
|
-
|
|
78577
|
-
|
|
78578
|
-
|
|
78806
|
+
var TextEdit;
|
|
78807
|
+
(function (TextEdit) {
|
|
78808
|
+
/**
|
|
78809
|
+
* Creates a replace text edit.
|
|
78810
|
+
* @param range The range of text to be replaced.
|
|
78811
|
+
* @param newText The new text.
|
|
78812
|
+
*/
|
|
78813
|
+
function replace(range, newText) {
|
|
78814
|
+
return { range: range, newText: newText };
|
|
78815
|
+
}
|
|
78816
|
+
TextEdit.replace = replace;
|
|
78817
|
+
/**
|
|
78818
|
+
* Creates an insert text edit.
|
|
78819
|
+
* @param position The position to insert the text at.
|
|
78820
|
+
* @param newText The text to be inserted.
|
|
78821
|
+
*/
|
|
78822
|
+
function insert(position, newText) {
|
|
78823
|
+
return { range: { start: position, end: position }, newText: newText };
|
|
78824
|
+
}
|
|
78825
|
+
TextEdit.insert = insert;
|
|
78826
|
+
/**
|
|
78827
|
+
* Creates a delete text edit.
|
|
78828
|
+
* @param range The range of text to be deleted.
|
|
78829
|
+
*/
|
|
78830
|
+
function del(range) {
|
|
78831
|
+
return { range: range, newText: '' };
|
|
78832
|
+
}
|
|
78833
|
+
TextEdit.del = del;
|
|
78834
|
+
function is(value) {
|
|
78835
|
+
var candidate = value;
|
|
78836
|
+
return Is.objectLiteral(candidate)
|
|
78837
|
+
&& Is.string(candidate.newText)
|
|
78838
|
+
&& Range.is(candidate.range);
|
|
78839
|
+
}
|
|
78840
|
+
TextEdit.is = is;
|
|
78841
|
+
})(TextEdit || (exports.TextEdit = TextEdit = {}));
|
|
78842
|
+
var ChangeAnnotation;
|
|
78843
|
+
(function (ChangeAnnotation) {
|
|
78844
|
+
function create(label, needsConfirmation, description) {
|
|
78845
|
+
var result = { label: label };
|
|
78846
|
+
if (needsConfirmation !== undefined) {
|
|
78847
|
+
result.needsConfirmation = needsConfirmation;
|
|
78848
|
+
}
|
|
78849
|
+
if (description !== undefined) {
|
|
78850
|
+
result.description = description;
|
|
78851
|
+
}
|
|
78852
|
+
return result;
|
|
78853
|
+
}
|
|
78854
|
+
ChangeAnnotation.create = create;
|
|
78855
|
+
function is(value) {
|
|
78856
|
+
var candidate = value;
|
|
78857
|
+
return Is.objectLiteral(candidate) && Is.string(candidate.label) &&
|
|
78858
|
+
(Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&
|
|
78859
|
+
(Is.string(candidate.description) || candidate.description === undefined);
|
|
78860
|
+
}
|
|
78861
|
+
ChangeAnnotation.is = is;
|
|
78862
|
+
})(ChangeAnnotation || (exports.ChangeAnnotation = ChangeAnnotation = {}));
|
|
78863
|
+
var ChangeAnnotationIdentifier;
|
|
78864
|
+
(function (ChangeAnnotationIdentifier) {
|
|
78865
|
+
function is(value) {
|
|
78866
|
+
var candidate = value;
|
|
78867
|
+
return Is.string(candidate);
|
|
78868
|
+
}
|
|
78869
|
+
ChangeAnnotationIdentifier.is = is;
|
|
78870
|
+
})(ChangeAnnotationIdentifier || (exports.ChangeAnnotationIdentifier = ChangeAnnotationIdentifier = {}));
|
|
78871
|
+
var AnnotatedTextEdit;
|
|
78872
|
+
(function (AnnotatedTextEdit) {
|
|
78873
|
+
/**
|
|
78874
|
+
* Creates an annotated replace text edit.
|
|
78875
|
+
*
|
|
78876
|
+
* @param range The range of text to be replaced.
|
|
78877
|
+
* @param newText The new text.
|
|
78878
|
+
* @param annotation The annotation.
|
|
78879
|
+
*/
|
|
78880
|
+
function replace(range, newText, annotation) {
|
|
78881
|
+
return { range: range, newText: newText, annotationId: annotation };
|
|
78882
|
+
}
|
|
78883
|
+
AnnotatedTextEdit.replace = replace;
|
|
78884
|
+
/**
|
|
78885
|
+
* Creates an annotated insert text edit.
|
|
78886
|
+
*
|
|
78887
|
+
* @param position The position to insert the text at.
|
|
78888
|
+
* @param newText The text to be inserted.
|
|
78889
|
+
* @param annotation The annotation.
|
|
78890
|
+
*/
|
|
78891
|
+
function insert(position, newText, annotation) {
|
|
78892
|
+
return { range: { start: position, end: position }, newText: newText, annotationId: annotation };
|
|
78893
|
+
}
|
|
78894
|
+
AnnotatedTextEdit.insert = insert;
|
|
78895
|
+
/**
|
|
78896
|
+
* Creates an annotated delete text edit.
|
|
78897
|
+
*
|
|
78898
|
+
* @param range The range of text to be deleted.
|
|
78899
|
+
* @param annotation The annotation.
|
|
78900
|
+
*/
|
|
78901
|
+
function del(range, annotation) {
|
|
78902
|
+
return { range: range, newText: '', annotationId: annotation };
|
|
78903
|
+
}
|
|
78904
|
+
AnnotatedTextEdit.del = del;
|
|
78905
|
+
function is(value) {
|
|
78906
|
+
var candidate = value;
|
|
78907
|
+
return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78908
|
+
}
|
|
78909
|
+
AnnotatedTextEdit.is = is;
|
|
78910
|
+
})(AnnotatedTextEdit || (exports.AnnotatedTextEdit = AnnotatedTextEdit = {}));
|
|
78579
78911
|
/**
|
|
78580
|
-
*
|
|
78912
|
+
* The TextDocumentEdit namespace provides helper function to create
|
|
78913
|
+
* an edit that manipulates a text document.
|
|
78581
78914
|
*/
|
|
78582
|
-
|
|
78583
|
-
|
|
78584
|
-
|
|
78585
|
-
|
|
78586
|
-
|
|
78587
|
-
|
|
78588
|
-
|
|
78915
|
+
var TextDocumentEdit;
|
|
78916
|
+
(function (TextDocumentEdit) {
|
|
78917
|
+
/**
|
|
78918
|
+
* Creates a new `TextDocumentEdit`
|
|
78919
|
+
*/
|
|
78920
|
+
function create(textDocument, edits) {
|
|
78921
|
+
return { textDocument: textDocument, edits: edits };
|
|
78922
|
+
}
|
|
78923
|
+
TextDocumentEdit.create = create;
|
|
78924
|
+
function is(value) {
|
|
78925
|
+
var candidate = value;
|
|
78926
|
+
return Is.defined(candidate)
|
|
78927
|
+
&& OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)
|
|
78928
|
+
&& Array.isArray(candidate.edits);
|
|
78929
|
+
}
|
|
78930
|
+
TextDocumentEdit.is = is;
|
|
78931
|
+
})(TextDocumentEdit || (exports.TextDocumentEdit = TextDocumentEdit = {}));
|
|
78932
|
+
var CreateFile;
|
|
78933
|
+
(function (CreateFile) {
|
|
78934
|
+
function create(uri, options, annotation) {
|
|
78935
|
+
var result = {
|
|
78936
|
+
kind: 'create',
|
|
78937
|
+
uri: uri
|
|
78938
|
+
};
|
|
78939
|
+
if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
|
|
78940
|
+
result.options = options;
|
|
78941
|
+
}
|
|
78942
|
+
if (annotation !== undefined) {
|
|
78943
|
+
result.annotationId = annotation;
|
|
78944
|
+
}
|
|
78945
|
+
return result;
|
|
78946
|
+
}
|
|
78947
|
+
CreateFile.create = create;
|
|
78948
|
+
function is(value) {
|
|
78949
|
+
var candidate = value;
|
|
78950
|
+
return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||
|
|
78951
|
+
((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78952
|
+
}
|
|
78953
|
+
CreateFile.is = is;
|
|
78954
|
+
})(CreateFile || (exports.CreateFile = CreateFile = {}));
|
|
78955
|
+
var RenameFile;
|
|
78956
|
+
(function (RenameFile) {
|
|
78957
|
+
function create(oldUri, newUri, options, annotation) {
|
|
78958
|
+
var result = {
|
|
78959
|
+
kind: 'rename',
|
|
78960
|
+
oldUri: oldUri,
|
|
78961
|
+
newUri: newUri
|
|
78962
|
+
};
|
|
78963
|
+
if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
|
|
78964
|
+
result.options = options;
|
|
78965
|
+
}
|
|
78966
|
+
if (annotation !== undefined) {
|
|
78967
|
+
result.annotationId = annotation;
|
|
78968
|
+
}
|
|
78969
|
+
return result;
|
|
78589
78970
|
}
|
|
78590
|
-
|
|
78591
|
-
|
|
78971
|
+
RenameFile.create = create;
|
|
78972
|
+
function is(value) {
|
|
78973
|
+
var candidate = value;
|
|
78974
|
+
return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||
|
|
78975
|
+
((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78976
|
+
}
|
|
78977
|
+
RenameFile.is = is;
|
|
78978
|
+
})(RenameFile || (exports.RenameFile = RenameFile = {}));
|
|
78979
|
+
var DeleteFile;
|
|
78980
|
+
(function (DeleteFile) {
|
|
78981
|
+
function create(uri, options, annotation) {
|
|
78982
|
+
var result = {
|
|
78983
|
+
kind: 'delete',
|
|
78984
|
+
uri: uri
|
|
78985
|
+
};
|
|
78986
|
+
if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
|
|
78987
|
+
result.options = options;
|
|
78988
|
+
}
|
|
78989
|
+
if (annotation !== undefined) {
|
|
78990
|
+
result.annotationId = annotation;
|
|
78991
|
+
}
|
|
78992
|
+
return result;
|
|
78592
78993
|
}
|
|
78593
|
-
|
|
78594
|
-
|
|
78994
|
+
DeleteFile.create = create;
|
|
78995
|
+
function is(value) {
|
|
78996
|
+
var candidate = value;
|
|
78997
|
+
return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||
|
|
78998
|
+
((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78999
|
+
}
|
|
79000
|
+
DeleteFile.is = is;
|
|
79001
|
+
})(DeleteFile || (exports.DeleteFile = DeleteFile = {}));
|
|
79002
|
+
var WorkspaceEdit;
|
|
79003
|
+
(function (WorkspaceEdit) {
|
|
79004
|
+
function is(value) {
|
|
79005
|
+
var candidate = value;
|
|
79006
|
+
return candidate &&
|
|
79007
|
+
(candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
|
|
79008
|
+
(candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {
|
|
79009
|
+
if (Is.string(change.kind)) {
|
|
79010
|
+
return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
|
|
79011
|
+
}
|
|
79012
|
+
else {
|
|
79013
|
+
return TextDocumentEdit.is(change);
|
|
79014
|
+
}
|
|
79015
|
+
}));
|
|
78595
79016
|
}
|
|
78596
|
-
|
|
78597
|
-
|
|
79017
|
+
WorkspaceEdit.is = is;
|
|
79018
|
+
})(WorkspaceEdit || (exports.WorkspaceEdit = WorkspaceEdit = {}));
|
|
79019
|
+
var TextEditChangeImpl = /** @class */ (function () {
|
|
79020
|
+
function TextEditChangeImpl(edits, changeAnnotations) {
|
|
79021
|
+
this.edits = edits;
|
|
79022
|
+
this.changeAnnotations = changeAnnotations;
|
|
78598
79023
|
}
|
|
78599
|
-
|
|
78600
|
-
|
|
78601
|
-
|
|
79024
|
+
TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {
|
|
79025
|
+
var edit;
|
|
79026
|
+
var id;
|
|
79027
|
+
if (annotation === undefined) {
|
|
79028
|
+
edit = TextEdit.insert(position, newText);
|
|
79029
|
+
}
|
|
79030
|
+
else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
79031
|
+
id = annotation;
|
|
79032
|
+
edit = AnnotatedTextEdit.insert(position, newText, annotation);
|
|
79033
|
+
}
|
|
79034
|
+
else {
|
|
79035
|
+
this.assertChangeAnnotations(this.changeAnnotations);
|
|
79036
|
+
id = this.changeAnnotations.manage(annotation);
|
|
79037
|
+
edit = AnnotatedTextEdit.insert(position, newText, id);
|
|
79038
|
+
}
|
|
79039
|
+
this.edits.push(edit);
|
|
79040
|
+
if (id !== undefined) {
|
|
79041
|
+
return id;
|
|
79042
|
+
}
|
|
79043
|
+
};
|
|
79044
|
+
TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {
|
|
79045
|
+
var edit;
|
|
79046
|
+
var id;
|
|
79047
|
+
if (annotation === undefined) {
|
|
79048
|
+
edit = TextEdit.replace(range, newText);
|
|
79049
|
+
}
|
|
79050
|
+
else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
79051
|
+
id = annotation;
|
|
79052
|
+
edit = AnnotatedTextEdit.replace(range, newText, annotation);
|
|
79053
|
+
}
|
|
79054
|
+
else {
|
|
79055
|
+
this.assertChangeAnnotations(this.changeAnnotations);
|
|
79056
|
+
id = this.changeAnnotations.manage(annotation);
|
|
79057
|
+
edit = AnnotatedTextEdit.replace(range, newText, id);
|
|
79058
|
+
}
|
|
79059
|
+
this.edits.push(edit);
|
|
79060
|
+
if (id !== undefined) {
|
|
79061
|
+
return id;
|
|
79062
|
+
}
|
|
79063
|
+
};
|
|
79064
|
+
TextEditChangeImpl.prototype.delete = function (range, annotation) {
|
|
79065
|
+
var edit;
|
|
79066
|
+
var id;
|
|
79067
|
+
if (annotation === undefined) {
|
|
79068
|
+
edit = TextEdit.del(range);
|
|
79069
|
+
}
|
|
79070
|
+
else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
79071
|
+
id = annotation;
|
|
79072
|
+
edit = AnnotatedTextEdit.del(range, annotation);
|
|
79073
|
+
}
|
|
79074
|
+
else {
|
|
79075
|
+
this.assertChangeAnnotations(this.changeAnnotations);
|
|
79076
|
+
id = this.changeAnnotations.manage(annotation);
|
|
79077
|
+
edit = AnnotatedTextEdit.del(range, id);
|
|
79078
|
+
}
|
|
79079
|
+
this.edits.push(edit);
|
|
79080
|
+
if (id !== undefined) {
|
|
79081
|
+
return id;
|
|
79082
|
+
}
|
|
79083
|
+
};
|
|
79084
|
+
TextEditChangeImpl.prototype.add = function (edit) {
|
|
79085
|
+
this.edits.push(edit);
|
|
79086
|
+
};
|
|
79087
|
+
TextEditChangeImpl.prototype.all = function () {
|
|
79088
|
+
return this.edits;
|
|
79089
|
+
};
|
|
79090
|
+
TextEditChangeImpl.prototype.clear = function () {
|
|
79091
|
+
this.edits.splice(0, this.edits.length);
|
|
79092
|
+
};
|
|
79093
|
+
TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {
|
|
79094
|
+
if (value === undefined) {
|
|
79095
|
+
throw new Error("Text edit change is not configured to manage change annotations.");
|
|
79096
|
+
}
|
|
79097
|
+
};
|
|
79098
|
+
return TextEditChangeImpl;
|
|
79099
|
+
}());
|
|
78602
79100
|
/**
|
|
78603
|
-
*
|
|
79101
|
+
* A helper class
|
|
78604
79102
|
*/
|
|
78605
|
-
function
|
|
78606
|
-
|
|
78607
|
-
|
|
78608
|
-
|
|
78609
|
-
|
|
78610
|
-
|
|
78611
|
-
|
|
78612
|
-
|
|
78613
|
-
}
|
|
78614
|
-
|
|
78615
|
-
|
|
78616
|
-
|
|
78617
|
-
|
|
78618
|
-
|
|
78619
|
-
|
|
79103
|
+
var ChangeAnnotations = /** @class */ (function () {
|
|
79104
|
+
function ChangeAnnotations(annotations) {
|
|
79105
|
+
this._annotations = annotations === undefined ? Object.create(null) : annotations;
|
|
79106
|
+
this._counter = 0;
|
|
79107
|
+
this._size = 0;
|
|
79108
|
+
}
|
|
79109
|
+
ChangeAnnotations.prototype.all = function () {
|
|
79110
|
+
return this._annotations;
|
|
79111
|
+
};
|
|
79112
|
+
Object.defineProperty(ChangeAnnotations.prototype, "size", {
|
|
79113
|
+
get: function () {
|
|
79114
|
+
return this._size;
|
|
79115
|
+
},
|
|
79116
|
+
enumerable: false,
|
|
79117
|
+
configurable: true
|
|
79118
|
+
});
|
|
79119
|
+
ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {
|
|
79120
|
+
var id;
|
|
79121
|
+
if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
|
|
79122
|
+
id = idOrAnnotation;
|
|
79123
|
+
}
|
|
79124
|
+
else {
|
|
79125
|
+
id = this.nextId();
|
|
79126
|
+
annotation = idOrAnnotation;
|
|
79127
|
+
}
|
|
79128
|
+
if (this._annotations[id] !== undefined) {
|
|
79129
|
+
throw new Error("Id ".concat(id, " is already in use."));
|
|
79130
|
+
}
|
|
79131
|
+
if (annotation === undefined) {
|
|
79132
|
+
throw new Error("No annotation provided for id ".concat(id));
|
|
79133
|
+
}
|
|
79134
|
+
this._annotations[id] = annotation;
|
|
79135
|
+
this._size++;
|
|
79136
|
+
return id;
|
|
79137
|
+
};
|
|
79138
|
+
ChangeAnnotations.prototype.nextId = function () {
|
|
79139
|
+
this._counter++;
|
|
79140
|
+
return this._counter.toString();
|
|
79141
|
+
};
|
|
79142
|
+
return ChangeAnnotations;
|
|
79143
|
+
}());
|
|
78620
79144
|
/**
|
|
78621
|
-
*
|
|
79145
|
+
* A workspace change helps constructing changes to a workspace.
|
|
78622
79146
|
*/
|
|
78623
|
-
function
|
|
78624
|
-
|
|
78625
|
-
|
|
78626
|
-
|
|
79147
|
+
var WorkspaceChange = /** @class */ (function () {
|
|
79148
|
+
function WorkspaceChange(workspaceEdit) {
|
|
79149
|
+
var _this = this;
|
|
79150
|
+
this._textEditChanges = Object.create(null);
|
|
79151
|
+
if (workspaceEdit !== undefined) {
|
|
79152
|
+
this._workspaceEdit = workspaceEdit;
|
|
79153
|
+
if (workspaceEdit.documentChanges) {
|
|
79154
|
+
this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
|
|
79155
|
+
workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
79156
|
+
workspaceEdit.documentChanges.forEach(function (change) {
|
|
79157
|
+
if (TextDocumentEdit.is(change)) {
|
|
79158
|
+
var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
|
|
79159
|
+
_this._textEditChanges[change.textDocument.uri] = textEditChange;
|
|
79160
|
+
}
|
|
79161
|
+
});
|
|
79162
|
+
}
|
|
79163
|
+
else if (workspaceEdit.changes) {
|
|
79164
|
+
Object.keys(workspaceEdit.changes).forEach(function (key) {
|
|
79165
|
+
var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
|
|
79166
|
+
_this._textEditChanges[key] = textEditChange;
|
|
79167
|
+
});
|
|
79168
|
+
}
|
|
79169
|
+
}
|
|
79170
|
+
else {
|
|
79171
|
+
this._workspaceEdit = {};
|
|
79172
|
+
}
|
|
79173
|
+
}
|
|
79174
|
+
Object.defineProperty(WorkspaceChange.prototype, "edit", {
|
|
79175
|
+
/**
|
|
79176
|
+
* Returns the underlying {@link WorkspaceEdit} literal
|
|
79177
|
+
* use to be returned from a workspace edit operation like rename.
|
|
79178
|
+
*/
|
|
79179
|
+
get: function () {
|
|
79180
|
+
this.initDocumentChanges();
|
|
79181
|
+
if (this._changeAnnotations !== undefined) {
|
|
79182
|
+
if (this._changeAnnotations.size === 0) {
|
|
79183
|
+
this._workspaceEdit.changeAnnotations = undefined;
|
|
79184
|
+
}
|
|
79185
|
+
else {
|
|
79186
|
+
this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
79187
|
+
}
|
|
79188
|
+
}
|
|
79189
|
+
return this._workspaceEdit;
|
|
79190
|
+
},
|
|
79191
|
+
enumerable: false,
|
|
79192
|
+
configurable: true
|
|
79193
|
+
});
|
|
79194
|
+
WorkspaceChange.prototype.getTextEditChange = function (key) {
|
|
79195
|
+
if (OptionalVersionedTextDocumentIdentifier.is(key)) {
|
|
79196
|
+
this.initDocumentChanges();
|
|
79197
|
+
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79198
|
+
throw new Error('Workspace edit is not configured for document changes.');
|
|
79199
|
+
}
|
|
79200
|
+
var textDocument = { uri: key.uri, version: key.version };
|
|
79201
|
+
var result = this._textEditChanges[textDocument.uri];
|
|
79202
|
+
if (!result) {
|
|
79203
|
+
var edits = [];
|
|
79204
|
+
var textDocumentEdit = {
|
|
79205
|
+
textDocument: textDocument,
|
|
79206
|
+
edits: edits
|
|
79207
|
+
};
|
|
79208
|
+
this._workspaceEdit.documentChanges.push(textDocumentEdit);
|
|
79209
|
+
result = new TextEditChangeImpl(edits, this._changeAnnotations);
|
|
79210
|
+
this._textEditChanges[textDocument.uri] = result;
|
|
79211
|
+
}
|
|
79212
|
+
return result;
|
|
79213
|
+
}
|
|
79214
|
+
else {
|
|
79215
|
+
this.initChanges();
|
|
79216
|
+
if (this._workspaceEdit.changes === undefined) {
|
|
79217
|
+
throw new Error('Workspace edit is not configured for normal text edit changes.');
|
|
79218
|
+
}
|
|
79219
|
+
var result = this._textEditChanges[key];
|
|
79220
|
+
if (!result) {
|
|
79221
|
+
var edits = [];
|
|
79222
|
+
this._workspaceEdit.changes[key] = edits;
|
|
79223
|
+
result = new TextEditChangeImpl(edits);
|
|
79224
|
+
this._textEditChanges[key] = result;
|
|
79225
|
+
}
|
|
79226
|
+
return result;
|
|
79227
|
+
}
|
|
78627
79228
|
};
|
|
78628
|
-
|
|
78629
|
-
|
|
79229
|
+
WorkspaceChange.prototype.initDocumentChanges = function () {
|
|
79230
|
+
if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
|
|
79231
|
+
this._changeAnnotations = new ChangeAnnotations();
|
|
79232
|
+
this._workspaceEdit.documentChanges = [];
|
|
79233
|
+
this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
79234
|
+
}
|
|
79235
|
+
};
|
|
79236
|
+
WorkspaceChange.prototype.initChanges = function () {
|
|
79237
|
+
if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
|
|
79238
|
+
this._workspaceEdit.changes = Object.create(null);
|
|
79239
|
+
}
|
|
79240
|
+
};
|
|
79241
|
+
WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {
|
|
79242
|
+
this.initDocumentChanges();
|
|
79243
|
+
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79244
|
+
throw new Error('Workspace edit is not configured for document changes.');
|
|
79245
|
+
}
|
|
79246
|
+
var annotation;
|
|
79247
|
+
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
79248
|
+
annotation = optionsOrAnnotation;
|
|
79249
|
+
}
|
|
79250
|
+
else {
|
|
79251
|
+
options = optionsOrAnnotation;
|
|
79252
|
+
}
|
|
79253
|
+
var operation;
|
|
79254
|
+
var id;
|
|
79255
|
+
if (annotation === undefined) {
|
|
79256
|
+
operation = CreateFile.create(uri, options);
|
|
79257
|
+
}
|
|
79258
|
+
else {
|
|
79259
|
+
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
79260
|
+
operation = CreateFile.create(uri, options, id);
|
|
79261
|
+
}
|
|
79262
|
+
this._workspaceEdit.documentChanges.push(operation);
|
|
79263
|
+
if (id !== undefined) {
|
|
79264
|
+
return id;
|
|
79265
|
+
}
|
|
79266
|
+
};
|
|
79267
|
+
WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {
|
|
79268
|
+
this.initDocumentChanges();
|
|
79269
|
+
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79270
|
+
throw new Error('Workspace edit is not configured for document changes.');
|
|
79271
|
+
}
|
|
79272
|
+
var annotation;
|
|
79273
|
+
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
79274
|
+
annotation = optionsOrAnnotation;
|
|
79275
|
+
}
|
|
79276
|
+
else {
|
|
79277
|
+
options = optionsOrAnnotation;
|
|
79278
|
+
}
|
|
79279
|
+
var operation;
|
|
79280
|
+
var id;
|
|
79281
|
+
if (annotation === undefined) {
|
|
79282
|
+
operation = RenameFile.create(oldUri, newUri, options);
|
|
79283
|
+
}
|
|
79284
|
+
else {
|
|
79285
|
+
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
79286
|
+
operation = RenameFile.create(oldUri, newUri, options, id);
|
|
79287
|
+
}
|
|
79288
|
+
this._workspaceEdit.documentChanges.push(operation);
|
|
79289
|
+
if (id !== undefined) {
|
|
79290
|
+
return id;
|
|
79291
|
+
}
|
|
79292
|
+
};
|
|
79293
|
+
WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {
|
|
79294
|
+
this.initDocumentChanges();
|
|
79295
|
+
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79296
|
+
throw new Error('Workspace edit is not configured for document changes.');
|
|
79297
|
+
}
|
|
79298
|
+
var annotation;
|
|
79299
|
+
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
79300
|
+
annotation = optionsOrAnnotation;
|
|
79301
|
+
}
|
|
79302
|
+
else {
|
|
79303
|
+
options = optionsOrAnnotation;
|
|
79304
|
+
}
|
|
79305
|
+
var operation;
|
|
79306
|
+
var id;
|
|
79307
|
+
if (annotation === undefined) {
|
|
79308
|
+
operation = DeleteFile.create(uri, options);
|
|
79309
|
+
}
|
|
79310
|
+
else {
|
|
79311
|
+
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
79312
|
+
operation = DeleteFile.create(uri, options, id);
|
|
79313
|
+
}
|
|
79314
|
+
this._workspaceEdit.documentChanges.push(operation);
|
|
79315
|
+
if (id !== undefined) {
|
|
79316
|
+
return id;
|
|
79317
|
+
}
|
|
79318
|
+
};
|
|
79319
|
+
return WorkspaceChange;
|
|
79320
|
+
}());
|
|
79321
|
+
exports.WorkspaceChange = WorkspaceChange;
|
|
78630
79322
|
/**
|
|
78631
|
-
*
|
|
79323
|
+
* The TextDocumentIdentifier namespace provides helper functions to work with
|
|
79324
|
+
* {@link TextDocumentIdentifier} literals.
|
|
78632
79325
|
*/
|
|
78633
|
-
|
|
78634
|
-
|
|
78635
|
-
|
|
78636
|
-
|
|
78637
|
-
|
|
78638
|
-
|
|
78639
|
-
|
|
78640
|
-
|
|
78641
|
-
|
|
78642
|
-
|
|
78643
|
-
|
|
79326
|
+
var TextDocumentIdentifier;
|
|
79327
|
+
(function (TextDocumentIdentifier) {
|
|
79328
|
+
/**
|
|
79329
|
+
* Creates a new TextDocumentIdentifier literal.
|
|
79330
|
+
* @param uri The document's uri.
|
|
79331
|
+
*/
|
|
79332
|
+
function create(uri) {
|
|
79333
|
+
return { uri: uri };
|
|
79334
|
+
}
|
|
79335
|
+
TextDocumentIdentifier.create = create;
|
|
79336
|
+
/**
|
|
79337
|
+
* Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface.
|
|
79338
|
+
*/
|
|
79339
|
+
function is(value) {
|
|
79340
|
+
var candidate = value;
|
|
79341
|
+
return Is.defined(candidate) && Is.string(candidate.uri);
|
|
79342
|
+
}
|
|
79343
|
+
TextDocumentIdentifier.is = is;
|
|
79344
|
+
})(TextDocumentIdentifier || (exports.TextDocumentIdentifier = TextDocumentIdentifier = {}));
|
|
79345
|
+
/**
|
|
79346
|
+
* The VersionedTextDocumentIdentifier namespace provides helper functions to work with
|
|
79347
|
+
* {@link VersionedTextDocumentIdentifier} literals.
|
|
79348
|
+
*/
|
|
79349
|
+
var VersionedTextDocumentIdentifier;
|
|
79350
|
+
(function (VersionedTextDocumentIdentifier) {
|
|
79351
|
+
/**
|
|
79352
|
+
* Creates a new VersionedTextDocumentIdentifier literal.
|
|
79353
|
+
* @param uri The document's uri.
|
|
79354
|
+
* @param version The document's version.
|
|
79355
|
+
*/
|
|
79356
|
+
function create(uri, version) {
|
|
79357
|
+
return { uri: uri, version: version };
|
|
79358
|
+
}
|
|
79359
|
+
VersionedTextDocumentIdentifier.create = create;
|
|
79360
|
+
/**
|
|
79361
|
+
* Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface.
|
|
79362
|
+
*/
|
|
79363
|
+
function is(value) {
|
|
79364
|
+
var candidate = value;
|
|
79365
|
+
return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
|
|
79366
|
+
}
|
|
79367
|
+
VersionedTextDocumentIdentifier.is = is;
|
|
79368
|
+
})(VersionedTextDocumentIdentifier || (exports.VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier = {}));
|
|
78644
79369
|
/**
|
|
78645
|
-
*
|
|
79370
|
+
* The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with
|
|
79371
|
+
* {@link OptionalVersionedTextDocumentIdentifier} literals.
|
|
78646
79372
|
*/
|
|
78647
|
-
|
|
79373
|
+
var OptionalVersionedTextDocumentIdentifier;
|
|
79374
|
+
(function (OptionalVersionedTextDocumentIdentifier) {
|
|
79375
|
+
/**
|
|
79376
|
+
* Creates a new OptionalVersionedTextDocumentIdentifier literal.
|
|
79377
|
+
* @param uri The document's uri.
|
|
79378
|
+
* @param version The document's version.
|
|
79379
|
+
*/
|
|
79380
|
+
function create(uri, version) {
|
|
79381
|
+
return { uri: uri, version: version };
|
|
79382
|
+
}
|
|
79383
|
+
OptionalVersionedTextDocumentIdentifier.create = create;
|
|
79384
|
+
/**
|
|
79385
|
+
* Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface.
|
|
79386
|
+
*/
|
|
79387
|
+
function is(value) {
|
|
79388
|
+
var candidate = value;
|
|
79389
|
+
return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
|
|
79390
|
+
}
|
|
79391
|
+
OptionalVersionedTextDocumentIdentifier.is = is;
|
|
79392
|
+
})(OptionalVersionedTextDocumentIdentifier || (exports.OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier = {}));
|
|
78648
79393
|
/**
|
|
78649
|
-
*
|
|
79394
|
+
* The TextDocumentItem namespace provides helper functions to work with
|
|
79395
|
+
* {@link TextDocumentItem} literals.
|
|
78650
79396
|
*/
|
|
78651
|
-
|
|
79397
|
+
var TextDocumentItem;
|
|
79398
|
+
(function (TextDocumentItem) {
|
|
79399
|
+
/**
|
|
79400
|
+
* Creates a new TextDocumentItem literal.
|
|
79401
|
+
* @param uri The document's uri.
|
|
79402
|
+
* @param languageId The document's language identifier.
|
|
79403
|
+
* @param version The document's version number.
|
|
79404
|
+
* @param text The document's text.
|
|
79405
|
+
*/
|
|
79406
|
+
function create(uri, languageId, version, text) {
|
|
79407
|
+
return { uri: uri, languageId: languageId, version: version, text: text };
|
|
79408
|
+
}
|
|
79409
|
+
TextDocumentItem.create = create;
|
|
79410
|
+
/**
|
|
79411
|
+
* Checks whether the given literal conforms to the {@link TextDocumentItem} interface.
|
|
79412
|
+
*/
|
|
79413
|
+
function is(value) {
|
|
79414
|
+
var candidate = value;
|
|
79415
|
+
return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
|
|
79416
|
+
}
|
|
79417
|
+
TextDocumentItem.is = is;
|
|
79418
|
+
})(TextDocumentItem || (exports.TextDocumentItem = TextDocumentItem = {}));
|
|
78652
79419
|
/**
|
|
78653
|
-
*
|
|
79420
|
+
* Describes the content type that a client supports in various
|
|
79421
|
+
* result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
|
|
79422
|
+
*
|
|
79423
|
+
* Please note that `MarkupKinds` must not start with a `$`. This kinds
|
|
79424
|
+
* are reserved for internal usage.
|
|
78654
79425
|
*/
|
|
78655
|
-
|
|
79426
|
+
var MarkupKind;
|
|
79427
|
+
(function (MarkupKind) {
|
|
79428
|
+
/**
|
|
79429
|
+
* Plain text is supported as a content format
|
|
79430
|
+
*/
|
|
79431
|
+
MarkupKind.PlainText = 'plaintext';
|
|
79432
|
+
/**
|
|
79433
|
+
* Markdown is supported as a content format
|
|
79434
|
+
*/
|
|
79435
|
+
MarkupKind.Markdown = 'markdown';
|
|
79436
|
+
/**
|
|
79437
|
+
* Checks whether the given value is a value of the {@link MarkupKind} type.
|
|
79438
|
+
*/
|
|
79439
|
+
function is(value) {
|
|
79440
|
+
var candidate = value;
|
|
79441
|
+
return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
|
|
79442
|
+
}
|
|
79443
|
+
MarkupKind.is = is;
|
|
79444
|
+
})(MarkupKind || (exports.MarkupKind = MarkupKind = {}));
|
|
79445
|
+
var MarkupContent;
|
|
79446
|
+
(function (MarkupContent) {
|
|
79447
|
+
/**
|
|
79448
|
+
* Checks whether the given value conforms to the {@link MarkupContent} interface.
|
|
79449
|
+
*/
|
|
79450
|
+
function is(value) {
|
|
79451
|
+
var candidate = value;
|
|
79452
|
+
return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
|
|
79453
|
+
}
|
|
79454
|
+
MarkupContent.is = is;
|
|
79455
|
+
})(MarkupContent || (exports.MarkupContent = MarkupContent = {}));
|
|
78656
79456
|
/**
|
|
78657
|
-
*
|
|
79457
|
+
* The kind of a completion entry.
|
|
78658
79458
|
*/
|
|
78659
|
-
|
|
78660
|
-
|
|
78661
|
-
|
|
78662
|
-
|
|
78663
|
-
|
|
78664
|
-
|
|
78665
|
-
|
|
78666
|
-
|
|
78667
|
-
|
|
79459
|
+
var CompletionItemKind;
|
|
79460
|
+
(function (CompletionItemKind) {
|
|
79461
|
+
CompletionItemKind.Text = 1;
|
|
79462
|
+
CompletionItemKind.Method = 2;
|
|
79463
|
+
CompletionItemKind.Function = 3;
|
|
79464
|
+
CompletionItemKind.Constructor = 4;
|
|
79465
|
+
CompletionItemKind.Field = 5;
|
|
79466
|
+
CompletionItemKind.Variable = 6;
|
|
79467
|
+
CompletionItemKind.Class = 7;
|
|
79468
|
+
CompletionItemKind.Interface = 8;
|
|
79469
|
+
CompletionItemKind.Module = 9;
|
|
79470
|
+
CompletionItemKind.Property = 10;
|
|
79471
|
+
CompletionItemKind.Unit = 11;
|
|
79472
|
+
CompletionItemKind.Value = 12;
|
|
79473
|
+
CompletionItemKind.Enum = 13;
|
|
79474
|
+
CompletionItemKind.Keyword = 14;
|
|
79475
|
+
CompletionItemKind.Snippet = 15;
|
|
79476
|
+
CompletionItemKind.Color = 16;
|
|
79477
|
+
CompletionItemKind.File = 17;
|
|
79478
|
+
CompletionItemKind.Reference = 18;
|
|
79479
|
+
CompletionItemKind.Folder = 19;
|
|
79480
|
+
CompletionItemKind.EnumMember = 20;
|
|
79481
|
+
CompletionItemKind.Constant = 21;
|
|
79482
|
+
CompletionItemKind.Struct = 22;
|
|
79483
|
+
CompletionItemKind.Event = 23;
|
|
79484
|
+
CompletionItemKind.Operator = 24;
|
|
79485
|
+
CompletionItemKind.TypeParameter = 25;
|
|
79486
|
+
})(CompletionItemKind || (exports.CompletionItemKind = CompletionItemKind = {}));
|
|
78668
79487
|
/**
|
|
78669
|
-
*
|
|
78670
|
-
*
|
|
78671
|
-
* Clients are allowed to render diagnostics with this tag faded out instead of having
|
|
78672
|
-
* an error squiggle.
|
|
79488
|
+
* Defines whether the insert text in a completion item should be interpreted as
|
|
79489
|
+
* plain text or a snippet.
|
|
78673
79490
|
*/
|
|
78674
|
-
|
|
79491
|
+
var InsertTextFormat;
|
|
79492
|
+
(function (InsertTextFormat) {
|
|
79493
|
+
/**
|
|
79494
|
+
* The primary text to be inserted is treated as a plain string.
|
|
79495
|
+
*/
|
|
79496
|
+
InsertTextFormat.PlainText = 1;
|
|
79497
|
+
/**
|
|
79498
|
+
* The primary text to be inserted is treated as a snippet.
|
|
79499
|
+
*
|
|
79500
|
+
* A snippet can define tab stops and placeholders with `$1`, `$2`
|
|
79501
|
+
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
|
|
79502
|
+
* the end of the snippet. Placeholders with equal identifiers are linked,
|
|
79503
|
+
* that is typing in one will update others too.
|
|
79504
|
+
*
|
|
79505
|
+
* See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
|
|
79506
|
+
*/
|
|
79507
|
+
InsertTextFormat.Snippet = 2;
|
|
79508
|
+
})(InsertTextFormat || (exports.InsertTextFormat = InsertTextFormat = {}));
|
|
78675
79509
|
/**
|
|
78676
|
-
*
|
|
79510
|
+
* Completion item tags are extra annotations that tweak the rendering of a completion
|
|
79511
|
+
* item.
|
|
78677
79512
|
*
|
|
78678
|
-
*
|
|
79513
|
+
* @since 3.15.0
|
|
78679
79514
|
*/
|
|
78680
|
-
|
|
78681
|
-
|
|
78682
|
-
/**
|
|
78683
|
-
|
|
78684
|
-
|
|
78685
|
-
|
|
78686
|
-
|
|
78687
|
-
var CodeDescription;
|
|
78688
|
-
(function (CodeDescription) {
|
|
78689
|
-
function is(value) {
|
|
78690
|
-
var candidate = value;
|
|
78691
|
-
return Is.objectLiteral(candidate) && Is.string(candidate.href);
|
|
78692
|
-
}
|
|
78693
|
-
CodeDescription.is = is;
|
|
78694
|
-
})(CodeDescription || (CodeDescription = {}));
|
|
78695
|
-
/**
|
|
78696
|
-
* The Diagnostic namespace provides helper functions to work with
|
|
78697
|
-
* {@link Diagnostic} literals.
|
|
78698
|
-
*/
|
|
78699
|
-
var Diagnostic;
|
|
78700
|
-
(function (Diagnostic) {
|
|
79515
|
+
var CompletionItemTag;
|
|
79516
|
+
(function (CompletionItemTag) {
|
|
79517
|
+
/**
|
|
79518
|
+
* Render a completion as obsolete, usually using a strike-out.
|
|
79519
|
+
*/
|
|
79520
|
+
CompletionItemTag.Deprecated = 1;
|
|
79521
|
+
})(CompletionItemTag || (exports.CompletionItemTag = CompletionItemTag = {}));
|
|
78701
79522
|
/**
|
|
78702
|
-
*
|
|
79523
|
+
* The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
|
|
79524
|
+
*
|
|
79525
|
+
* @since 3.16.0
|
|
78703
79526
|
*/
|
|
78704
|
-
|
|
78705
|
-
|
|
78706
|
-
|
|
78707
|
-
|
|
78708
|
-
|
|
78709
|
-
|
|
78710
|
-
|
|
78711
|
-
}
|
|
78712
|
-
if (Is.defined(source)) {
|
|
78713
|
-
result.source = source;
|
|
79527
|
+
var InsertReplaceEdit;
|
|
79528
|
+
(function (InsertReplaceEdit) {
|
|
79529
|
+
/**
|
|
79530
|
+
* Creates a new insert / replace edit
|
|
79531
|
+
*/
|
|
79532
|
+
function create(newText, insert, replace) {
|
|
79533
|
+
return { newText: newText, insert: insert, replace: replace };
|
|
78714
79534
|
}
|
|
78715
|
-
|
|
78716
|
-
|
|
79535
|
+
InsertReplaceEdit.create = create;
|
|
79536
|
+
/**
|
|
79537
|
+
* Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface.
|
|
79538
|
+
*/
|
|
79539
|
+
function is(value) {
|
|
79540
|
+
var candidate = value;
|
|
79541
|
+
return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
|
|
78717
79542
|
}
|
|
78718
|
-
|
|
78719
|
-
}
|
|
78720
|
-
Diagnostic.create = create;
|
|
79543
|
+
InsertReplaceEdit.is = is;
|
|
79544
|
+
})(InsertReplaceEdit || (exports.InsertReplaceEdit = InsertReplaceEdit = {}));
|
|
78721
79545
|
/**
|
|
78722
|
-
*
|
|
79546
|
+
* How whitespace and indentation is handled during completion
|
|
79547
|
+
* item insertion.
|
|
79548
|
+
*
|
|
79549
|
+
* @since 3.16.0
|
|
78723
79550
|
*/
|
|
78724
|
-
|
|
78725
|
-
|
|
78726
|
-
|
|
78727
|
-
|
|
78728
|
-
|
|
78729
|
-
|
|
78730
|
-
|
|
78731
|
-
|
|
78732
|
-
|
|
78733
|
-
|
|
78734
|
-
|
|
78735
|
-
|
|
78736
|
-
|
|
78737
|
-
|
|
78738
|
-
|
|
78739
|
-
|
|
78740
|
-
|
|
78741
|
-
|
|
78742
|
-
|
|
78743
|
-
|
|
79551
|
+
var InsertTextMode;
|
|
79552
|
+
(function (InsertTextMode) {
|
|
79553
|
+
/**
|
|
79554
|
+
* The insertion or replace strings is taken as it is. If the
|
|
79555
|
+
* value is multi line the lines below the cursor will be
|
|
79556
|
+
* inserted using the indentation defined in the string value.
|
|
79557
|
+
* The client will not apply any kind of adjustments to the
|
|
79558
|
+
* string.
|
|
79559
|
+
*/
|
|
79560
|
+
InsertTextMode.asIs = 1;
|
|
79561
|
+
/**
|
|
79562
|
+
* The editor adjusts leading whitespace of new lines so that
|
|
79563
|
+
* they match the indentation up to the cursor of the line for
|
|
79564
|
+
* which the item is accepted.
|
|
79565
|
+
*
|
|
79566
|
+
* Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
|
|
79567
|
+
* multi line completion item is indented using 2 tabs and all
|
|
79568
|
+
* following lines inserted will be indented using 2 tabs as well.
|
|
79569
|
+
*/
|
|
79570
|
+
InsertTextMode.adjustIndentation = 2;
|
|
79571
|
+
})(InsertTextMode || (exports.InsertTextMode = InsertTextMode = {}));
|
|
79572
|
+
var CompletionItemLabelDetails;
|
|
79573
|
+
(function (CompletionItemLabelDetails) {
|
|
79574
|
+
function is(value) {
|
|
79575
|
+
var candidate = value;
|
|
79576
|
+
return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) &&
|
|
79577
|
+
(Is.string(candidate.description) || candidate.description === undefined);
|
|
79578
|
+
}
|
|
79579
|
+
CompletionItemLabelDetails.is = is;
|
|
79580
|
+
})(CompletionItemLabelDetails || (exports.CompletionItemLabelDetails = CompletionItemLabelDetails = {}));
|
|
78744
79581
|
/**
|
|
78745
|
-
*
|
|
79582
|
+
* The CompletionItem namespace provides functions to deal with
|
|
79583
|
+
* completion items.
|
|
78746
79584
|
*/
|
|
78747
|
-
|
|
78748
|
-
|
|
78749
|
-
|
|
78750
|
-
|
|
79585
|
+
var CompletionItem;
|
|
79586
|
+
(function (CompletionItem) {
|
|
79587
|
+
/**
|
|
79588
|
+
* Create a completion item and seed it with a label.
|
|
79589
|
+
* @param label The completion item's label
|
|
79590
|
+
*/
|
|
79591
|
+
function create(label) {
|
|
79592
|
+
return { label: label };
|
|
78751
79593
|
}
|
|
78752
|
-
|
|
78753
|
-
|
|
78754
|
-
|
|
79594
|
+
CompletionItem.create = create;
|
|
79595
|
+
})(CompletionItem || (exports.CompletionItem = CompletionItem = {}));
|
|
79596
|
+
/**
|
|
79597
|
+
* The CompletionList namespace provides functions to deal with
|
|
79598
|
+
* completion lists.
|
|
79599
|
+
*/
|
|
79600
|
+
var CompletionList;
|
|
79601
|
+
(function (CompletionList) {
|
|
79602
|
+
/**
|
|
79603
|
+
* Creates a new completion list.
|
|
79604
|
+
*
|
|
79605
|
+
* @param items The completion items.
|
|
79606
|
+
* @param isIncomplete The list is not complete.
|
|
79607
|
+
*/
|
|
79608
|
+
function create(items, isIncomplete) {
|
|
79609
|
+
return { items: items ? items : [], isIncomplete: !!isIncomplete };
|
|
78755
79610
|
}
|
|
78756
|
-
|
|
78757
|
-
}
|
|
78758
|
-
|
|
79611
|
+
CompletionList.create = create;
|
|
79612
|
+
})(CompletionList || (exports.CompletionList = CompletionList = {}));
|
|
79613
|
+
var MarkedString;
|
|
79614
|
+
(function (MarkedString) {
|
|
79615
|
+
/**
|
|
79616
|
+
* Creates a marked string from plain text.
|
|
79617
|
+
*
|
|
79618
|
+
* @param plainText The plain text.
|
|
79619
|
+
*/
|
|
79620
|
+
function fromPlainText(plainText) {
|
|
79621
|
+
return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
|
|
79622
|
+
}
|
|
79623
|
+
MarkedString.fromPlainText = fromPlainText;
|
|
79624
|
+
/**
|
|
79625
|
+
* Checks whether the given value conforms to the {@link MarkedString} type.
|
|
79626
|
+
*/
|
|
79627
|
+
function is(value) {
|
|
79628
|
+
var candidate = value;
|
|
79629
|
+
return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
|
|
79630
|
+
}
|
|
79631
|
+
MarkedString.is = is;
|
|
79632
|
+
})(MarkedString || (exports.MarkedString = MarkedString = {}));
|
|
79633
|
+
var Hover;
|
|
79634
|
+
(function (Hover) {
|
|
79635
|
+
/**
|
|
79636
|
+
* Checks whether the given value conforms to the {@link Hover} interface.
|
|
79637
|
+
*/
|
|
79638
|
+
function is(value) {
|
|
79639
|
+
var candidate = value;
|
|
79640
|
+
return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
|
|
79641
|
+
MarkedString.is(candidate.contents) ||
|
|
79642
|
+
Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
|
|
79643
|
+
}
|
|
79644
|
+
Hover.is = is;
|
|
79645
|
+
})(Hover || (exports.Hover = Hover = {}));
|
|
78759
79646
|
/**
|
|
78760
|
-
*
|
|
79647
|
+
* The ParameterInformation namespace provides helper functions to work with
|
|
79648
|
+
* {@link ParameterInformation} literals.
|
|
78761
79649
|
*/
|
|
78762
|
-
|
|
78763
|
-
|
|
78764
|
-
|
|
78765
|
-
|
|
78766
|
-
|
|
78767
|
-
|
|
78768
|
-
|
|
78769
|
-
|
|
78770
|
-
|
|
78771
|
-
|
|
78772
|
-
|
|
78773
|
-
|
|
79650
|
+
var ParameterInformation;
|
|
79651
|
+
(function (ParameterInformation) {
|
|
79652
|
+
/**
|
|
79653
|
+
* Creates a new parameter information literal.
|
|
79654
|
+
*
|
|
79655
|
+
* @param label A label string.
|
|
79656
|
+
* @param documentation A doc string.
|
|
79657
|
+
*/
|
|
79658
|
+
function create(label, documentation) {
|
|
79659
|
+
return documentation ? { label: label, documentation: documentation } : { label: label };
|
|
79660
|
+
}
|
|
79661
|
+
ParameterInformation.create = create;
|
|
79662
|
+
})(ParameterInformation || (exports.ParameterInformation = ParameterInformation = {}));
|
|
78774
79663
|
/**
|
|
78775
|
-
*
|
|
78776
|
-
* @
|
|
78777
|
-
* @param newText The new text.
|
|
79664
|
+
* The SignatureInformation namespace provides helper functions to work with
|
|
79665
|
+
* {@link SignatureInformation} literals.
|
|
78778
79666
|
*/
|
|
78779
|
-
|
|
78780
|
-
|
|
78781
|
-
|
|
78782
|
-
|
|
79667
|
+
var SignatureInformation;
|
|
79668
|
+
(function (SignatureInformation) {
|
|
79669
|
+
function create(label, documentation) {
|
|
79670
|
+
var parameters = [];
|
|
79671
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
79672
|
+
parameters[_i - 2] = arguments[_i];
|
|
79673
|
+
}
|
|
79674
|
+
var result = { label: label };
|
|
79675
|
+
if (Is.defined(documentation)) {
|
|
79676
|
+
result.documentation = documentation;
|
|
79677
|
+
}
|
|
79678
|
+
if (Is.defined(parameters)) {
|
|
79679
|
+
result.parameters = parameters;
|
|
79680
|
+
}
|
|
79681
|
+
else {
|
|
79682
|
+
result.parameters = [];
|
|
79683
|
+
}
|
|
79684
|
+
return result;
|
|
79685
|
+
}
|
|
79686
|
+
SignatureInformation.create = create;
|
|
79687
|
+
})(SignatureInformation || (exports.SignatureInformation = SignatureInformation = {}));
|
|
78783
79688
|
/**
|
|
78784
|
-
*
|
|
78785
|
-
* @param position The position to insert the text at.
|
|
78786
|
-
* @param newText The text to be inserted.
|
|
79689
|
+
* A document highlight kind.
|
|
78787
79690
|
*/
|
|
78788
|
-
|
|
78789
|
-
|
|
78790
|
-
|
|
78791
|
-
|
|
79691
|
+
var DocumentHighlightKind;
|
|
79692
|
+
(function (DocumentHighlightKind) {
|
|
79693
|
+
/**
|
|
79694
|
+
* A textual occurrence.
|
|
79695
|
+
*/
|
|
79696
|
+
DocumentHighlightKind.Text = 1;
|
|
79697
|
+
/**
|
|
79698
|
+
* Read-access of a symbol, like reading a variable.
|
|
79699
|
+
*/
|
|
79700
|
+
DocumentHighlightKind.Read = 2;
|
|
79701
|
+
/**
|
|
79702
|
+
* Write-access of a symbol, like writing to a variable.
|
|
79703
|
+
*/
|
|
79704
|
+
DocumentHighlightKind.Write = 3;
|
|
79705
|
+
})(DocumentHighlightKind || (exports.DocumentHighlightKind = DocumentHighlightKind = {}));
|
|
78792
79706
|
/**
|
|
78793
|
-
*
|
|
78794
|
-
* @
|
|
79707
|
+
* DocumentHighlight namespace to provide helper functions to work with
|
|
79708
|
+
* {@link DocumentHighlight} literals.
|
|
78795
79709
|
*/
|
|
78796
|
-
|
|
78797
|
-
|
|
78798
|
-
|
|
78799
|
-
|
|
78800
|
-
|
|
78801
|
-
|
|
78802
|
-
|
|
78803
|
-
|
|
78804
|
-
|
|
78805
|
-
|
|
78806
|
-
|
|
78807
|
-
}
|
|
78808
|
-
|
|
78809
|
-
(function (ChangeAnnotation) {
|
|
78810
|
-
function create(label, needsConfirmation, description) {
|
|
78811
|
-
var result = { label: label };
|
|
78812
|
-
if (needsConfirmation !== undefined) {
|
|
78813
|
-
result.needsConfirmation = needsConfirmation;
|
|
78814
|
-
}
|
|
78815
|
-
if (description !== undefined) {
|
|
78816
|
-
result.description = description;
|
|
79710
|
+
var DocumentHighlight;
|
|
79711
|
+
(function (DocumentHighlight) {
|
|
79712
|
+
/**
|
|
79713
|
+
* Create a DocumentHighlight object.
|
|
79714
|
+
* @param range The range the highlight applies to.
|
|
79715
|
+
* @param kind The highlight kind
|
|
79716
|
+
*/
|
|
79717
|
+
function create(range, kind) {
|
|
79718
|
+
var result = { range: range };
|
|
79719
|
+
if (Is.number(kind)) {
|
|
79720
|
+
result.kind = kind;
|
|
79721
|
+
}
|
|
79722
|
+
return result;
|
|
78817
79723
|
}
|
|
78818
|
-
|
|
78819
|
-
}
|
|
78820
|
-
ChangeAnnotation.create = create;
|
|
78821
|
-
function is(value) {
|
|
78822
|
-
var candidate = value;
|
|
78823
|
-
return Is.objectLiteral(candidate) && Is.string(candidate.label) &&
|
|
78824
|
-
(Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&
|
|
78825
|
-
(Is.string(candidate.description) || candidate.description === undefined);
|
|
78826
|
-
}
|
|
78827
|
-
ChangeAnnotation.is = is;
|
|
78828
|
-
})(ChangeAnnotation || (ChangeAnnotation = {}));
|
|
78829
|
-
var ChangeAnnotationIdentifier;
|
|
78830
|
-
(function (ChangeAnnotationIdentifier) {
|
|
78831
|
-
function is(value) {
|
|
78832
|
-
var candidate = value;
|
|
78833
|
-
return Is.string(candidate);
|
|
78834
|
-
}
|
|
78835
|
-
ChangeAnnotationIdentifier.is = is;
|
|
78836
|
-
})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));
|
|
78837
|
-
var AnnotatedTextEdit;
|
|
78838
|
-
(function (AnnotatedTextEdit) {
|
|
79724
|
+
DocumentHighlight.create = create;
|
|
79725
|
+
})(DocumentHighlight || (exports.DocumentHighlight = DocumentHighlight = {}));
|
|
78839
79726
|
/**
|
|
78840
|
-
*
|
|
78841
|
-
*
|
|
78842
|
-
* @param range The range of text to be replaced.
|
|
78843
|
-
* @param newText The new text.
|
|
78844
|
-
* @param annotation The annotation.
|
|
79727
|
+
* A symbol kind.
|
|
78845
79728
|
*/
|
|
78846
|
-
|
|
78847
|
-
|
|
78848
|
-
|
|
78849
|
-
|
|
79729
|
+
var SymbolKind;
|
|
79730
|
+
(function (SymbolKind) {
|
|
79731
|
+
SymbolKind.File = 1;
|
|
79732
|
+
SymbolKind.Module = 2;
|
|
79733
|
+
SymbolKind.Namespace = 3;
|
|
79734
|
+
SymbolKind.Package = 4;
|
|
79735
|
+
SymbolKind.Class = 5;
|
|
79736
|
+
SymbolKind.Method = 6;
|
|
79737
|
+
SymbolKind.Property = 7;
|
|
79738
|
+
SymbolKind.Field = 8;
|
|
79739
|
+
SymbolKind.Constructor = 9;
|
|
79740
|
+
SymbolKind.Enum = 10;
|
|
79741
|
+
SymbolKind.Interface = 11;
|
|
79742
|
+
SymbolKind.Function = 12;
|
|
79743
|
+
SymbolKind.Variable = 13;
|
|
79744
|
+
SymbolKind.Constant = 14;
|
|
79745
|
+
SymbolKind.String = 15;
|
|
79746
|
+
SymbolKind.Number = 16;
|
|
79747
|
+
SymbolKind.Boolean = 17;
|
|
79748
|
+
SymbolKind.Array = 18;
|
|
79749
|
+
SymbolKind.Object = 19;
|
|
79750
|
+
SymbolKind.Key = 20;
|
|
79751
|
+
SymbolKind.Null = 21;
|
|
79752
|
+
SymbolKind.EnumMember = 22;
|
|
79753
|
+
SymbolKind.Struct = 23;
|
|
79754
|
+
SymbolKind.Event = 24;
|
|
79755
|
+
SymbolKind.Operator = 25;
|
|
79756
|
+
SymbolKind.TypeParameter = 26;
|
|
79757
|
+
})(SymbolKind || (exports.SymbolKind = SymbolKind = {}));
|
|
78850
79758
|
/**
|
|
78851
|
-
*
|
|
79759
|
+
* Symbol tags are extra annotations that tweak the rendering of a symbol.
|
|
78852
79760
|
*
|
|
78853
|
-
* @
|
|
78854
|
-
* @param newText The text to be inserted.
|
|
78855
|
-
* @param annotation The annotation.
|
|
79761
|
+
* @since 3.16
|
|
78856
79762
|
*/
|
|
78857
|
-
|
|
78858
|
-
|
|
78859
|
-
|
|
78860
|
-
|
|
79763
|
+
var SymbolTag;
|
|
79764
|
+
(function (SymbolTag) {
|
|
79765
|
+
/**
|
|
79766
|
+
* Render a symbol as obsolete, usually using a strike-out.
|
|
79767
|
+
*/
|
|
79768
|
+
SymbolTag.Deprecated = 1;
|
|
79769
|
+
})(SymbolTag || (exports.SymbolTag = SymbolTag = {}));
|
|
79770
|
+
var SymbolInformation;
|
|
79771
|
+
(function (SymbolInformation) {
|
|
79772
|
+
/**
|
|
79773
|
+
* Creates a new symbol information literal.
|
|
79774
|
+
*
|
|
79775
|
+
* @param name The name of the symbol.
|
|
79776
|
+
* @param kind The kind of the symbol.
|
|
79777
|
+
* @param range The range of the location of the symbol.
|
|
79778
|
+
* @param uri The resource of the location of symbol.
|
|
79779
|
+
* @param containerName The name of the symbol containing the symbol.
|
|
79780
|
+
*/
|
|
79781
|
+
function create(name, kind, range, uri, containerName) {
|
|
79782
|
+
var result = {
|
|
79783
|
+
name: name,
|
|
79784
|
+
kind: kind,
|
|
79785
|
+
location: { uri: uri, range: range }
|
|
79786
|
+
};
|
|
79787
|
+
if (containerName) {
|
|
79788
|
+
result.containerName = containerName;
|
|
79789
|
+
}
|
|
79790
|
+
return result;
|
|
79791
|
+
}
|
|
79792
|
+
SymbolInformation.create = create;
|
|
79793
|
+
})(SymbolInformation || (exports.SymbolInformation = SymbolInformation = {}));
|
|
79794
|
+
var WorkspaceSymbol;
|
|
79795
|
+
(function (WorkspaceSymbol) {
|
|
79796
|
+
/**
|
|
79797
|
+
* Create a new workspace symbol.
|
|
79798
|
+
*
|
|
79799
|
+
* @param name The name of the symbol.
|
|
79800
|
+
* @param kind The kind of the symbol.
|
|
79801
|
+
* @param uri The resource of the location of the symbol.
|
|
79802
|
+
* @param range An options range of the location.
|
|
79803
|
+
* @returns A WorkspaceSymbol.
|
|
79804
|
+
*/
|
|
79805
|
+
function create(name, kind, uri, range) {
|
|
79806
|
+
return range !== undefined
|
|
79807
|
+
? { name: name, kind: kind, location: { uri: uri, range: range } }
|
|
79808
|
+
: { name: name, kind: kind, location: { uri: uri } };
|
|
79809
|
+
}
|
|
79810
|
+
WorkspaceSymbol.create = create;
|
|
79811
|
+
})(WorkspaceSymbol || (exports.WorkspaceSymbol = WorkspaceSymbol = {}));
|
|
79812
|
+
var DocumentSymbol;
|
|
79813
|
+
(function (DocumentSymbol) {
|
|
79814
|
+
/**
|
|
79815
|
+
* Creates a new symbol information literal.
|
|
79816
|
+
*
|
|
79817
|
+
* @param name The name of the symbol.
|
|
79818
|
+
* @param detail The detail of the symbol.
|
|
79819
|
+
* @param kind The kind of the symbol.
|
|
79820
|
+
* @param range The range of the symbol.
|
|
79821
|
+
* @param selectionRange The selectionRange of the symbol.
|
|
79822
|
+
* @param children Children of the symbol.
|
|
79823
|
+
*/
|
|
79824
|
+
function create(name, detail, kind, range, selectionRange, children) {
|
|
79825
|
+
var result = {
|
|
79826
|
+
name: name,
|
|
79827
|
+
detail: detail,
|
|
79828
|
+
kind: kind,
|
|
79829
|
+
range: range,
|
|
79830
|
+
selectionRange: selectionRange
|
|
79831
|
+
};
|
|
79832
|
+
if (children !== undefined) {
|
|
79833
|
+
result.children = children;
|
|
79834
|
+
}
|
|
79835
|
+
return result;
|
|
79836
|
+
}
|
|
79837
|
+
DocumentSymbol.create = create;
|
|
79838
|
+
/**
|
|
79839
|
+
* Checks whether the given literal conforms to the {@link DocumentSymbol} interface.
|
|
79840
|
+
*/
|
|
79841
|
+
function is(value) {
|
|
79842
|
+
var candidate = value;
|
|
79843
|
+
return candidate &&
|
|
79844
|
+
Is.string(candidate.name) && Is.number(candidate.kind) &&
|
|
79845
|
+
Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
|
|
79846
|
+
(candidate.detail === undefined || Is.string(candidate.detail)) &&
|
|
79847
|
+
(candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&
|
|
79848
|
+
(candidate.children === undefined || Array.isArray(candidate.children)) &&
|
|
79849
|
+
(candidate.tags === undefined || Array.isArray(candidate.tags));
|
|
79850
|
+
}
|
|
79851
|
+
DocumentSymbol.is = is;
|
|
79852
|
+
})(DocumentSymbol || (exports.DocumentSymbol = DocumentSymbol = {}));
|
|
78861
79853
|
/**
|
|
78862
|
-
*
|
|
78863
|
-
*
|
|
78864
|
-
* @param range The range of text to be deleted.
|
|
78865
|
-
* @param annotation The annotation.
|
|
79854
|
+
* A set of predefined code action kinds
|
|
78866
79855
|
*/
|
|
78867
|
-
|
|
78868
|
-
|
|
78869
|
-
|
|
78870
|
-
|
|
78871
|
-
|
|
78872
|
-
|
|
78873
|
-
|
|
78874
|
-
|
|
78875
|
-
|
|
78876
|
-
|
|
78877
|
-
/**
|
|
78878
|
-
|
|
78879
|
-
|
|
78880
|
-
|
|
78881
|
-
|
|
78882
|
-
|
|
79856
|
+
var CodeActionKind;
|
|
79857
|
+
(function (CodeActionKind) {
|
|
79858
|
+
/**
|
|
79859
|
+
* Empty kind.
|
|
79860
|
+
*/
|
|
79861
|
+
CodeActionKind.Empty = '';
|
|
79862
|
+
/**
|
|
79863
|
+
* Base kind for quickfix actions: 'quickfix'
|
|
79864
|
+
*/
|
|
79865
|
+
CodeActionKind.QuickFix = 'quickfix';
|
|
79866
|
+
/**
|
|
79867
|
+
* Base kind for refactoring actions: 'refactor'
|
|
79868
|
+
*/
|
|
79869
|
+
CodeActionKind.Refactor = 'refactor';
|
|
79870
|
+
/**
|
|
79871
|
+
* Base kind for refactoring extraction actions: 'refactor.extract'
|
|
79872
|
+
*
|
|
79873
|
+
* Example extract actions:
|
|
79874
|
+
*
|
|
79875
|
+
* - Extract method
|
|
79876
|
+
* - Extract function
|
|
79877
|
+
* - Extract variable
|
|
79878
|
+
* - Extract interface from class
|
|
79879
|
+
* - ...
|
|
79880
|
+
*/
|
|
79881
|
+
CodeActionKind.RefactorExtract = 'refactor.extract';
|
|
79882
|
+
/**
|
|
79883
|
+
* Base kind for refactoring inline actions: 'refactor.inline'
|
|
79884
|
+
*
|
|
79885
|
+
* Example inline actions:
|
|
79886
|
+
*
|
|
79887
|
+
* - Inline function
|
|
79888
|
+
* - Inline variable
|
|
79889
|
+
* - Inline constant
|
|
79890
|
+
* - ...
|
|
79891
|
+
*/
|
|
79892
|
+
CodeActionKind.RefactorInline = 'refactor.inline';
|
|
79893
|
+
/**
|
|
79894
|
+
* Base kind for refactoring rewrite actions: 'refactor.rewrite'
|
|
79895
|
+
*
|
|
79896
|
+
* Example rewrite actions:
|
|
79897
|
+
*
|
|
79898
|
+
* - Convert JavaScript function to class
|
|
79899
|
+
* - Add or remove parameter
|
|
79900
|
+
* - Encapsulate field
|
|
79901
|
+
* - Make method static
|
|
79902
|
+
* - Move method to base class
|
|
79903
|
+
* - ...
|
|
79904
|
+
*/
|
|
79905
|
+
CodeActionKind.RefactorRewrite = 'refactor.rewrite';
|
|
79906
|
+
/**
|
|
79907
|
+
* Base kind for source actions: `source`
|
|
79908
|
+
*
|
|
79909
|
+
* Source code actions apply to the entire file.
|
|
79910
|
+
*/
|
|
79911
|
+
CodeActionKind.Source = 'source';
|
|
79912
|
+
/**
|
|
79913
|
+
* Base kind for an organize imports source action: `source.organizeImports`
|
|
79914
|
+
*/
|
|
79915
|
+
CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
|
|
79916
|
+
/**
|
|
79917
|
+
* Base kind for auto-fix source actions: `source.fixAll`.
|
|
79918
|
+
*
|
|
79919
|
+
* Fix all actions automatically fix errors that have a clear fix that do not require user input.
|
|
79920
|
+
* They should not suppress errors or perform unsafe fixes such as generating new types or classes.
|
|
79921
|
+
*
|
|
79922
|
+
* @since 3.15.0
|
|
79923
|
+
*/
|
|
79924
|
+
CodeActionKind.SourceFixAll = 'source.fixAll';
|
|
79925
|
+
})(CodeActionKind || (exports.CodeActionKind = CodeActionKind = {}));
|
|
78883
79926
|
/**
|
|
78884
|
-
*
|
|
79927
|
+
* The reason why code actions were requested.
|
|
79928
|
+
*
|
|
79929
|
+
* @since 3.17.0
|
|
78885
79930
|
*/
|
|
78886
|
-
|
|
78887
|
-
|
|
78888
|
-
|
|
78889
|
-
|
|
78890
|
-
|
|
78891
|
-
|
|
78892
|
-
|
|
78893
|
-
|
|
78894
|
-
|
|
78895
|
-
|
|
78896
|
-
|
|
78897
|
-
|
|
78898
|
-
|
|
78899
|
-
(
|
|
78900
|
-
|
|
78901
|
-
|
|
78902
|
-
|
|
78903
|
-
|
|
78904
|
-
|
|
78905
|
-
|
|
78906
|
-
|
|
78907
|
-
|
|
78908
|
-
|
|
78909
|
-
|
|
78910
|
-
|
|
78911
|
-
|
|
78912
|
-
|
|
78913
|
-
CreateFile.create = create;
|
|
78914
|
-
function is(value) {
|
|
78915
|
-
var candidate = value;
|
|
78916
|
-
return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||
|
|
78917
|
-
((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78918
|
-
}
|
|
78919
|
-
CreateFile.is = is;
|
|
78920
|
-
})(CreateFile || (CreateFile = {}));
|
|
78921
|
-
var RenameFile;
|
|
78922
|
-
(function (RenameFile) {
|
|
78923
|
-
function create(oldUri, newUri, options, annotation) {
|
|
78924
|
-
var result = {
|
|
78925
|
-
kind: 'rename',
|
|
78926
|
-
oldUri: oldUri,
|
|
78927
|
-
newUri: newUri
|
|
78928
|
-
};
|
|
78929
|
-
if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
|
|
78930
|
-
result.options = options;
|
|
78931
|
-
}
|
|
78932
|
-
if (annotation !== undefined) {
|
|
78933
|
-
result.annotationId = annotation;
|
|
78934
|
-
}
|
|
78935
|
-
return result;
|
|
78936
|
-
}
|
|
78937
|
-
RenameFile.create = create;
|
|
78938
|
-
function is(value) {
|
|
78939
|
-
var candidate = value;
|
|
78940
|
-
return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||
|
|
78941
|
-
((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78942
|
-
}
|
|
78943
|
-
RenameFile.is = is;
|
|
78944
|
-
})(RenameFile || (RenameFile = {}));
|
|
78945
|
-
var DeleteFile;
|
|
78946
|
-
(function (DeleteFile) {
|
|
78947
|
-
function create(uri, options, annotation) {
|
|
78948
|
-
var result = {
|
|
78949
|
-
kind: 'delete',
|
|
78950
|
-
uri: uri
|
|
78951
|
-
};
|
|
78952
|
-
if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
|
|
78953
|
-
result.options = options;
|
|
78954
|
-
}
|
|
78955
|
-
if (annotation !== undefined) {
|
|
78956
|
-
result.annotationId = annotation;
|
|
78957
|
-
}
|
|
78958
|
-
return result;
|
|
78959
|
-
}
|
|
78960
|
-
DeleteFile.create = create;
|
|
78961
|
-
function is(value) {
|
|
78962
|
-
var candidate = value;
|
|
78963
|
-
return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||
|
|
78964
|
-
((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78965
|
-
}
|
|
78966
|
-
DeleteFile.is = is;
|
|
78967
|
-
})(DeleteFile || (DeleteFile = {}));
|
|
78968
|
-
var WorkspaceEdit;
|
|
78969
|
-
(function (WorkspaceEdit) {
|
|
78970
|
-
function is(value) {
|
|
78971
|
-
var candidate = value;
|
|
78972
|
-
return candidate &&
|
|
78973
|
-
(candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
|
|
78974
|
-
(candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {
|
|
78975
|
-
if (Is.string(change.kind)) {
|
|
78976
|
-
return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
|
|
78977
|
-
}
|
|
78978
|
-
else {
|
|
78979
|
-
return TextDocumentEdit.is(change);
|
|
78980
|
-
}
|
|
78981
|
-
}));
|
|
78982
|
-
}
|
|
78983
|
-
WorkspaceEdit.is = is;
|
|
78984
|
-
})(WorkspaceEdit || (WorkspaceEdit = {}));
|
|
78985
|
-
var TextEditChangeImpl = /** @class */ (function () {
|
|
78986
|
-
function TextEditChangeImpl(edits, changeAnnotations) {
|
|
78987
|
-
this.edits = edits;
|
|
78988
|
-
this.changeAnnotations = changeAnnotations;
|
|
78989
|
-
}
|
|
78990
|
-
TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {
|
|
78991
|
-
var edit;
|
|
78992
|
-
var id;
|
|
78993
|
-
if (annotation === undefined) {
|
|
78994
|
-
edit = TextEdit.insert(position, newText);
|
|
78995
|
-
}
|
|
78996
|
-
else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
78997
|
-
id = annotation;
|
|
78998
|
-
edit = AnnotatedTextEdit.insert(position, newText, annotation);
|
|
78999
|
-
}
|
|
79000
|
-
else {
|
|
79001
|
-
this.assertChangeAnnotations(this.changeAnnotations);
|
|
79002
|
-
id = this.changeAnnotations.manage(annotation);
|
|
79003
|
-
edit = AnnotatedTextEdit.insert(position, newText, id);
|
|
79004
|
-
}
|
|
79005
|
-
this.edits.push(edit);
|
|
79006
|
-
if (id !== undefined) {
|
|
79007
|
-
return id;
|
|
79008
|
-
}
|
|
79009
|
-
};
|
|
79010
|
-
TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {
|
|
79011
|
-
var edit;
|
|
79012
|
-
var id;
|
|
79013
|
-
if (annotation === undefined) {
|
|
79014
|
-
edit = TextEdit.replace(range, newText);
|
|
79015
|
-
}
|
|
79016
|
-
else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
79017
|
-
id = annotation;
|
|
79018
|
-
edit = AnnotatedTextEdit.replace(range, newText, annotation);
|
|
79019
|
-
}
|
|
79020
|
-
else {
|
|
79021
|
-
this.assertChangeAnnotations(this.changeAnnotations);
|
|
79022
|
-
id = this.changeAnnotations.manage(annotation);
|
|
79023
|
-
edit = AnnotatedTextEdit.replace(range, newText, id);
|
|
79024
|
-
}
|
|
79025
|
-
this.edits.push(edit);
|
|
79026
|
-
if (id !== undefined) {
|
|
79027
|
-
return id;
|
|
79028
|
-
}
|
|
79029
|
-
};
|
|
79030
|
-
TextEditChangeImpl.prototype.delete = function (range, annotation) {
|
|
79031
|
-
var edit;
|
|
79032
|
-
var id;
|
|
79033
|
-
if (annotation === undefined) {
|
|
79034
|
-
edit = TextEdit.del(range);
|
|
79035
|
-
}
|
|
79036
|
-
else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
79037
|
-
id = annotation;
|
|
79038
|
-
edit = AnnotatedTextEdit.del(range, annotation);
|
|
79039
|
-
}
|
|
79040
|
-
else {
|
|
79041
|
-
this.assertChangeAnnotations(this.changeAnnotations);
|
|
79042
|
-
id = this.changeAnnotations.manage(annotation);
|
|
79043
|
-
edit = AnnotatedTextEdit.del(range, id);
|
|
79044
|
-
}
|
|
79045
|
-
this.edits.push(edit);
|
|
79046
|
-
if (id !== undefined) {
|
|
79047
|
-
return id;
|
|
79048
|
-
}
|
|
79049
|
-
};
|
|
79050
|
-
TextEditChangeImpl.prototype.add = function (edit) {
|
|
79051
|
-
this.edits.push(edit);
|
|
79052
|
-
};
|
|
79053
|
-
TextEditChangeImpl.prototype.all = function () {
|
|
79054
|
-
return this.edits;
|
|
79055
|
-
};
|
|
79056
|
-
TextEditChangeImpl.prototype.clear = function () {
|
|
79057
|
-
this.edits.splice(0, this.edits.length);
|
|
79058
|
-
};
|
|
79059
|
-
TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {
|
|
79060
|
-
if (value === undefined) {
|
|
79061
|
-
throw new Error("Text edit change is not configured to manage change annotations.");
|
|
79062
|
-
}
|
|
79063
|
-
};
|
|
79064
|
-
return TextEditChangeImpl;
|
|
79065
|
-
}());
|
|
79066
|
-
/**
|
|
79067
|
-
* A helper class
|
|
79068
|
-
*/
|
|
79069
|
-
var ChangeAnnotations = /** @class */ (function () {
|
|
79070
|
-
function ChangeAnnotations(annotations) {
|
|
79071
|
-
this._annotations = annotations === undefined ? Object.create(null) : annotations;
|
|
79072
|
-
this._counter = 0;
|
|
79073
|
-
this._size = 0;
|
|
79074
|
-
}
|
|
79075
|
-
ChangeAnnotations.prototype.all = function () {
|
|
79076
|
-
return this._annotations;
|
|
79077
|
-
};
|
|
79078
|
-
Object.defineProperty(ChangeAnnotations.prototype, "size", {
|
|
79079
|
-
get: function () {
|
|
79080
|
-
return this._size;
|
|
79081
|
-
},
|
|
79082
|
-
enumerable: false,
|
|
79083
|
-
configurable: true
|
|
79084
|
-
});
|
|
79085
|
-
ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {
|
|
79086
|
-
var id;
|
|
79087
|
-
if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
|
|
79088
|
-
id = idOrAnnotation;
|
|
79089
|
-
}
|
|
79090
|
-
else {
|
|
79091
|
-
id = this.nextId();
|
|
79092
|
-
annotation = idOrAnnotation;
|
|
79093
|
-
}
|
|
79094
|
-
if (this._annotations[id] !== undefined) {
|
|
79095
|
-
throw new Error("Id ".concat(id, " is already in use."));
|
|
79096
|
-
}
|
|
79097
|
-
if (annotation === undefined) {
|
|
79098
|
-
throw new Error("No annotation provided for id ".concat(id));
|
|
79099
|
-
}
|
|
79100
|
-
this._annotations[id] = annotation;
|
|
79101
|
-
this._size++;
|
|
79102
|
-
return id;
|
|
79103
|
-
};
|
|
79104
|
-
ChangeAnnotations.prototype.nextId = function () {
|
|
79105
|
-
this._counter++;
|
|
79106
|
-
return this._counter.toString();
|
|
79107
|
-
};
|
|
79108
|
-
return ChangeAnnotations;
|
|
79109
|
-
}());
|
|
79110
|
-
/**
|
|
79111
|
-
* A workspace change helps constructing changes to a workspace.
|
|
79112
|
-
*/
|
|
79113
|
-
var WorkspaceChange = /** @class */ (function () {
|
|
79114
|
-
function WorkspaceChange(workspaceEdit) {
|
|
79115
|
-
var _this = this;
|
|
79116
|
-
this._textEditChanges = Object.create(null);
|
|
79117
|
-
if (workspaceEdit !== undefined) {
|
|
79118
|
-
this._workspaceEdit = workspaceEdit;
|
|
79119
|
-
if (workspaceEdit.documentChanges) {
|
|
79120
|
-
this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
|
|
79121
|
-
workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
79122
|
-
workspaceEdit.documentChanges.forEach(function (change) {
|
|
79123
|
-
if (TextDocumentEdit.is(change)) {
|
|
79124
|
-
var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
|
|
79125
|
-
_this._textEditChanges[change.textDocument.uri] = textEditChange;
|
|
79126
|
-
}
|
|
79127
|
-
});
|
|
79931
|
+
var CodeActionTriggerKind;
|
|
79932
|
+
(function (CodeActionTriggerKind) {
|
|
79933
|
+
/**
|
|
79934
|
+
* Code actions were explicitly requested by the user or by an extension.
|
|
79935
|
+
*/
|
|
79936
|
+
CodeActionTriggerKind.Invoked = 1;
|
|
79937
|
+
/**
|
|
79938
|
+
* Code actions were requested automatically.
|
|
79939
|
+
*
|
|
79940
|
+
* This typically happens when current selection in a file changes, but can
|
|
79941
|
+
* also be triggered when file content changes.
|
|
79942
|
+
*/
|
|
79943
|
+
CodeActionTriggerKind.Automatic = 2;
|
|
79944
|
+
})(CodeActionTriggerKind || (exports.CodeActionTriggerKind = CodeActionTriggerKind = {}));
|
|
79945
|
+
/**
|
|
79946
|
+
* The CodeActionContext namespace provides helper functions to work with
|
|
79947
|
+
* {@link CodeActionContext} literals.
|
|
79948
|
+
*/
|
|
79949
|
+
var CodeActionContext;
|
|
79950
|
+
(function (CodeActionContext) {
|
|
79951
|
+
/**
|
|
79952
|
+
* Creates a new CodeActionContext literal.
|
|
79953
|
+
*/
|
|
79954
|
+
function create(diagnostics, only, triggerKind) {
|
|
79955
|
+
var result = { diagnostics: diagnostics };
|
|
79956
|
+
if (only !== undefined && only !== null) {
|
|
79957
|
+
result.only = only;
|
|
79128
79958
|
}
|
|
79129
|
-
|
|
79130
|
-
|
|
79131
|
-
var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
|
|
79132
|
-
_this._textEditChanges[key] = textEditChange;
|
|
79133
|
-
});
|
|
79959
|
+
if (triggerKind !== undefined && triggerKind !== null) {
|
|
79960
|
+
result.triggerKind = triggerKind;
|
|
79134
79961
|
}
|
|
79962
|
+
return result;
|
|
79135
79963
|
}
|
|
79136
|
-
|
|
79137
|
-
this._workspaceEdit = {};
|
|
79138
|
-
}
|
|
79139
|
-
}
|
|
79140
|
-
Object.defineProperty(WorkspaceChange.prototype, "edit", {
|
|
79964
|
+
CodeActionContext.create = create;
|
|
79141
79965
|
/**
|
|
79142
|
-
*
|
|
79143
|
-
* use to be returned from a workspace edit operation like rename.
|
|
79966
|
+
* Checks whether the given literal conforms to the {@link CodeActionContext} interface.
|
|
79144
79967
|
*/
|
|
79145
|
-
|
|
79146
|
-
|
|
79147
|
-
|
|
79148
|
-
|
|
79149
|
-
|
|
79150
|
-
|
|
79151
|
-
|
|
79152
|
-
|
|
79153
|
-
|
|
79968
|
+
function is(value) {
|
|
79969
|
+
var candidate = value;
|
|
79970
|
+
return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is)
|
|
79971
|
+
&& (candidate.only === undefined || Is.typedArray(candidate.only, Is.string))
|
|
79972
|
+
&& (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);
|
|
79973
|
+
}
|
|
79974
|
+
CodeActionContext.is = is;
|
|
79975
|
+
})(CodeActionContext || (exports.CodeActionContext = CodeActionContext = {}));
|
|
79976
|
+
var CodeAction;
|
|
79977
|
+
(function (CodeAction) {
|
|
79978
|
+
function create(title, kindOrCommandOrEdit, kind) {
|
|
79979
|
+
var result = { title: title };
|
|
79980
|
+
var checkKind = true;
|
|
79981
|
+
if (typeof kindOrCommandOrEdit === 'string') {
|
|
79982
|
+
checkKind = false;
|
|
79983
|
+
result.kind = kindOrCommandOrEdit;
|
|
79984
|
+
}
|
|
79985
|
+
else if (Command.is(kindOrCommandOrEdit)) {
|
|
79986
|
+
result.command = kindOrCommandOrEdit;
|
|
79154
79987
|
}
|
|
79155
|
-
|
|
79156
|
-
|
|
79157
|
-
enumerable: false,
|
|
79158
|
-
configurable: true
|
|
79159
|
-
});
|
|
79160
|
-
WorkspaceChange.prototype.getTextEditChange = function (key) {
|
|
79161
|
-
if (OptionalVersionedTextDocumentIdentifier.is(key)) {
|
|
79162
|
-
this.initDocumentChanges();
|
|
79163
|
-
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79164
|
-
throw new Error('Workspace edit is not configured for document changes.');
|
|
79988
|
+
else {
|
|
79989
|
+
result.edit = kindOrCommandOrEdit;
|
|
79165
79990
|
}
|
|
79166
|
-
|
|
79167
|
-
|
|
79168
|
-
if (!result) {
|
|
79169
|
-
var edits = [];
|
|
79170
|
-
var textDocumentEdit = {
|
|
79171
|
-
textDocument: textDocument,
|
|
79172
|
-
edits: edits
|
|
79173
|
-
};
|
|
79174
|
-
this._workspaceEdit.documentChanges.push(textDocumentEdit);
|
|
79175
|
-
result = new TextEditChangeImpl(edits, this._changeAnnotations);
|
|
79176
|
-
this._textEditChanges[textDocument.uri] = result;
|
|
79991
|
+
if (checkKind && kind !== undefined) {
|
|
79992
|
+
result.kind = kind;
|
|
79177
79993
|
}
|
|
79178
79994
|
return result;
|
|
79179
79995
|
}
|
|
79180
|
-
|
|
79181
|
-
|
|
79182
|
-
|
|
79183
|
-
|
|
79184
|
-
|
|
79185
|
-
|
|
79186
|
-
|
|
79187
|
-
|
|
79188
|
-
|
|
79189
|
-
|
|
79190
|
-
|
|
79996
|
+
CodeAction.create = create;
|
|
79997
|
+
function is(value) {
|
|
79998
|
+
var candidate = value;
|
|
79999
|
+
return candidate && Is.string(candidate.title) &&
|
|
80000
|
+
(candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
|
|
80001
|
+
(candidate.kind === undefined || Is.string(candidate.kind)) &&
|
|
80002
|
+
(candidate.edit !== undefined || candidate.command !== undefined) &&
|
|
80003
|
+
(candidate.command === undefined || Command.is(candidate.command)) &&
|
|
80004
|
+
(candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&
|
|
80005
|
+
(candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
|
|
80006
|
+
}
|
|
80007
|
+
CodeAction.is = is;
|
|
80008
|
+
})(CodeAction || (exports.CodeAction = CodeAction = {}));
|
|
80009
|
+
/**
|
|
80010
|
+
* The CodeLens namespace provides helper functions to work with
|
|
80011
|
+
* {@link CodeLens} literals.
|
|
80012
|
+
*/
|
|
80013
|
+
var CodeLens;
|
|
80014
|
+
(function (CodeLens) {
|
|
80015
|
+
/**
|
|
80016
|
+
* Creates a new CodeLens literal.
|
|
80017
|
+
*/
|
|
80018
|
+
function create(range, data) {
|
|
80019
|
+
var result = { range: range };
|
|
80020
|
+
if (Is.defined(data)) {
|
|
80021
|
+
result.data = data;
|
|
79191
80022
|
}
|
|
79192
80023
|
return result;
|
|
79193
80024
|
}
|
|
79194
|
-
|
|
79195
|
-
|
|
79196
|
-
|
|
79197
|
-
|
|
79198
|
-
|
|
79199
|
-
|
|
79200
|
-
|
|
79201
|
-
};
|
|
79202
|
-
WorkspaceChange.prototype.initChanges = function () {
|
|
79203
|
-
if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
|
|
79204
|
-
this._workspaceEdit.changes = Object.create(null);
|
|
79205
|
-
}
|
|
79206
|
-
};
|
|
79207
|
-
WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {
|
|
79208
|
-
this.initDocumentChanges();
|
|
79209
|
-
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79210
|
-
throw new Error('Workspace edit is not configured for document changes.');
|
|
79211
|
-
}
|
|
79212
|
-
var annotation;
|
|
79213
|
-
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
79214
|
-
annotation = optionsOrAnnotation;
|
|
79215
|
-
}
|
|
79216
|
-
else {
|
|
79217
|
-
options = optionsOrAnnotation;
|
|
79218
|
-
}
|
|
79219
|
-
var operation;
|
|
79220
|
-
var id;
|
|
79221
|
-
if (annotation === undefined) {
|
|
79222
|
-
operation = CreateFile.create(uri, options);
|
|
79223
|
-
}
|
|
79224
|
-
else {
|
|
79225
|
-
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
79226
|
-
operation = CreateFile.create(uri, options, id);
|
|
79227
|
-
}
|
|
79228
|
-
this._workspaceEdit.documentChanges.push(operation);
|
|
79229
|
-
if (id !== undefined) {
|
|
79230
|
-
return id;
|
|
79231
|
-
}
|
|
79232
|
-
};
|
|
79233
|
-
WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {
|
|
79234
|
-
this.initDocumentChanges();
|
|
79235
|
-
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79236
|
-
throw new Error('Workspace edit is not configured for document changes.');
|
|
79237
|
-
}
|
|
79238
|
-
var annotation;
|
|
79239
|
-
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
79240
|
-
annotation = optionsOrAnnotation;
|
|
79241
|
-
}
|
|
79242
|
-
else {
|
|
79243
|
-
options = optionsOrAnnotation;
|
|
79244
|
-
}
|
|
79245
|
-
var operation;
|
|
79246
|
-
var id;
|
|
79247
|
-
if (annotation === undefined) {
|
|
79248
|
-
operation = RenameFile.create(oldUri, newUri, options);
|
|
79249
|
-
}
|
|
79250
|
-
else {
|
|
79251
|
-
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
79252
|
-
operation = RenameFile.create(oldUri, newUri, options, id);
|
|
79253
|
-
}
|
|
79254
|
-
this._workspaceEdit.documentChanges.push(operation);
|
|
79255
|
-
if (id !== undefined) {
|
|
79256
|
-
return id;
|
|
79257
|
-
}
|
|
79258
|
-
};
|
|
79259
|
-
WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {
|
|
79260
|
-
this.initDocumentChanges();
|
|
79261
|
-
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79262
|
-
throw new Error('Workspace edit is not configured for document changes.');
|
|
79263
|
-
}
|
|
79264
|
-
var annotation;
|
|
79265
|
-
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
79266
|
-
annotation = optionsOrAnnotation;
|
|
79267
|
-
}
|
|
79268
|
-
else {
|
|
79269
|
-
options = optionsOrAnnotation;
|
|
79270
|
-
}
|
|
79271
|
-
var operation;
|
|
79272
|
-
var id;
|
|
79273
|
-
if (annotation === undefined) {
|
|
79274
|
-
operation = DeleteFile.create(uri, options);
|
|
79275
|
-
}
|
|
79276
|
-
else {
|
|
79277
|
-
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
79278
|
-
operation = DeleteFile.create(uri, options, id);
|
|
79279
|
-
}
|
|
79280
|
-
this._workspaceEdit.documentChanges.push(operation);
|
|
79281
|
-
if (id !== undefined) {
|
|
79282
|
-
return id;
|
|
80025
|
+
CodeLens.create = create;
|
|
80026
|
+
/**
|
|
80027
|
+
* Checks whether the given literal conforms to the {@link CodeLens} interface.
|
|
80028
|
+
*/
|
|
80029
|
+
function is(value) {
|
|
80030
|
+
var candidate = value;
|
|
80031
|
+
return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
|
|
79283
80032
|
}
|
|
79284
|
-
|
|
79285
|
-
|
|
79286
|
-
}());
|
|
79287
|
-
|
|
79288
|
-
/**
|
|
79289
|
-
* The TextDocumentIdentifier namespace provides helper functions to work with
|
|
79290
|
-
* {@link TextDocumentIdentifier} literals.
|
|
79291
|
-
*/
|
|
79292
|
-
var TextDocumentIdentifier;
|
|
79293
|
-
(function (TextDocumentIdentifier) {
|
|
79294
|
-
/**
|
|
79295
|
-
* Creates a new TextDocumentIdentifier literal.
|
|
79296
|
-
* @param uri The document's uri.
|
|
79297
|
-
*/
|
|
79298
|
-
function create(uri) {
|
|
79299
|
-
return { uri: uri };
|
|
79300
|
-
}
|
|
79301
|
-
TextDocumentIdentifier.create = create;
|
|
79302
|
-
/**
|
|
79303
|
-
* Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface.
|
|
79304
|
-
*/
|
|
79305
|
-
function is(value) {
|
|
79306
|
-
var candidate = value;
|
|
79307
|
-
return Is.defined(candidate) && Is.string(candidate.uri);
|
|
79308
|
-
}
|
|
79309
|
-
TextDocumentIdentifier.is = is;
|
|
79310
|
-
})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
|
|
79311
|
-
/**
|
|
79312
|
-
* The VersionedTextDocumentIdentifier namespace provides helper functions to work with
|
|
79313
|
-
* {@link VersionedTextDocumentIdentifier} literals.
|
|
79314
|
-
*/
|
|
79315
|
-
var VersionedTextDocumentIdentifier;
|
|
79316
|
-
(function (VersionedTextDocumentIdentifier) {
|
|
80033
|
+
CodeLens.is = is;
|
|
80034
|
+
})(CodeLens || (exports.CodeLens = CodeLens = {}));
|
|
79317
80035
|
/**
|
|
79318
|
-
*
|
|
79319
|
-
* @
|
|
79320
|
-
* @param version The document's version.
|
|
80036
|
+
* The FormattingOptions namespace provides helper functions to work with
|
|
80037
|
+
* {@link FormattingOptions} literals.
|
|
79321
80038
|
*/
|
|
79322
|
-
|
|
79323
|
-
|
|
79324
|
-
|
|
79325
|
-
|
|
79326
|
-
|
|
79327
|
-
|
|
79328
|
-
|
|
79329
|
-
function is(value) {
|
|
79330
|
-
var candidate = value;
|
|
79331
|
-
return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
|
|
79332
|
-
}
|
|
79333
|
-
VersionedTextDocumentIdentifier.is = is;
|
|
79334
|
-
})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
|
|
79335
|
-
/**
|
|
79336
|
-
* The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with
|
|
79337
|
-
* {@link OptionalVersionedTextDocumentIdentifier} literals.
|
|
79338
|
-
*/
|
|
79339
|
-
var OptionalVersionedTextDocumentIdentifier;
|
|
79340
|
-
(function (OptionalVersionedTextDocumentIdentifier) {
|
|
79341
|
-
/**
|
|
79342
|
-
* Creates a new OptionalVersionedTextDocumentIdentifier literal.
|
|
79343
|
-
* @param uri The document's uri.
|
|
79344
|
-
* @param version The document's version.
|
|
79345
|
-
*/
|
|
79346
|
-
function create(uri, version) {
|
|
79347
|
-
return { uri: uri, version: version };
|
|
79348
|
-
}
|
|
79349
|
-
OptionalVersionedTextDocumentIdentifier.create = create;
|
|
79350
|
-
/**
|
|
79351
|
-
* Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface.
|
|
79352
|
-
*/
|
|
79353
|
-
function is(value) {
|
|
79354
|
-
var candidate = value;
|
|
79355
|
-
return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
|
|
79356
|
-
}
|
|
79357
|
-
OptionalVersionedTextDocumentIdentifier.is = is;
|
|
79358
|
-
})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));
|
|
79359
|
-
/**
|
|
79360
|
-
* The TextDocumentItem namespace provides helper functions to work with
|
|
79361
|
-
* {@link TextDocumentItem} literals.
|
|
79362
|
-
*/
|
|
79363
|
-
var TextDocumentItem;
|
|
79364
|
-
(function (TextDocumentItem) {
|
|
79365
|
-
/**
|
|
79366
|
-
* Creates a new TextDocumentItem literal.
|
|
79367
|
-
* @param uri The document's uri.
|
|
79368
|
-
* @param languageId The document's language identifier.
|
|
79369
|
-
* @param version The document's version number.
|
|
79370
|
-
* @param text The document's text.
|
|
79371
|
-
*/
|
|
79372
|
-
function create(uri, languageId, version, text) {
|
|
79373
|
-
return { uri: uri, languageId: languageId, version: version, text: text };
|
|
79374
|
-
}
|
|
79375
|
-
TextDocumentItem.create = create;
|
|
79376
|
-
/**
|
|
79377
|
-
* Checks whether the given literal conforms to the {@link TextDocumentItem} interface.
|
|
79378
|
-
*/
|
|
79379
|
-
function is(value) {
|
|
79380
|
-
var candidate = value;
|
|
79381
|
-
return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
|
|
79382
|
-
}
|
|
79383
|
-
TextDocumentItem.is = is;
|
|
79384
|
-
})(TextDocumentItem || (TextDocumentItem = {}));
|
|
79385
|
-
/**
|
|
79386
|
-
* Describes the content type that a client supports in various
|
|
79387
|
-
* result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
|
|
79388
|
-
*
|
|
79389
|
-
* Please note that `MarkupKinds` must not start with a `$`. This kinds
|
|
79390
|
-
* are reserved for internal usage.
|
|
79391
|
-
*/
|
|
79392
|
-
var MarkupKind;
|
|
79393
|
-
(function (MarkupKind) {
|
|
79394
|
-
/**
|
|
79395
|
-
* Plain text is supported as a content format
|
|
79396
|
-
*/
|
|
79397
|
-
MarkupKind.PlainText = 'plaintext';
|
|
79398
|
-
/**
|
|
79399
|
-
* Markdown is supported as a content format
|
|
79400
|
-
*/
|
|
79401
|
-
MarkupKind.Markdown = 'markdown';
|
|
79402
|
-
/**
|
|
79403
|
-
* Checks whether the given value is a value of the {@link MarkupKind} type.
|
|
79404
|
-
*/
|
|
79405
|
-
function is(value) {
|
|
79406
|
-
var candidate = value;
|
|
79407
|
-
return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
|
|
79408
|
-
}
|
|
79409
|
-
MarkupKind.is = is;
|
|
79410
|
-
})(MarkupKind || (MarkupKind = {}));
|
|
79411
|
-
var MarkupContent;
|
|
79412
|
-
(function (MarkupContent) {
|
|
79413
|
-
/**
|
|
79414
|
-
* Checks whether the given value conforms to the {@link MarkupContent} interface.
|
|
79415
|
-
*/
|
|
79416
|
-
function is(value) {
|
|
79417
|
-
var candidate = value;
|
|
79418
|
-
return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
|
|
79419
|
-
}
|
|
79420
|
-
MarkupContent.is = is;
|
|
79421
|
-
})(MarkupContent || (MarkupContent = {}));
|
|
79422
|
-
/**
|
|
79423
|
-
* The kind of a completion entry.
|
|
79424
|
-
*/
|
|
79425
|
-
var CompletionItemKind;
|
|
79426
|
-
(function (CompletionItemKind) {
|
|
79427
|
-
CompletionItemKind.Text = 1;
|
|
79428
|
-
CompletionItemKind.Method = 2;
|
|
79429
|
-
CompletionItemKind.Function = 3;
|
|
79430
|
-
CompletionItemKind.Constructor = 4;
|
|
79431
|
-
CompletionItemKind.Field = 5;
|
|
79432
|
-
CompletionItemKind.Variable = 6;
|
|
79433
|
-
CompletionItemKind.Class = 7;
|
|
79434
|
-
CompletionItemKind.Interface = 8;
|
|
79435
|
-
CompletionItemKind.Module = 9;
|
|
79436
|
-
CompletionItemKind.Property = 10;
|
|
79437
|
-
CompletionItemKind.Unit = 11;
|
|
79438
|
-
CompletionItemKind.Value = 12;
|
|
79439
|
-
CompletionItemKind.Enum = 13;
|
|
79440
|
-
CompletionItemKind.Keyword = 14;
|
|
79441
|
-
CompletionItemKind.Snippet = 15;
|
|
79442
|
-
CompletionItemKind.Color = 16;
|
|
79443
|
-
CompletionItemKind.File = 17;
|
|
79444
|
-
CompletionItemKind.Reference = 18;
|
|
79445
|
-
CompletionItemKind.Folder = 19;
|
|
79446
|
-
CompletionItemKind.EnumMember = 20;
|
|
79447
|
-
CompletionItemKind.Constant = 21;
|
|
79448
|
-
CompletionItemKind.Struct = 22;
|
|
79449
|
-
CompletionItemKind.Event = 23;
|
|
79450
|
-
CompletionItemKind.Operator = 24;
|
|
79451
|
-
CompletionItemKind.TypeParameter = 25;
|
|
79452
|
-
})(CompletionItemKind || (CompletionItemKind = {}));
|
|
79453
|
-
/**
|
|
79454
|
-
* Defines whether the insert text in a completion item should be interpreted as
|
|
79455
|
-
* plain text or a snippet.
|
|
79456
|
-
*/
|
|
79457
|
-
var InsertTextFormat;
|
|
79458
|
-
(function (InsertTextFormat) {
|
|
79459
|
-
/**
|
|
79460
|
-
* The primary text to be inserted is treated as a plain string.
|
|
79461
|
-
*/
|
|
79462
|
-
InsertTextFormat.PlainText = 1;
|
|
79463
|
-
/**
|
|
79464
|
-
* The primary text to be inserted is treated as a snippet.
|
|
79465
|
-
*
|
|
79466
|
-
* A snippet can define tab stops and placeholders with `$1`, `$2`
|
|
79467
|
-
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
|
|
79468
|
-
* the end of the snippet. Placeholders with equal identifiers are linked,
|
|
79469
|
-
* that is typing in one will update others too.
|
|
79470
|
-
*
|
|
79471
|
-
* See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
|
|
79472
|
-
*/
|
|
79473
|
-
InsertTextFormat.Snippet = 2;
|
|
79474
|
-
})(InsertTextFormat || (InsertTextFormat = {}));
|
|
79475
|
-
/**
|
|
79476
|
-
* Completion item tags are extra annotations that tweak the rendering of a completion
|
|
79477
|
-
* item.
|
|
79478
|
-
*
|
|
79479
|
-
* @since 3.15.0
|
|
79480
|
-
*/
|
|
79481
|
-
var CompletionItemTag;
|
|
79482
|
-
(function (CompletionItemTag) {
|
|
79483
|
-
/**
|
|
79484
|
-
* Render a completion as obsolete, usually using a strike-out.
|
|
79485
|
-
*/
|
|
79486
|
-
CompletionItemTag.Deprecated = 1;
|
|
79487
|
-
})(CompletionItemTag || (CompletionItemTag = {}));
|
|
79488
|
-
/**
|
|
79489
|
-
* The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
|
|
79490
|
-
*
|
|
79491
|
-
* @since 3.16.0
|
|
79492
|
-
*/
|
|
79493
|
-
var InsertReplaceEdit;
|
|
79494
|
-
(function (InsertReplaceEdit) {
|
|
79495
|
-
/**
|
|
79496
|
-
* Creates a new insert / replace edit
|
|
79497
|
-
*/
|
|
79498
|
-
function create(newText, insert, replace) {
|
|
79499
|
-
return { newText: newText, insert: insert, replace: replace };
|
|
79500
|
-
}
|
|
79501
|
-
InsertReplaceEdit.create = create;
|
|
79502
|
-
/**
|
|
79503
|
-
* Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface.
|
|
79504
|
-
*/
|
|
79505
|
-
function is(value) {
|
|
79506
|
-
var candidate = value;
|
|
79507
|
-
return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
|
|
79508
|
-
}
|
|
79509
|
-
InsertReplaceEdit.is = is;
|
|
79510
|
-
})(InsertReplaceEdit || (InsertReplaceEdit = {}));
|
|
79511
|
-
/**
|
|
79512
|
-
* How whitespace and indentation is handled during completion
|
|
79513
|
-
* item insertion.
|
|
79514
|
-
*
|
|
79515
|
-
* @since 3.16.0
|
|
79516
|
-
*/
|
|
79517
|
-
var InsertTextMode;
|
|
79518
|
-
(function (InsertTextMode) {
|
|
79519
|
-
/**
|
|
79520
|
-
* The insertion or replace strings is taken as it is. If the
|
|
79521
|
-
* value is multi line the lines below the cursor will be
|
|
79522
|
-
* inserted using the indentation defined in the string value.
|
|
79523
|
-
* The client will not apply any kind of adjustments to the
|
|
79524
|
-
* string.
|
|
79525
|
-
*/
|
|
79526
|
-
InsertTextMode.asIs = 1;
|
|
79527
|
-
/**
|
|
79528
|
-
* The editor adjusts leading whitespace of new lines so that
|
|
79529
|
-
* they match the indentation up to the cursor of the line for
|
|
79530
|
-
* which the item is accepted.
|
|
79531
|
-
*
|
|
79532
|
-
* Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
|
|
79533
|
-
* multi line completion item is indented using 2 tabs and all
|
|
79534
|
-
* following lines inserted will be indented using 2 tabs as well.
|
|
79535
|
-
*/
|
|
79536
|
-
InsertTextMode.adjustIndentation = 2;
|
|
79537
|
-
})(InsertTextMode || (InsertTextMode = {}));
|
|
79538
|
-
var CompletionItemLabelDetails;
|
|
79539
|
-
(function (CompletionItemLabelDetails) {
|
|
79540
|
-
function is(value) {
|
|
79541
|
-
var candidate = value;
|
|
79542
|
-
return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) &&
|
|
79543
|
-
(Is.string(candidate.description) || candidate.description === undefined);
|
|
79544
|
-
}
|
|
79545
|
-
CompletionItemLabelDetails.is = is;
|
|
79546
|
-
})(CompletionItemLabelDetails || (CompletionItemLabelDetails = {}));
|
|
79547
|
-
/**
|
|
79548
|
-
* The CompletionItem namespace provides functions to deal with
|
|
79549
|
-
* completion items.
|
|
79550
|
-
*/
|
|
79551
|
-
var CompletionItem;
|
|
79552
|
-
(function (CompletionItem) {
|
|
79553
|
-
/**
|
|
79554
|
-
* Create a completion item and seed it with a label.
|
|
79555
|
-
* @param label The completion item's label
|
|
79556
|
-
*/
|
|
79557
|
-
function create(label) {
|
|
79558
|
-
return { label: label };
|
|
79559
|
-
}
|
|
79560
|
-
CompletionItem.create = create;
|
|
79561
|
-
})(CompletionItem || (CompletionItem = {}));
|
|
79562
|
-
/**
|
|
79563
|
-
* The CompletionList namespace provides functions to deal with
|
|
79564
|
-
* completion lists.
|
|
79565
|
-
*/
|
|
79566
|
-
var CompletionList;
|
|
79567
|
-
(function (CompletionList) {
|
|
79568
|
-
/**
|
|
79569
|
-
* Creates a new completion list.
|
|
79570
|
-
*
|
|
79571
|
-
* @param items The completion items.
|
|
79572
|
-
* @param isIncomplete The list is not complete.
|
|
79573
|
-
*/
|
|
79574
|
-
function create(items, isIncomplete) {
|
|
79575
|
-
return { items: items ? items : [], isIncomplete: !!isIncomplete };
|
|
79576
|
-
}
|
|
79577
|
-
CompletionList.create = create;
|
|
79578
|
-
})(CompletionList || (CompletionList = {}));
|
|
79579
|
-
var MarkedString;
|
|
79580
|
-
(function (MarkedString) {
|
|
79581
|
-
/**
|
|
79582
|
-
* Creates a marked string from plain text.
|
|
79583
|
-
*
|
|
79584
|
-
* @param plainText The plain text.
|
|
79585
|
-
*/
|
|
79586
|
-
function fromPlainText(plainText) {
|
|
79587
|
-
return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
|
|
79588
|
-
}
|
|
79589
|
-
MarkedString.fromPlainText = fromPlainText;
|
|
79590
|
-
/**
|
|
79591
|
-
* Checks whether the given value conforms to the {@link MarkedString} type.
|
|
79592
|
-
*/
|
|
79593
|
-
function is(value) {
|
|
79594
|
-
var candidate = value;
|
|
79595
|
-
return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
|
|
79596
|
-
}
|
|
79597
|
-
MarkedString.is = is;
|
|
79598
|
-
})(MarkedString || (MarkedString = {}));
|
|
79599
|
-
var Hover;
|
|
79600
|
-
(function (Hover) {
|
|
79601
|
-
/**
|
|
79602
|
-
* Checks whether the given value conforms to the {@link Hover} interface.
|
|
79603
|
-
*/
|
|
79604
|
-
function is(value) {
|
|
79605
|
-
var candidate = value;
|
|
79606
|
-
return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
|
|
79607
|
-
MarkedString.is(candidate.contents) ||
|
|
79608
|
-
Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
|
|
79609
|
-
}
|
|
79610
|
-
Hover.is = is;
|
|
79611
|
-
})(Hover || (Hover = {}));
|
|
79612
|
-
/**
|
|
79613
|
-
* The ParameterInformation namespace provides helper functions to work with
|
|
79614
|
-
* {@link ParameterInformation} literals.
|
|
79615
|
-
*/
|
|
79616
|
-
var ParameterInformation;
|
|
79617
|
-
(function (ParameterInformation) {
|
|
79618
|
-
/**
|
|
79619
|
-
* Creates a new parameter information literal.
|
|
79620
|
-
*
|
|
79621
|
-
* @param label A label string.
|
|
79622
|
-
* @param documentation A doc string.
|
|
79623
|
-
*/
|
|
79624
|
-
function create(label, documentation) {
|
|
79625
|
-
return documentation ? { label: label, documentation: documentation } : { label: label };
|
|
79626
|
-
}
|
|
79627
|
-
ParameterInformation.create = create;
|
|
79628
|
-
})(ParameterInformation || (ParameterInformation = {}));
|
|
79629
|
-
/**
|
|
79630
|
-
* The SignatureInformation namespace provides helper functions to work with
|
|
79631
|
-
* {@link SignatureInformation} literals.
|
|
79632
|
-
*/
|
|
79633
|
-
var SignatureInformation;
|
|
79634
|
-
(function (SignatureInformation) {
|
|
79635
|
-
function create(label, documentation) {
|
|
79636
|
-
var parameters = [];
|
|
79637
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
79638
|
-
parameters[_i - 2] = arguments[_i];
|
|
79639
|
-
}
|
|
79640
|
-
var result = { label: label };
|
|
79641
|
-
if (Is.defined(documentation)) {
|
|
79642
|
-
result.documentation = documentation;
|
|
79643
|
-
}
|
|
79644
|
-
if (Is.defined(parameters)) {
|
|
79645
|
-
result.parameters = parameters;
|
|
80039
|
+
var FormattingOptions;
|
|
80040
|
+
(function (FormattingOptions) {
|
|
80041
|
+
/**
|
|
80042
|
+
* Creates a new FormattingOptions literal.
|
|
80043
|
+
*/
|
|
80044
|
+
function create(tabSize, insertSpaces) {
|
|
80045
|
+
return { tabSize: tabSize, insertSpaces: insertSpaces };
|
|
79646
80046
|
}
|
|
79647
|
-
|
|
79648
|
-
|
|
80047
|
+
FormattingOptions.create = create;
|
|
80048
|
+
/**
|
|
80049
|
+
* Checks whether the given literal conforms to the {@link FormattingOptions} interface.
|
|
80050
|
+
*/
|
|
80051
|
+
function is(value) {
|
|
80052
|
+
var candidate = value;
|
|
80053
|
+
return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
|
|
79649
80054
|
}
|
|
79650
|
-
|
|
79651
|
-
}
|
|
79652
|
-
SignatureInformation.create = create;
|
|
79653
|
-
})(SignatureInformation || (SignatureInformation = {}));
|
|
79654
|
-
/**
|
|
79655
|
-
* A document highlight kind.
|
|
79656
|
-
*/
|
|
79657
|
-
var DocumentHighlightKind;
|
|
79658
|
-
(function (DocumentHighlightKind) {
|
|
80055
|
+
FormattingOptions.is = is;
|
|
80056
|
+
})(FormattingOptions || (exports.FormattingOptions = FormattingOptions = {}));
|
|
79659
80057
|
/**
|
|
79660
|
-
*
|
|
80058
|
+
* The DocumentLink namespace provides helper functions to work with
|
|
80059
|
+
* {@link DocumentLink} literals.
|
|
79661
80060
|
*/
|
|
79662
|
-
|
|
79663
|
-
|
|
79664
|
-
|
|
79665
|
-
|
|
79666
|
-
|
|
79667
|
-
|
|
79668
|
-
|
|
79669
|
-
*/
|
|
79670
|
-
DocumentHighlightKind.Write = 3;
|
|
79671
|
-
})(DocumentHighlightKind || (DocumentHighlightKind = {}));
|
|
79672
|
-
/**
|
|
79673
|
-
* DocumentHighlight namespace to provide helper functions to work with
|
|
79674
|
-
* {@link DocumentHighlight} literals.
|
|
79675
|
-
*/
|
|
79676
|
-
var DocumentHighlight;
|
|
79677
|
-
(function (DocumentHighlight) {
|
|
79678
|
-
/**
|
|
79679
|
-
* Create a DocumentHighlight object.
|
|
79680
|
-
* @param range The range the highlight applies to.
|
|
79681
|
-
* @param kind The highlight kind
|
|
79682
|
-
*/
|
|
79683
|
-
function create(range, kind) {
|
|
79684
|
-
var result = { range: range };
|
|
79685
|
-
if (Is.number(kind)) {
|
|
79686
|
-
result.kind = kind;
|
|
80061
|
+
var DocumentLink;
|
|
80062
|
+
(function (DocumentLink) {
|
|
80063
|
+
/**
|
|
80064
|
+
* Creates a new DocumentLink literal.
|
|
80065
|
+
*/
|
|
80066
|
+
function create(range, target, data) {
|
|
80067
|
+
return { range: range, target: target, data: data };
|
|
79687
80068
|
}
|
|
79688
|
-
|
|
79689
|
-
|
|
79690
|
-
|
|
79691
|
-
|
|
79692
|
-
|
|
79693
|
-
|
|
79694
|
-
|
|
79695
|
-
var SymbolKind;
|
|
79696
|
-
(function (SymbolKind) {
|
|
79697
|
-
SymbolKind.File = 1;
|
|
79698
|
-
SymbolKind.Module = 2;
|
|
79699
|
-
SymbolKind.Namespace = 3;
|
|
79700
|
-
SymbolKind.Package = 4;
|
|
79701
|
-
SymbolKind.Class = 5;
|
|
79702
|
-
SymbolKind.Method = 6;
|
|
79703
|
-
SymbolKind.Property = 7;
|
|
79704
|
-
SymbolKind.Field = 8;
|
|
79705
|
-
SymbolKind.Constructor = 9;
|
|
79706
|
-
SymbolKind.Enum = 10;
|
|
79707
|
-
SymbolKind.Interface = 11;
|
|
79708
|
-
SymbolKind.Function = 12;
|
|
79709
|
-
SymbolKind.Variable = 13;
|
|
79710
|
-
SymbolKind.Constant = 14;
|
|
79711
|
-
SymbolKind.String = 15;
|
|
79712
|
-
SymbolKind.Number = 16;
|
|
79713
|
-
SymbolKind.Boolean = 17;
|
|
79714
|
-
SymbolKind.Array = 18;
|
|
79715
|
-
SymbolKind.Object = 19;
|
|
79716
|
-
SymbolKind.Key = 20;
|
|
79717
|
-
SymbolKind.Null = 21;
|
|
79718
|
-
SymbolKind.EnumMember = 22;
|
|
79719
|
-
SymbolKind.Struct = 23;
|
|
79720
|
-
SymbolKind.Event = 24;
|
|
79721
|
-
SymbolKind.Operator = 25;
|
|
79722
|
-
SymbolKind.TypeParameter = 26;
|
|
79723
|
-
})(SymbolKind || (SymbolKind = {}));
|
|
79724
|
-
/**
|
|
79725
|
-
* Symbol tags are extra annotations that tweak the rendering of a symbol.
|
|
79726
|
-
*
|
|
79727
|
-
* @since 3.16
|
|
79728
|
-
*/
|
|
79729
|
-
var SymbolTag;
|
|
79730
|
-
(function (SymbolTag) {
|
|
79731
|
-
/**
|
|
79732
|
-
* Render a symbol as obsolete, usually using a strike-out.
|
|
79733
|
-
*/
|
|
79734
|
-
SymbolTag.Deprecated = 1;
|
|
79735
|
-
})(SymbolTag || (SymbolTag = {}));
|
|
79736
|
-
var SymbolInformation;
|
|
79737
|
-
(function (SymbolInformation) {
|
|
79738
|
-
/**
|
|
79739
|
-
* Creates a new symbol information literal.
|
|
79740
|
-
*
|
|
79741
|
-
* @param name The name of the symbol.
|
|
79742
|
-
* @param kind The kind of the symbol.
|
|
79743
|
-
* @param range The range of the location of the symbol.
|
|
79744
|
-
* @param uri The resource of the location of symbol.
|
|
79745
|
-
* @param containerName The name of the symbol containing the symbol.
|
|
79746
|
-
*/
|
|
79747
|
-
function create(name, kind, range, uri, containerName) {
|
|
79748
|
-
var result = {
|
|
79749
|
-
name: name,
|
|
79750
|
-
kind: kind,
|
|
79751
|
-
location: { uri: uri, range: range }
|
|
79752
|
-
};
|
|
79753
|
-
if (containerName) {
|
|
79754
|
-
result.containerName = containerName;
|
|
80069
|
+
DocumentLink.create = create;
|
|
80070
|
+
/**
|
|
80071
|
+
* Checks whether the given literal conforms to the {@link DocumentLink} interface.
|
|
80072
|
+
*/
|
|
80073
|
+
function is(value) {
|
|
80074
|
+
var candidate = value;
|
|
80075
|
+
return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
|
|
79755
80076
|
}
|
|
79756
|
-
|
|
79757
|
-
}
|
|
79758
|
-
SymbolInformation.create = create;
|
|
79759
|
-
})(SymbolInformation || (SymbolInformation = {}));
|
|
79760
|
-
var WorkspaceSymbol;
|
|
79761
|
-
(function (WorkspaceSymbol) {
|
|
79762
|
-
/**
|
|
79763
|
-
* Create a new workspace symbol.
|
|
79764
|
-
*
|
|
79765
|
-
* @param name The name of the symbol.
|
|
79766
|
-
* @param kind The kind of the symbol.
|
|
79767
|
-
* @param uri The resource of the location of the symbol.
|
|
79768
|
-
* @param range An options range of the location.
|
|
79769
|
-
* @returns A WorkspaceSymbol.
|
|
79770
|
-
*/
|
|
79771
|
-
function create(name, kind, uri, range) {
|
|
79772
|
-
return range !== undefined
|
|
79773
|
-
? { name: name, kind: kind, location: { uri: uri, range: range } }
|
|
79774
|
-
: { name: name, kind: kind, location: { uri: uri } };
|
|
79775
|
-
}
|
|
79776
|
-
WorkspaceSymbol.create = create;
|
|
79777
|
-
})(WorkspaceSymbol || (WorkspaceSymbol = {}));
|
|
79778
|
-
var DocumentSymbol;
|
|
79779
|
-
(function (DocumentSymbol) {
|
|
80077
|
+
DocumentLink.is = is;
|
|
80078
|
+
})(DocumentLink || (exports.DocumentLink = DocumentLink = {}));
|
|
79780
80079
|
/**
|
|
79781
|
-
*
|
|
79782
|
-
*
|
|
79783
|
-
* @param name The name of the symbol.
|
|
79784
|
-
* @param detail The detail of the symbol.
|
|
79785
|
-
* @param kind The kind of the symbol.
|
|
79786
|
-
* @param range The range of the symbol.
|
|
79787
|
-
* @param selectionRange The selectionRange of the symbol.
|
|
79788
|
-
* @param children Children of the symbol.
|
|
80080
|
+
* The SelectionRange namespace provides helper function to work with
|
|
80081
|
+
* SelectionRange literals.
|
|
79789
80082
|
*/
|
|
79790
|
-
|
|
79791
|
-
|
|
79792
|
-
|
|
79793
|
-
|
|
79794
|
-
|
|
79795
|
-
|
|
79796
|
-
|
|
79797
|
-
|
|
79798
|
-
|
|
79799
|
-
result.children = children;
|
|
80083
|
+
var SelectionRange;
|
|
80084
|
+
(function (SelectionRange) {
|
|
80085
|
+
/**
|
|
80086
|
+
* Creates a new SelectionRange
|
|
80087
|
+
* @param range the range.
|
|
80088
|
+
* @param parent an optional parent.
|
|
80089
|
+
*/
|
|
80090
|
+
function create(range, parent) {
|
|
80091
|
+
return { range: range, parent: parent };
|
|
79800
80092
|
}
|
|
79801
|
-
|
|
79802
|
-
|
|
79803
|
-
|
|
79804
|
-
|
|
79805
|
-
|
|
79806
|
-
|
|
79807
|
-
|
|
79808
|
-
var candidate = value;
|
|
79809
|
-
return candidate &&
|
|
79810
|
-
Is.string(candidate.name) && Is.number(candidate.kind) &&
|
|
79811
|
-
Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
|
|
79812
|
-
(candidate.detail === undefined || Is.string(candidate.detail)) &&
|
|
79813
|
-
(candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&
|
|
79814
|
-
(candidate.children === undefined || Array.isArray(candidate.children)) &&
|
|
79815
|
-
(candidate.tags === undefined || Array.isArray(candidate.tags));
|
|
79816
|
-
}
|
|
79817
|
-
DocumentSymbol.is = is;
|
|
79818
|
-
})(DocumentSymbol || (DocumentSymbol = {}));
|
|
79819
|
-
/**
|
|
79820
|
-
* A set of predefined code action kinds
|
|
79821
|
-
*/
|
|
79822
|
-
var CodeActionKind;
|
|
79823
|
-
(function (CodeActionKind) {
|
|
79824
|
-
/**
|
|
79825
|
-
* Empty kind.
|
|
79826
|
-
*/
|
|
79827
|
-
CodeActionKind.Empty = '';
|
|
79828
|
-
/**
|
|
79829
|
-
* Base kind for quickfix actions: 'quickfix'
|
|
79830
|
-
*/
|
|
79831
|
-
CodeActionKind.QuickFix = 'quickfix';
|
|
79832
|
-
/**
|
|
79833
|
-
* Base kind for refactoring actions: 'refactor'
|
|
79834
|
-
*/
|
|
79835
|
-
CodeActionKind.Refactor = 'refactor';
|
|
79836
|
-
/**
|
|
79837
|
-
* Base kind for refactoring extraction actions: 'refactor.extract'
|
|
79838
|
-
*
|
|
79839
|
-
* Example extract actions:
|
|
79840
|
-
*
|
|
79841
|
-
* - Extract method
|
|
79842
|
-
* - Extract function
|
|
79843
|
-
* - Extract variable
|
|
79844
|
-
* - Extract interface from class
|
|
79845
|
-
* - ...
|
|
79846
|
-
*/
|
|
79847
|
-
CodeActionKind.RefactorExtract = 'refactor.extract';
|
|
79848
|
-
/**
|
|
79849
|
-
* Base kind for refactoring inline actions: 'refactor.inline'
|
|
79850
|
-
*
|
|
79851
|
-
* Example inline actions:
|
|
79852
|
-
*
|
|
79853
|
-
* - Inline function
|
|
79854
|
-
* - Inline variable
|
|
79855
|
-
* - Inline constant
|
|
79856
|
-
* - ...
|
|
79857
|
-
*/
|
|
79858
|
-
CodeActionKind.RefactorInline = 'refactor.inline';
|
|
80093
|
+
SelectionRange.create = create;
|
|
80094
|
+
function is(value) {
|
|
80095
|
+
var candidate = value;
|
|
80096
|
+
return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
|
|
80097
|
+
}
|
|
80098
|
+
SelectionRange.is = is;
|
|
80099
|
+
})(SelectionRange || (exports.SelectionRange = SelectionRange = {}));
|
|
79859
80100
|
/**
|
|
79860
|
-
*
|
|
79861
|
-
*
|
|
79862
|
-
*
|
|
80101
|
+
* A set of predefined token types. This set is not fixed
|
|
80102
|
+
* an clients can specify additional token types via the
|
|
80103
|
+
* corresponding client capabilities.
|
|
79863
80104
|
*
|
|
79864
|
-
*
|
|
79865
|
-
* - Add or remove parameter
|
|
79866
|
-
* - Encapsulate field
|
|
79867
|
-
* - Make method static
|
|
79868
|
-
* - Move method to base class
|
|
79869
|
-
* - ...
|
|
80105
|
+
* @since 3.16.0
|
|
79870
80106
|
*/
|
|
79871
|
-
|
|
80107
|
+
var SemanticTokenTypes;
|
|
80108
|
+
(function (SemanticTokenTypes) {
|
|
80109
|
+
SemanticTokenTypes["namespace"] = "namespace";
|
|
80110
|
+
/**
|
|
80111
|
+
* Represents a generic type. Acts as a fallback for types which can't be mapped to
|
|
80112
|
+
* a specific type like class or enum.
|
|
80113
|
+
*/
|
|
80114
|
+
SemanticTokenTypes["type"] = "type";
|
|
80115
|
+
SemanticTokenTypes["class"] = "class";
|
|
80116
|
+
SemanticTokenTypes["enum"] = "enum";
|
|
80117
|
+
SemanticTokenTypes["interface"] = "interface";
|
|
80118
|
+
SemanticTokenTypes["struct"] = "struct";
|
|
80119
|
+
SemanticTokenTypes["typeParameter"] = "typeParameter";
|
|
80120
|
+
SemanticTokenTypes["parameter"] = "parameter";
|
|
80121
|
+
SemanticTokenTypes["variable"] = "variable";
|
|
80122
|
+
SemanticTokenTypes["property"] = "property";
|
|
80123
|
+
SemanticTokenTypes["enumMember"] = "enumMember";
|
|
80124
|
+
SemanticTokenTypes["event"] = "event";
|
|
80125
|
+
SemanticTokenTypes["function"] = "function";
|
|
80126
|
+
SemanticTokenTypes["method"] = "method";
|
|
80127
|
+
SemanticTokenTypes["macro"] = "macro";
|
|
80128
|
+
SemanticTokenTypes["keyword"] = "keyword";
|
|
80129
|
+
SemanticTokenTypes["modifier"] = "modifier";
|
|
80130
|
+
SemanticTokenTypes["comment"] = "comment";
|
|
80131
|
+
SemanticTokenTypes["string"] = "string";
|
|
80132
|
+
SemanticTokenTypes["number"] = "number";
|
|
80133
|
+
SemanticTokenTypes["regexp"] = "regexp";
|
|
80134
|
+
SemanticTokenTypes["operator"] = "operator";
|
|
80135
|
+
/**
|
|
80136
|
+
* @since 3.17.0
|
|
80137
|
+
*/
|
|
80138
|
+
SemanticTokenTypes["decorator"] = "decorator";
|
|
80139
|
+
})(SemanticTokenTypes || (exports.SemanticTokenTypes = SemanticTokenTypes = {}));
|
|
79872
80140
|
/**
|
|
79873
|
-
*
|
|
80141
|
+
* A set of predefined token modifiers. This set is not fixed
|
|
80142
|
+
* an clients can specify additional token types via the
|
|
80143
|
+
* corresponding client capabilities.
|
|
79874
80144
|
*
|
|
79875
|
-
*
|
|
80145
|
+
* @since 3.16.0
|
|
79876
80146
|
*/
|
|
79877
|
-
|
|
80147
|
+
var SemanticTokenModifiers;
|
|
80148
|
+
(function (SemanticTokenModifiers) {
|
|
80149
|
+
SemanticTokenModifiers["declaration"] = "declaration";
|
|
80150
|
+
SemanticTokenModifiers["definition"] = "definition";
|
|
80151
|
+
SemanticTokenModifiers["readonly"] = "readonly";
|
|
80152
|
+
SemanticTokenModifiers["static"] = "static";
|
|
80153
|
+
SemanticTokenModifiers["deprecated"] = "deprecated";
|
|
80154
|
+
SemanticTokenModifiers["abstract"] = "abstract";
|
|
80155
|
+
SemanticTokenModifiers["async"] = "async";
|
|
80156
|
+
SemanticTokenModifiers["modification"] = "modification";
|
|
80157
|
+
SemanticTokenModifiers["documentation"] = "documentation";
|
|
80158
|
+
SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
|
|
80159
|
+
})(SemanticTokenModifiers || (exports.SemanticTokenModifiers = SemanticTokenModifiers = {}));
|
|
79878
80160
|
/**
|
|
79879
|
-
*
|
|
80161
|
+
* @since 3.16.0
|
|
79880
80162
|
*/
|
|
79881
|
-
|
|
80163
|
+
var SemanticTokens;
|
|
80164
|
+
(function (SemanticTokens) {
|
|
80165
|
+
function is(value) {
|
|
80166
|
+
var candidate = value;
|
|
80167
|
+
return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
|
|
80168
|
+
Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
|
|
80169
|
+
}
|
|
80170
|
+
SemanticTokens.is = is;
|
|
80171
|
+
})(SemanticTokens || (exports.SemanticTokens = SemanticTokens = {}));
|
|
79882
80172
|
/**
|
|
79883
|
-
*
|
|
80173
|
+
* The InlineValueText namespace provides functions to deal with InlineValueTexts.
|
|
79884
80174
|
*
|
|
79885
|
-
*
|
|
79886
|
-
* They should not suppress errors or perform unsafe fixes such as generating new types or classes.
|
|
79887
|
-
*
|
|
79888
|
-
* @since 3.15.0
|
|
79889
|
-
*/
|
|
79890
|
-
CodeActionKind.SourceFixAll = 'source.fixAll';
|
|
79891
|
-
})(CodeActionKind || (CodeActionKind = {}));
|
|
79892
|
-
/**
|
|
79893
|
-
* The reason why code actions were requested.
|
|
79894
|
-
*
|
|
79895
|
-
* @since 3.17.0
|
|
79896
|
-
*/
|
|
79897
|
-
var CodeActionTriggerKind;
|
|
79898
|
-
(function (CodeActionTriggerKind) {
|
|
79899
|
-
/**
|
|
79900
|
-
* Code actions were explicitly requested by the user or by an extension.
|
|
80175
|
+
* @since 3.17.0
|
|
79901
80176
|
*/
|
|
79902
|
-
|
|
80177
|
+
var InlineValueText;
|
|
80178
|
+
(function (InlineValueText) {
|
|
80179
|
+
/**
|
|
80180
|
+
* Creates a new InlineValueText literal.
|
|
80181
|
+
*/
|
|
80182
|
+
function create(range, text) {
|
|
80183
|
+
return { range: range, text: text };
|
|
80184
|
+
}
|
|
80185
|
+
InlineValueText.create = create;
|
|
80186
|
+
function is(value) {
|
|
80187
|
+
var candidate = value;
|
|
80188
|
+
return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);
|
|
80189
|
+
}
|
|
80190
|
+
InlineValueText.is = is;
|
|
80191
|
+
})(InlineValueText || (exports.InlineValueText = InlineValueText = {}));
|
|
79903
80192
|
/**
|
|
79904
|
-
*
|
|
80193
|
+
* The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups.
|
|
79905
80194
|
*
|
|
79906
|
-
*
|
|
79907
|
-
* also be triggered when file content changes.
|
|
79908
|
-
*/
|
|
79909
|
-
CodeActionTriggerKind.Automatic = 2;
|
|
79910
|
-
})(CodeActionTriggerKind || (CodeActionTriggerKind = {}));
|
|
79911
|
-
/**
|
|
79912
|
-
* The CodeActionContext namespace provides helper functions to work with
|
|
79913
|
-
* {@link CodeActionContext} literals.
|
|
79914
|
-
*/
|
|
79915
|
-
var CodeActionContext;
|
|
79916
|
-
(function (CodeActionContext) {
|
|
79917
|
-
/**
|
|
79918
|
-
* Creates a new CodeActionContext literal.
|
|
80195
|
+
* @since 3.17.0
|
|
79919
80196
|
*/
|
|
79920
|
-
|
|
79921
|
-
|
|
79922
|
-
|
|
79923
|
-
|
|
80197
|
+
var InlineValueVariableLookup;
|
|
80198
|
+
(function (InlineValueVariableLookup) {
|
|
80199
|
+
/**
|
|
80200
|
+
* Creates a new InlineValueText literal.
|
|
80201
|
+
*/
|
|
80202
|
+
function create(range, variableName, caseSensitiveLookup) {
|
|
80203
|
+
return { range: range, variableName: variableName, caseSensitiveLookup: caseSensitiveLookup };
|
|
79924
80204
|
}
|
|
79925
|
-
|
|
79926
|
-
|
|
80205
|
+
InlineValueVariableLookup.create = create;
|
|
80206
|
+
function is(value) {
|
|
80207
|
+
var candidate = value;
|
|
80208
|
+
return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup)
|
|
80209
|
+
&& (Is.string(candidate.variableName) || candidate.variableName === undefined);
|
|
79927
80210
|
}
|
|
79928
|
-
|
|
79929
|
-
}
|
|
79930
|
-
CodeActionContext.create = create;
|
|
80211
|
+
InlineValueVariableLookup.is = is;
|
|
80212
|
+
})(InlineValueVariableLookup || (exports.InlineValueVariableLookup = InlineValueVariableLookup = {}));
|
|
79931
80213
|
/**
|
|
79932
|
-
*
|
|
80214
|
+
* The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression.
|
|
80215
|
+
*
|
|
80216
|
+
* @since 3.17.0
|
|
79933
80217
|
*/
|
|
79934
|
-
|
|
79935
|
-
|
|
79936
|
-
|
|
79937
|
-
|
|
79938
|
-
|
|
79939
|
-
|
|
79940
|
-
|
|
79941
|
-
})(CodeActionContext || (CodeActionContext = {}));
|
|
79942
|
-
var CodeAction;
|
|
79943
|
-
(function (CodeAction) {
|
|
79944
|
-
function create(title, kindOrCommandOrEdit, kind) {
|
|
79945
|
-
var result = { title: title };
|
|
79946
|
-
var checkKind = true;
|
|
79947
|
-
if (typeof kindOrCommandOrEdit === 'string') {
|
|
79948
|
-
checkKind = false;
|
|
79949
|
-
result.kind = kindOrCommandOrEdit;
|
|
79950
|
-
}
|
|
79951
|
-
else if (Command.is(kindOrCommandOrEdit)) {
|
|
79952
|
-
result.command = kindOrCommandOrEdit;
|
|
79953
|
-
}
|
|
79954
|
-
else {
|
|
79955
|
-
result.edit = kindOrCommandOrEdit;
|
|
80218
|
+
var InlineValueEvaluatableExpression;
|
|
80219
|
+
(function (InlineValueEvaluatableExpression) {
|
|
80220
|
+
/**
|
|
80221
|
+
* Creates a new InlineValueEvaluatableExpression literal.
|
|
80222
|
+
*/
|
|
80223
|
+
function create(range, expression) {
|
|
80224
|
+
return { range: range, expression: expression };
|
|
79956
80225
|
}
|
|
79957
|
-
|
|
79958
|
-
|
|
80226
|
+
InlineValueEvaluatableExpression.create = create;
|
|
80227
|
+
function is(value) {
|
|
80228
|
+
var candidate = value;
|
|
80229
|
+
return candidate !== undefined && candidate !== null && Range.is(candidate.range)
|
|
80230
|
+
&& (Is.string(candidate.expression) || candidate.expression === undefined);
|
|
79959
80231
|
}
|
|
79960
|
-
|
|
79961
|
-
}
|
|
79962
|
-
CodeAction.create = create;
|
|
79963
|
-
function is(value) {
|
|
79964
|
-
var candidate = value;
|
|
79965
|
-
return candidate && Is.string(candidate.title) &&
|
|
79966
|
-
(candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
|
|
79967
|
-
(candidate.kind === undefined || Is.string(candidate.kind)) &&
|
|
79968
|
-
(candidate.edit !== undefined || candidate.command !== undefined) &&
|
|
79969
|
-
(candidate.command === undefined || Command.is(candidate.command)) &&
|
|
79970
|
-
(candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&
|
|
79971
|
-
(candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
|
|
79972
|
-
}
|
|
79973
|
-
CodeAction.is = is;
|
|
79974
|
-
})(CodeAction || (CodeAction = {}));
|
|
79975
|
-
/**
|
|
79976
|
-
* The CodeLens namespace provides helper functions to work with
|
|
79977
|
-
* {@link CodeLens} literals.
|
|
79978
|
-
*/
|
|
79979
|
-
var CodeLens;
|
|
79980
|
-
(function (CodeLens) {
|
|
80232
|
+
InlineValueEvaluatableExpression.is = is;
|
|
80233
|
+
})(InlineValueEvaluatableExpression || (exports.InlineValueEvaluatableExpression = InlineValueEvaluatableExpression = {}));
|
|
79981
80234
|
/**
|
|
79982
|
-
*
|
|
80235
|
+
* The InlineValueContext namespace provides helper functions to work with
|
|
80236
|
+
* {@link InlineValueContext} literals.
|
|
80237
|
+
*
|
|
80238
|
+
* @since 3.17.0
|
|
79983
80239
|
*/
|
|
79984
|
-
|
|
79985
|
-
|
|
79986
|
-
|
|
79987
|
-
|
|
80240
|
+
var InlineValueContext;
|
|
80241
|
+
(function (InlineValueContext) {
|
|
80242
|
+
/**
|
|
80243
|
+
* Creates a new InlineValueContext literal.
|
|
80244
|
+
*/
|
|
80245
|
+
function create(frameId, stoppedLocation) {
|
|
80246
|
+
return { frameId: frameId, stoppedLocation: stoppedLocation };
|
|
79988
80247
|
}
|
|
79989
|
-
|
|
79990
|
-
|
|
79991
|
-
|
|
79992
|
-
|
|
79993
|
-
|
|
79994
|
-
|
|
79995
|
-
|
|
79996
|
-
|
|
79997
|
-
|
|
79998
|
-
}
|
|
79999
|
-
CodeLens.is = is;
|
|
80000
|
-
})(CodeLens || (CodeLens = {}));
|
|
80001
|
-
/**
|
|
80002
|
-
* The FormattingOptions namespace provides helper functions to work with
|
|
80003
|
-
* {@link FormattingOptions} literals.
|
|
80004
|
-
*/
|
|
80005
|
-
var FormattingOptions;
|
|
80006
|
-
(function (FormattingOptions) {
|
|
80007
|
-
/**
|
|
80008
|
-
* Creates a new FormattingOptions literal.
|
|
80009
|
-
*/
|
|
80010
|
-
function create(tabSize, insertSpaces) {
|
|
80011
|
-
return { tabSize: tabSize, insertSpaces: insertSpaces };
|
|
80012
|
-
}
|
|
80013
|
-
FormattingOptions.create = create;
|
|
80014
|
-
/**
|
|
80015
|
-
* Checks whether the given literal conforms to the {@link FormattingOptions} interface.
|
|
80016
|
-
*/
|
|
80017
|
-
function is(value) {
|
|
80018
|
-
var candidate = value;
|
|
80019
|
-
return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
|
|
80020
|
-
}
|
|
80021
|
-
FormattingOptions.is = is;
|
|
80022
|
-
})(FormattingOptions || (FormattingOptions = {}));
|
|
80023
|
-
/**
|
|
80024
|
-
* The DocumentLink namespace provides helper functions to work with
|
|
80025
|
-
* {@link DocumentLink} literals.
|
|
80026
|
-
*/
|
|
80027
|
-
var DocumentLink;
|
|
80028
|
-
(function (DocumentLink) {
|
|
80029
|
-
/**
|
|
80030
|
-
* Creates a new DocumentLink literal.
|
|
80031
|
-
*/
|
|
80032
|
-
function create(range, target, data) {
|
|
80033
|
-
return { range: range, target: target, data: data };
|
|
80034
|
-
}
|
|
80035
|
-
DocumentLink.create = create;
|
|
80036
|
-
/**
|
|
80037
|
-
* Checks whether the given literal conforms to the {@link DocumentLink} interface.
|
|
80038
|
-
*/
|
|
80039
|
-
function is(value) {
|
|
80040
|
-
var candidate = value;
|
|
80041
|
-
return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
|
|
80042
|
-
}
|
|
80043
|
-
DocumentLink.is = is;
|
|
80044
|
-
})(DocumentLink || (DocumentLink = {}));
|
|
80045
|
-
/**
|
|
80046
|
-
* The SelectionRange namespace provides helper function to work with
|
|
80047
|
-
* SelectionRange literals.
|
|
80048
|
-
*/
|
|
80049
|
-
var SelectionRange;
|
|
80050
|
-
(function (SelectionRange) {
|
|
80051
|
-
/**
|
|
80052
|
-
* Creates a new SelectionRange
|
|
80053
|
-
* @param range the range.
|
|
80054
|
-
* @param parent an optional parent.
|
|
80055
|
-
*/
|
|
80056
|
-
function create(range, parent) {
|
|
80057
|
-
return { range: range, parent: parent };
|
|
80058
|
-
}
|
|
80059
|
-
SelectionRange.create = create;
|
|
80060
|
-
function is(value) {
|
|
80061
|
-
var candidate = value;
|
|
80062
|
-
return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
|
|
80063
|
-
}
|
|
80064
|
-
SelectionRange.is = is;
|
|
80065
|
-
})(SelectionRange || (SelectionRange = {}));
|
|
80066
|
-
/**
|
|
80067
|
-
* A set of predefined token types. This set is not fixed
|
|
80068
|
-
* an clients can specify additional token types via the
|
|
80069
|
-
* corresponding client capabilities.
|
|
80070
|
-
*
|
|
80071
|
-
* @since 3.16.0
|
|
80072
|
-
*/
|
|
80073
|
-
var SemanticTokenTypes;
|
|
80074
|
-
(function (SemanticTokenTypes) {
|
|
80075
|
-
SemanticTokenTypes["namespace"] = "namespace";
|
|
80076
|
-
/**
|
|
80077
|
-
* Represents a generic type. Acts as a fallback for types which can't be mapped to
|
|
80078
|
-
* a specific type like class or enum.
|
|
80079
|
-
*/
|
|
80080
|
-
SemanticTokenTypes["type"] = "type";
|
|
80081
|
-
SemanticTokenTypes["class"] = "class";
|
|
80082
|
-
SemanticTokenTypes["enum"] = "enum";
|
|
80083
|
-
SemanticTokenTypes["interface"] = "interface";
|
|
80084
|
-
SemanticTokenTypes["struct"] = "struct";
|
|
80085
|
-
SemanticTokenTypes["typeParameter"] = "typeParameter";
|
|
80086
|
-
SemanticTokenTypes["parameter"] = "parameter";
|
|
80087
|
-
SemanticTokenTypes["variable"] = "variable";
|
|
80088
|
-
SemanticTokenTypes["property"] = "property";
|
|
80089
|
-
SemanticTokenTypes["enumMember"] = "enumMember";
|
|
80090
|
-
SemanticTokenTypes["event"] = "event";
|
|
80091
|
-
SemanticTokenTypes["function"] = "function";
|
|
80092
|
-
SemanticTokenTypes["method"] = "method";
|
|
80093
|
-
SemanticTokenTypes["macro"] = "macro";
|
|
80094
|
-
SemanticTokenTypes["keyword"] = "keyword";
|
|
80095
|
-
SemanticTokenTypes["modifier"] = "modifier";
|
|
80096
|
-
SemanticTokenTypes["comment"] = "comment";
|
|
80097
|
-
SemanticTokenTypes["string"] = "string";
|
|
80098
|
-
SemanticTokenTypes["number"] = "number";
|
|
80099
|
-
SemanticTokenTypes["regexp"] = "regexp";
|
|
80100
|
-
SemanticTokenTypes["operator"] = "operator";
|
|
80248
|
+
InlineValueContext.create = create;
|
|
80249
|
+
/**
|
|
80250
|
+
* Checks whether the given literal conforms to the {@link InlineValueContext} interface.
|
|
80251
|
+
*/
|
|
80252
|
+
function is(value) {
|
|
80253
|
+
var candidate = value;
|
|
80254
|
+
return Is.defined(candidate) && Range.is(value.stoppedLocation);
|
|
80255
|
+
}
|
|
80256
|
+
InlineValueContext.is = is;
|
|
80257
|
+
})(InlineValueContext || (exports.InlineValueContext = InlineValueContext = {}));
|
|
80101
80258
|
/**
|
|
80259
|
+
* Inlay hint kinds.
|
|
80260
|
+
*
|
|
80102
80261
|
* @since 3.17.0
|
|
80103
80262
|
*/
|
|
80104
|
-
|
|
80105
|
-
|
|
80106
|
-
/**
|
|
80107
|
-
|
|
80108
|
-
|
|
80109
|
-
|
|
80110
|
-
|
|
80111
|
-
|
|
80112
|
-
|
|
80113
|
-
|
|
80114
|
-
|
|
80115
|
-
|
|
80116
|
-
|
|
80117
|
-
|
|
80118
|
-
|
|
80119
|
-
|
|
80120
|
-
|
|
80121
|
-
|
|
80122
|
-
|
|
80123
|
-
|
|
80124
|
-
|
|
80125
|
-
|
|
80126
|
-
|
|
80127
|
-
|
|
80128
|
-
|
|
80129
|
-
|
|
80130
|
-
(
|
|
80131
|
-
|
|
80132
|
-
|
|
80133
|
-
|
|
80134
|
-
|
|
80135
|
-
|
|
80136
|
-
|
|
80137
|
-
|
|
80138
|
-
|
|
80139
|
-
|
|
80140
|
-
|
|
80141
|
-
|
|
80142
|
-
*/
|
|
80143
|
-
var InlineValueText;
|
|
80144
|
-
(function (InlineValueText) {
|
|
80145
|
-
/**
|
|
80146
|
-
* Creates a new InlineValueText literal.
|
|
80147
|
-
*/
|
|
80148
|
-
function create(range, text) {
|
|
80149
|
-
return { range: range, text: text };
|
|
80150
|
-
}
|
|
80151
|
-
InlineValueText.create = create;
|
|
80152
|
-
function is(value) {
|
|
80153
|
-
var candidate = value;
|
|
80154
|
-
return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);
|
|
80155
|
-
}
|
|
80156
|
-
InlineValueText.is = is;
|
|
80157
|
-
})(InlineValueText || (InlineValueText = {}));
|
|
80158
|
-
/**
|
|
80159
|
-
* The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups.
|
|
80160
|
-
*
|
|
80161
|
-
* @since 3.17.0
|
|
80162
|
-
*/
|
|
80163
|
-
var InlineValueVariableLookup;
|
|
80164
|
-
(function (InlineValueVariableLookup) {
|
|
80165
|
-
/**
|
|
80166
|
-
* Creates a new InlineValueText literal.
|
|
80167
|
-
*/
|
|
80168
|
-
function create(range, variableName, caseSensitiveLookup) {
|
|
80169
|
-
return { range: range, variableName: variableName, caseSensitiveLookup: caseSensitiveLookup };
|
|
80170
|
-
}
|
|
80171
|
-
InlineValueVariableLookup.create = create;
|
|
80172
|
-
function is(value) {
|
|
80173
|
-
var candidate = value;
|
|
80174
|
-
return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup)
|
|
80175
|
-
&& (Is.string(candidate.variableName) || candidate.variableName === undefined);
|
|
80176
|
-
}
|
|
80177
|
-
InlineValueVariableLookup.is = is;
|
|
80178
|
-
})(InlineValueVariableLookup || (InlineValueVariableLookup = {}));
|
|
80179
|
-
/**
|
|
80180
|
-
* The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression.
|
|
80181
|
-
*
|
|
80182
|
-
* @since 3.17.0
|
|
80183
|
-
*/
|
|
80184
|
-
var InlineValueEvaluatableExpression;
|
|
80185
|
-
(function (InlineValueEvaluatableExpression) {
|
|
80186
|
-
/**
|
|
80187
|
-
* Creates a new InlineValueEvaluatableExpression literal.
|
|
80188
|
-
*/
|
|
80189
|
-
function create(range, expression) {
|
|
80190
|
-
return { range: range, expression: expression };
|
|
80191
|
-
}
|
|
80192
|
-
InlineValueEvaluatableExpression.create = create;
|
|
80193
|
-
function is(value) {
|
|
80194
|
-
var candidate = value;
|
|
80195
|
-
return candidate !== undefined && candidate !== null && Range.is(candidate.range)
|
|
80196
|
-
&& (Is.string(candidate.expression) || candidate.expression === undefined);
|
|
80197
|
-
}
|
|
80198
|
-
InlineValueEvaluatableExpression.is = is;
|
|
80199
|
-
})(InlineValueEvaluatableExpression || (InlineValueEvaluatableExpression = {}));
|
|
80200
|
-
/**
|
|
80201
|
-
* The InlineValueContext namespace provides helper functions to work with
|
|
80202
|
-
* {@link InlineValueContext} literals.
|
|
80203
|
-
*
|
|
80204
|
-
* @since 3.17.0
|
|
80205
|
-
*/
|
|
80206
|
-
var InlineValueContext;
|
|
80207
|
-
(function (InlineValueContext) {
|
|
80208
|
-
/**
|
|
80209
|
-
* Creates a new InlineValueContext literal.
|
|
80210
|
-
*/
|
|
80211
|
-
function create(frameId, stoppedLocation) {
|
|
80212
|
-
return { frameId: frameId, stoppedLocation: stoppedLocation };
|
|
80213
|
-
}
|
|
80214
|
-
InlineValueContext.create = create;
|
|
80215
|
-
/**
|
|
80216
|
-
* Checks whether the given literal conforms to the {@link InlineValueContext} interface.
|
|
80217
|
-
*/
|
|
80218
|
-
function is(value) {
|
|
80219
|
-
var candidate = value;
|
|
80220
|
-
return Is.defined(candidate) && Range.is(value.stoppedLocation);
|
|
80221
|
-
}
|
|
80222
|
-
InlineValueContext.is = is;
|
|
80223
|
-
})(InlineValueContext || (InlineValueContext = {}));
|
|
80224
|
-
/**
|
|
80225
|
-
* Inlay hint kinds.
|
|
80226
|
-
*
|
|
80227
|
-
* @since 3.17.0
|
|
80228
|
-
*/
|
|
80229
|
-
var InlayHintKind;
|
|
80230
|
-
(function (InlayHintKind) {
|
|
80231
|
-
/**
|
|
80232
|
-
* An inlay hint that for a type annotation.
|
|
80233
|
-
*/
|
|
80234
|
-
InlayHintKind.Type = 1;
|
|
80235
|
-
/**
|
|
80236
|
-
* An inlay hint that is for a parameter.
|
|
80237
|
-
*/
|
|
80238
|
-
InlayHintKind.Parameter = 2;
|
|
80239
|
-
function is(value) {
|
|
80240
|
-
return value === 1 || value === 2;
|
|
80241
|
-
}
|
|
80242
|
-
InlayHintKind.is = is;
|
|
80243
|
-
})(InlayHintKind || (InlayHintKind = {}));
|
|
80244
|
-
var InlayHintLabelPart;
|
|
80245
|
-
(function (InlayHintLabelPart) {
|
|
80246
|
-
function create(value) {
|
|
80247
|
-
return { value: value };
|
|
80248
|
-
}
|
|
80249
|
-
InlayHintLabelPart.create = create;
|
|
80250
|
-
function is(value) {
|
|
80251
|
-
var candidate = value;
|
|
80252
|
-
return Is.objectLiteral(candidate)
|
|
80253
|
-
&& (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
|
|
80254
|
-
&& (candidate.location === undefined || Location.is(candidate.location))
|
|
80255
|
-
&& (candidate.command === undefined || Command.is(candidate.command));
|
|
80256
|
-
}
|
|
80257
|
-
InlayHintLabelPart.is = is;
|
|
80258
|
-
})(InlayHintLabelPart || (InlayHintLabelPart = {}));
|
|
80259
|
-
var InlayHint;
|
|
80260
|
-
(function (InlayHint) {
|
|
80261
|
-
function create(position, label, kind) {
|
|
80262
|
-
var result = { position: position, label: label };
|
|
80263
|
-
if (kind !== undefined) {
|
|
80264
|
-
result.kind = kind;
|
|
80263
|
+
var InlayHintKind;
|
|
80264
|
+
(function (InlayHintKind) {
|
|
80265
|
+
/**
|
|
80266
|
+
* An inlay hint that for a type annotation.
|
|
80267
|
+
*/
|
|
80268
|
+
InlayHintKind.Type = 1;
|
|
80269
|
+
/**
|
|
80270
|
+
* An inlay hint that is for a parameter.
|
|
80271
|
+
*/
|
|
80272
|
+
InlayHintKind.Parameter = 2;
|
|
80273
|
+
function is(value) {
|
|
80274
|
+
return value === 1 || value === 2;
|
|
80275
|
+
}
|
|
80276
|
+
InlayHintKind.is = is;
|
|
80277
|
+
})(InlayHintKind || (exports.InlayHintKind = InlayHintKind = {}));
|
|
80278
|
+
var InlayHintLabelPart;
|
|
80279
|
+
(function (InlayHintLabelPart) {
|
|
80280
|
+
function create(value) {
|
|
80281
|
+
return { value: value };
|
|
80282
|
+
}
|
|
80283
|
+
InlayHintLabelPart.create = create;
|
|
80284
|
+
function is(value) {
|
|
80285
|
+
var candidate = value;
|
|
80286
|
+
return Is.objectLiteral(candidate)
|
|
80287
|
+
&& (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
|
|
80288
|
+
&& (candidate.location === undefined || Location.is(candidate.location))
|
|
80289
|
+
&& (candidate.command === undefined || Command.is(candidate.command));
|
|
80290
|
+
}
|
|
80291
|
+
InlayHintLabelPart.is = is;
|
|
80292
|
+
})(InlayHintLabelPart || (exports.InlayHintLabelPart = InlayHintLabelPart = {}));
|
|
80293
|
+
var InlayHint;
|
|
80294
|
+
(function (InlayHint) {
|
|
80295
|
+
function create(position, label, kind) {
|
|
80296
|
+
var result = { position: position, label: label };
|
|
80297
|
+
if (kind !== undefined) {
|
|
80298
|
+
result.kind = kind;
|
|
80299
|
+
}
|
|
80300
|
+
return result;
|
|
80265
80301
|
}
|
|
80266
|
-
|
|
80267
|
-
|
|
80268
|
-
|
|
80269
|
-
|
|
80270
|
-
|
|
80271
|
-
|
|
80272
|
-
|
|
80273
|
-
|
|
80274
|
-
|
|
80275
|
-
|
|
80276
|
-
|
|
80277
|
-
|
|
80278
|
-
}
|
|
80279
|
-
|
|
80280
|
-
|
|
80281
|
-
|
|
80282
|
-
|
|
80283
|
-
|
|
80284
|
-
|
|
80285
|
-
|
|
80286
|
-
|
|
80287
|
-
|
|
80288
|
-
|
|
80289
|
-
|
|
80290
|
-
|
|
80291
|
-
|
|
80292
|
-
|
|
80293
|
-
var
|
|
80294
|
-
(function (
|
|
80302
|
+
InlayHint.create = create;
|
|
80303
|
+
function is(value) {
|
|
80304
|
+
var candidate = value;
|
|
80305
|
+
return Is.objectLiteral(candidate) && Position.is(candidate.position)
|
|
80306
|
+
&& (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is))
|
|
80307
|
+
&& (candidate.kind === undefined || InlayHintKind.is(candidate.kind))
|
|
80308
|
+
&& (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is)
|
|
80309
|
+
&& (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
|
|
80310
|
+
&& (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft))
|
|
80311
|
+
&& (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight));
|
|
80312
|
+
}
|
|
80313
|
+
InlayHint.is = is;
|
|
80314
|
+
})(InlayHint || (exports.InlayHint = InlayHint = {}));
|
|
80315
|
+
var StringValue;
|
|
80316
|
+
(function (StringValue) {
|
|
80317
|
+
function createSnippet(value) {
|
|
80318
|
+
return { kind: 'snippet', value: value };
|
|
80319
|
+
}
|
|
80320
|
+
StringValue.createSnippet = createSnippet;
|
|
80321
|
+
})(StringValue || (exports.StringValue = StringValue = {}));
|
|
80322
|
+
var InlineCompletionItem;
|
|
80323
|
+
(function (InlineCompletionItem) {
|
|
80324
|
+
function create(insertText, filterText, range, command) {
|
|
80325
|
+
return { insertText: insertText, filterText: filterText, range: range, command: command };
|
|
80326
|
+
}
|
|
80327
|
+
InlineCompletionItem.create = create;
|
|
80328
|
+
})(InlineCompletionItem || (exports.InlineCompletionItem = InlineCompletionItem = {}));
|
|
80329
|
+
var InlineCompletionList;
|
|
80330
|
+
(function (InlineCompletionList) {
|
|
80331
|
+
function create(items) {
|
|
80332
|
+
return { items: items };
|
|
80333
|
+
}
|
|
80334
|
+
InlineCompletionList.create = create;
|
|
80335
|
+
})(InlineCompletionList || (exports.InlineCompletionList = InlineCompletionList = {}));
|
|
80295
80336
|
/**
|
|
80296
|
-
*
|
|
80297
|
-
*
|
|
80298
|
-
* @
|
|
80299
|
-
* @
|
|
80300
|
-
* @param content The document's content.
|
|
80337
|
+
* Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered.
|
|
80338
|
+
*
|
|
80339
|
+
* @since 3.18.0
|
|
80340
|
+
* @proposed
|
|
80301
80341
|
*/
|
|
80302
|
-
|
|
80303
|
-
|
|
80304
|
-
|
|
80305
|
-
|
|
80342
|
+
var InlineCompletionTriggerKind;
|
|
80343
|
+
(function (InlineCompletionTriggerKind) {
|
|
80344
|
+
/**
|
|
80345
|
+
* Completion was triggered explicitly by a user gesture.
|
|
80346
|
+
*/
|
|
80347
|
+
InlineCompletionTriggerKind.Invoked = 0;
|
|
80348
|
+
/**
|
|
80349
|
+
* Completion was triggered automatically while editing.
|
|
80350
|
+
*/
|
|
80351
|
+
InlineCompletionTriggerKind.Automatic = 1;
|
|
80352
|
+
})(InlineCompletionTriggerKind || (exports.InlineCompletionTriggerKind = InlineCompletionTriggerKind = {}));
|
|
80353
|
+
var SelectedCompletionInfo;
|
|
80354
|
+
(function (SelectedCompletionInfo) {
|
|
80355
|
+
function create(range, text) {
|
|
80356
|
+
return { range: range, text: text };
|
|
80357
|
+
}
|
|
80358
|
+
SelectedCompletionInfo.create = create;
|
|
80359
|
+
})(SelectedCompletionInfo || (exports.SelectedCompletionInfo = SelectedCompletionInfo = {}));
|
|
80360
|
+
var InlineCompletionContext;
|
|
80361
|
+
(function (InlineCompletionContext) {
|
|
80362
|
+
function create(triggerKind, selectedCompletionInfo) {
|
|
80363
|
+
return { triggerKind: triggerKind, selectedCompletionInfo: selectedCompletionInfo };
|
|
80364
|
+
}
|
|
80365
|
+
InlineCompletionContext.create = create;
|
|
80366
|
+
})(InlineCompletionContext || (exports.InlineCompletionContext = InlineCompletionContext = {}));
|
|
80367
|
+
var WorkspaceFolder;
|
|
80368
|
+
(function (WorkspaceFolder) {
|
|
80369
|
+
function is(value) {
|
|
80370
|
+
var candidate = value;
|
|
80371
|
+
return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);
|
|
80372
|
+
}
|
|
80373
|
+
WorkspaceFolder.is = is;
|
|
80374
|
+
})(WorkspaceFolder || (exports.WorkspaceFolder = WorkspaceFolder = {}));
|
|
80375
|
+
exports.EOL = ['\n', '\r\n', '\r'];
|
|
80306
80376
|
/**
|
|
80307
|
-
*
|
|
80377
|
+
* @deprecated Use the text document from the new vscode-languageserver-textdocument package.
|
|
80308
80378
|
*/
|
|
80309
|
-
|
|
80310
|
-
|
|
80311
|
-
|
|
80312
|
-
|
|
80313
|
-
|
|
80314
|
-
|
|
80315
|
-
|
|
80316
|
-
|
|
80317
|
-
|
|
80318
|
-
|
|
80319
|
-
|
|
80320
|
-
return a.range.start.character - b.range.start.character;
|
|
80321
|
-
}
|
|
80322
|
-
return diff;
|
|
80323
|
-
});
|
|
80324
|
-
var lastModifiedOffset = text.length;
|
|
80325
|
-
for (var i = sortedEdits.length - 1; i >= 0; i--) {
|
|
80326
|
-
var e = sortedEdits[i];
|
|
80327
|
-
var startOffset = document.offsetAt(e.range.start);
|
|
80328
|
-
var endOffset = document.offsetAt(e.range.end);
|
|
80329
|
-
if (endOffset <= lastModifiedOffset) {
|
|
80330
|
-
text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
|
|
80331
|
-
}
|
|
80332
|
-
else {
|
|
80333
|
-
throw new Error('Overlapping edit');
|
|
80334
|
-
}
|
|
80335
|
-
lastModifiedOffset = startOffset;
|
|
80336
|
-
}
|
|
80337
|
-
return text;
|
|
80338
|
-
}
|
|
80339
|
-
TextDocument.applyEdits = applyEdits;
|
|
80340
|
-
function mergeSort(data, compare) {
|
|
80341
|
-
if (data.length <= 1) {
|
|
80342
|
-
// sorted
|
|
80343
|
-
return data;
|
|
80379
|
+
var TextDocument;
|
|
80380
|
+
(function (TextDocument) {
|
|
80381
|
+
/**
|
|
80382
|
+
* Creates a new ITextDocument literal from the given uri and content.
|
|
80383
|
+
* @param uri The document's uri.
|
|
80384
|
+
* @param languageId The document's language Id.
|
|
80385
|
+
* @param version The document's version.
|
|
80386
|
+
* @param content The document's content.
|
|
80387
|
+
*/
|
|
80388
|
+
function create(uri, languageId, version, content) {
|
|
80389
|
+
return new FullTextDocument(uri, languageId, version, content);
|
|
80344
80390
|
}
|
|
80345
|
-
|
|
80346
|
-
|
|
80347
|
-
|
|
80348
|
-
|
|
80349
|
-
|
|
80350
|
-
|
|
80351
|
-
|
|
80352
|
-
|
|
80353
|
-
|
|
80354
|
-
|
|
80355
|
-
|
|
80356
|
-
|
|
80391
|
+
TextDocument.create = create;
|
|
80392
|
+
/**
|
|
80393
|
+
* Checks whether the given literal conforms to the {@link ITextDocument} interface.
|
|
80394
|
+
*/
|
|
80395
|
+
function is(value) {
|
|
80396
|
+
var candidate = value;
|
|
80397
|
+
return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)
|
|
80398
|
+
&& Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
|
|
80399
|
+
}
|
|
80400
|
+
TextDocument.is = is;
|
|
80401
|
+
function applyEdits(document, edits) {
|
|
80402
|
+
var text = document.getText();
|
|
80403
|
+
var sortedEdits = mergeSort(edits, function (a, b) {
|
|
80404
|
+
var diff = a.range.start.line - b.range.start.line;
|
|
80405
|
+
if (diff === 0) {
|
|
80406
|
+
return a.range.start.character - b.range.start.character;
|
|
80407
|
+
}
|
|
80408
|
+
return diff;
|
|
80409
|
+
});
|
|
80410
|
+
var lastModifiedOffset = text.length;
|
|
80411
|
+
for (var i = sortedEdits.length - 1; i >= 0; i--) {
|
|
80412
|
+
var e = sortedEdits[i];
|
|
80413
|
+
var startOffset = document.offsetAt(e.range.start);
|
|
80414
|
+
var endOffset = document.offsetAt(e.range.end);
|
|
80415
|
+
if (endOffset <= lastModifiedOffset) {
|
|
80416
|
+
text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
|
|
80417
|
+
}
|
|
80418
|
+
else {
|
|
80419
|
+
throw new Error('Overlapping edit');
|
|
80420
|
+
}
|
|
80421
|
+
lastModifiedOffset = startOffset;
|
|
80422
|
+
}
|
|
80423
|
+
return text;
|
|
80424
|
+
}
|
|
80425
|
+
TextDocument.applyEdits = applyEdits;
|
|
80426
|
+
function mergeSort(data, compare) {
|
|
80427
|
+
if (data.length <= 1) {
|
|
80428
|
+
// sorted
|
|
80429
|
+
return data;
|
|
80430
|
+
}
|
|
80431
|
+
var p = (data.length / 2) | 0;
|
|
80432
|
+
var left = data.slice(0, p);
|
|
80433
|
+
var right = data.slice(p);
|
|
80434
|
+
mergeSort(left, compare);
|
|
80435
|
+
mergeSort(right, compare);
|
|
80436
|
+
var leftIdx = 0;
|
|
80437
|
+
var rightIdx = 0;
|
|
80438
|
+
var i = 0;
|
|
80439
|
+
while (leftIdx < left.length && rightIdx < right.length) {
|
|
80440
|
+
var ret = compare(left[leftIdx], right[rightIdx]);
|
|
80441
|
+
if (ret <= 0) {
|
|
80442
|
+
// smaller_equal -> take left to preserve order
|
|
80443
|
+
data[i++] = left[leftIdx++];
|
|
80444
|
+
}
|
|
80445
|
+
else {
|
|
80446
|
+
// greater -> take right
|
|
80447
|
+
data[i++] = right[rightIdx++];
|
|
80448
|
+
}
|
|
80449
|
+
}
|
|
80450
|
+
while (leftIdx < left.length) {
|
|
80357
80451
|
data[i++] = left[leftIdx++];
|
|
80358
80452
|
}
|
|
80359
|
-
|
|
80360
|
-
// greater -> take right
|
|
80453
|
+
while (rightIdx < right.length) {
|
|
80361
80454
|
data[i++] = right[rightIdx++];
|
|
80362
80455
|
}
|
|
80456
|
+
return data;
|
|
80363
80457
|
}
|
|
80364
|
-
|
|
80365
|
-
|
|
80366
|
-
|
|
80367
|
-
|
|
80368
|
-
|
|
80369
|
-
|
|
80370
|
-
|
|
80371
|
-
|
|
80372
|
-
|
|
80373
|
-
|
|
80374
|
-
|
|
80375
|
-
|
|
80376
|
-
|
|
80377
|
-
|
|
80378
|
-
|
|
80379
|
-
|
|
80380
|
-
|
|
80381
|
-
|
|
80382
|
-
|
|
80383
|
-
|
|
80384
|
-
|
|
80385
|
-
|
|
80386
|
-
|
|
80387
|
-
|
|
80388
|
-
|
|
80389
|
-
|
|
80390
|
-
|
|
80391
|
-
|
|
80392
|
-
|
|
80393
|
-
|
|
80394
|
-
|
|
80395
|
-
|
|
80396
|
-
|
|
80397
|
-
|
|
80398
|
-
|
|
80399
|
-
|
|
80400
|
-
|
|
80401
|
-
|
|
80402
|
-
|
|
80403
|
-
|
|
80404
|
-
|
|
80405
|
-
|
|
80406
|
-
|
|
80407
|
-
|
|
80408
|
-
|
|
80409
|
-
|
|
80410
|
-
|
|
80411
|
-
|
|
80412
|
-
|
|
80413
|
-
|
|
80414
|
-
|
|
80415
|
-
|
|
80416
|
-
|
|
80417
|
-
|
|
80418
|
-
|
|
80419
|
-
|
|
80420
|
-
|
|
80421
|
-
|
|
80422
|
-
|
|
80423
|
-
|
|
80424
|
-
|
|
80425
|
-
lineOffsets.push(i);
|
|
80426
|
-
isLineStart = false;
|
|
80458
|
+
})(TextDocument || (exports.TextDocument = TextDocument = {}));
|
|
80459
|
+
/**
|
|
80460
|
+
* @deprecated Use the text document from the new vscode-languageserver-textdocument package.
|
|
80461
|
+
*/
|
|
80462
|
+
var FullTextDocument = /** @class */ (function () {
|
|
80463
|
+
function FullTextDocument(uri, languageId, version, content) {
|
|
80464
|
+
this._uri = uri;
|
|
80465
|
+
this._languageId = languageId;
|
|
80466
|
+
this._version = version;
|
|
80467
|
+
this._content = content;
|
|
80468
|
+
this._lineOffsets = undefined;
|
|
80469
|
+
}
|
|
80470
|
+
Object.defineProperty(FullTextDocument.prototype, "uri", {
|
|
80471
|
+
get: function () {
|
|
80472
|
+
return this._uri;
|
|
80473
|
+
},
|
|
80474
|
+
enumerable: false,
|
|
80475
|
+
configurable: true
|
|
80476
|
+
});
|
|
80477
|
+
Object.defineProperty(FullTextDocument.prototype, "languageId", {
|
|
80478
|
+
get: function () {
|
|
80479
|
+
return this._languageId;
|
|
80480
|
+
},
|
|
80481
|
+
enumerable: false,
|
|
80482
|
+
configurable: true
|
|
80483
|
+
});
|
|
80484
|
+
Object.defineProperty(FullTextDocument.prototype, "version", {
|
|
80485
|
+
get: function () {
|
|
80486
|
+
return this._version;
|
|
80487
|
+
},
|
|
80488
|
+
enumerable: false,
|
|
80489
|
+
configurable: true
|
|
80490
|
+
});
|
|
80491
|
+
FullTextDocument.prototype.getText = function (range) {
|
|
80492
|
+
if (range) {
|
|
80493
|
+
var start = this.offsetAt(range.start);
|
|
80494
|
+
var end = this.offsetAt(range.end);
|
|
80495
|
+
return this._content.substring(start, end);
|
|
80496
|
+
}
|
|
80497
|
+
return this._content;
|
|
80498
|
+
};
|
|
80499
|
+
FullTextDocument.prototype.update = function (event, version) {
|
|
80500
|
+
this._content = event.text;
|
|
80501
|
+
this._version = version;
|
|
80502
|
+
this._lineOffsets = undefined;
|
|
80503
|
+
};
|
|
80504
|
+
FullTextDocument.prototype.getLineOffsets = function () {
|
|
80505
|
+
if (this._lineOffsets === undefined) {
|
|
80506
|
+
var lineOffsets = [];
|
|
80507
|
+
var text = this._content;
|
|
80508
|
+
var isLineStart = true;
|
|
80509
|
+
for (var i = 0; i < text.length; i++) {
|
|
80510
|
+
if (isLineStart) {
|
|
80511
|
+
lineOffsets.push(i);
|
|
80512
|
+
isLineStart = false;
|
|
80513
|
+
}
|
|
80514
|
+
var ch = text.charAt(i);
|
|
80515
|
+
isLineStart = (ch === '\r' || ch === '\n');
|
|
80516
|
+
if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
|
|
80517
|
+
i++;
|
|
80518
|
+
}
|
|
80427
80519
|
}
|
|
80428
|
-
|
|
80429
|
-
|
|
80430
|
-
if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
|
|
80431
|
-
i++;
|
|
80520
|
+
if (isLineStart && text.length > 0) {
|
|
80521
|
+
lineOffsets.push(text.length);
|
|
80432
80522
|
}
|
|
80523
|
+
this._lineOffsets = lineOffsets;
|
|
80433
80524
|
}
|
|
80434
|
-
|
|
80435
|
-
|
|
80525
|
+
return this._lineOffsets;
|
|
80526
|
+
};
|
|
80527
|
+
FullTextDocument.prototype.positionAt = function (offset) {
|
|
80528
|
+
offset = Math.max(Math.min(offset, this._content.length), 0);
|
|
80529
|
+
var lineOffsets = this.getLineOffsets();
|
|
80530
|
+
var low = 0, high = lineOffsets.length;
|
|
80531
|
+
if (high === 0) {
|
|
80532
|
+
return Position.create(0, offset);
|
|
80533
|
+
}
|
|
80534
|
+
while (low < high) {
|
|
80535
|
+
var mid = Math.floor((low + high) / 2);
|
|
80536
|
+
if (lineOffsets[mid] > offset) {
|
|
80537
|
+
high = mid;
|
|
80538
|
+
}
|
|
80539
|
+
else {
|
|
80540
|
+
low = mid + 1;
|
|
80541
|
+
}
|
|
80436
80542
|
}
|
|
80437
|
-
|
|
80438
|
-
|
|
80439
|
-
|
|
80440
|
-
|
|
80441
|
-
|
|
80442
|
-
|
|
80443
|
-
|
|
80444
|
-
|
|
80445
|
-
|
|
80446
|
-
return Position.create(0, offset);
|
|
80447
|
-
}
|
|
80448
|
-
while (low < high) {
|
|
80449
|
-
var mid = Math.floor((low + high) / 2);
|
|
80450
|
-
if (lineOffsets[mid] > offset) {
|
|
80451
|
-
high = mid;
|
|
80543
|
+
// low is the least x for which the line offset is larger than the current offset
|
|
80544
|
+
// or array.length if no line offset is larger than the current offset
|
|
80545
|
+
var line = low - 1;
|
|
80546
|
+
return Position.create(line, offset - lineOffsets[line]);
|
|
80547
|
+
};
|
|
80548
|
+
FullTextDocument.prototype.offsetAt = function (position) {
|
|
80549
|
+
var lineOffsets = this.getLineOffsets();
|
|
80550
|
+
if (position.line >= lineOffsets.length) {
|
|
80551
|
+
return this._content.length;
|
|
80452
80552
|
}
|
|
80453
|
-
else {
|
|
80454
|
-
|
|
80553
|
+
else if (position.line < 0) {
|
|
80554
|
+
return 0;
|
|
80455
80555
|
}
|
|
80456
|
-
|
|
80457
|
-
|
|
80458
|
-
|
|
80459
|
-
|
|
80460
|
-
|
|
80461
|
-
|
|
80462
|
-
|
|
80463
|
-
|
|
80464
|
-
|
|
80465
|
-
|
|
80466
|
-
}
|
|
80467
|
-
|
|
80468
|
-
|
|
80469
|
-
|
|
80470
|
-
|
|
80471
|
-
var
|
|
80472
|
-
|
|
80473
|
-
|
|
80474
|
-
|
|
80475
|
-
|
|
80476
|
-
|
|
80477
|
-
|
|
80478
|
-
|
|
80479
|
-
|
|
80480
|
-
|
|
80481
|
-
|
|
80482
|
-
}
|
|
80483
|
-
|
|
80484
|
-
|
|
80485
|
-
|
|
80486
|
-
|
|
80487
|
-
|
|
80488
|
-
|
|
80489
|
-
|
|
80490
|
-
|
|
80491
|
-
|
|
80492
|
-
|
|
80493
|
-
|
|
80494
|
-
|
|
80495
|
-
|
|
80496
|
-
|
|
80497
|
-
|
|
80498
|
-
|
|
80499
|
-
|
|
80500
|
-
|
|
80501
|
-
|
|
80502
|
-
|
|
80503
|
-
|
|
80504
|
-
|
|
80505
|
-
|
|
80506
|
-
|
|
80507
|
-
|
|
80508
|
-
|
|
80509
|
-
|
|
80510
|
-
|
|
80511
|
-
|
|
80512
|
-
|
|
80513
|
-
|
|
80514
|
-
|
|
80515
|
-
|
|
80516
|
-
|
|
80517
|
-
|
|
80518
|
-
|
|
80519
|
-
|
|
80520
|
-
|
|
80521
|
-
Is.func = func;
|
|
80522
|
-
function objectLiteral(value) {
|
|
80523
|
-
// Strictly speaking class instances pass this check as well. Since the LSP
|
|
80524
|
-
// doesn't use classes we ignore this for now. If we do we need to add something
|
|
80525
|
-
// like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
|
|
80526
|
-
return value !== null && typeof value === 'object';
|
|
80527
|
-
}
|
|
80528
|
-
Is.objectLiteral = objectLiteral;
|
|
80529
|
-
function typedArray(value, check) {
|
|
80530
|
-
return Array.isArray(value) && value.every(check);
|
|
80531
|
-
}
|
|
80532
|
-
Is.typedArray = typedArray;
|
|
80533
|
-
})(Is || (Is = {}));
|
|
80556
|
+
var lineOffset = lineOffsets[position.line];
|
|
80557
|
+
var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
|
|
80558
|
+
return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
|
|
80559
|
+
};
|
|
80560
|
+
Object.defineProperty(FullTextDocument.prototype, "lineCount", {
|
|
80561
|
+
get: function () {
|
|
80562
|
+
return this.getLineOffsets().length;
|
|
80563
|
+
},
|
|
80564
|
+
enumerable: false,
|
|
80565
|
+
configurable: true
|
|
80566
|
+
});
|
|
80567
|
+
return FullTextDocument;
|
|
80568
|
+
}());
|
|
80569
|
+
var Is;
|
|
80570
|
+
(function (Is) {
|
|
80571
|
+
var toString = Object.prototype.toString;
|
|
80572
|
+
function defined(value) {
|
|
80573
|
+
return typeof value !== 'undefined';
|
|
80574
|
+
}
|
|
80575
|
+
Is.defined = defined;
|
|
80576
|
+
function undefined(value) {
|
|
80577
|
+
return typeof value === 'undefined';
|
|
80578
|
+
}
|
|
80579
|
+
Is.undefined = undefined;
|
|
80580
|
+
function boolean(value) {
|
|
80581
|
+
return value === true || value === false;
|
|
80582
|
+
}
|
|
80583
|
+
Is.boolean = boolean;
|
|
80584
|
+
function string(value) {
|
|
80585
|
+
return toString.call(value) === '[object String]';
|
|
80586
|
+
}
|
|
80587
|
+
Is.string = string;
|
|
80588
|
+
function number(value) {
|
|
80589
|
+
return toString.call(value) === '[object Number]';
|
|
80590
|
+
}
|
|
80591
|
+
Is.number = number;
|
|
80592
|
+
function numberRange(value, min, max) {
|
|
80593
|
+
return toString.call(value) === '[object Number]' && min <= value && value <= max;
|
|
80594
|
+
}
|
|
80595
|
+
Is.numberRange = numberRange;
|
|
80596
|
+
function integer(value) {
|
|
80597
|
+
return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;
|
|
80598
|
+
}
|
|
80599
|
+
Is.integer = integer;
|
|
80600
|
+
function uinteger(value) {
|
|
80601
|
+
return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;
|
|
80602
|
+
}
|
|
80603
|
+
Is.uinteger = uinteger;
|
|
80604
|
+
function func(value) {
|
|
80605
|
+
return toString.call(value) === '[object Function]';
|
|
80606
|
+
}
|
|
80607
|
+
Is.func = func;
|
|
80608
|
+
function objectLiteral(value) {
|
|
80609
|
+
// Strictly speaking class instances pass this check as well. Since the LSP
|
|
80610
|
+
// doesn't use classes we ignore this for now. If we do we need to add something
|
|
80611
|
+
// like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
|
|
80612
|
+
return value !== null && typeof value === 'object';
|
|
80613
|
+
}
|
|
80614
|
+
Is.objectLiteral = objectLiteral;
|
|
80615
|
+
function typedArray(value, check) {
|
|
80616
|
+
return Array.isArray(value) && value.every(check);
|
|
80617
|
+
}
|
|
80618
|
+
Is.typedArray = typedArray;
|
|
80619
|
+
})(Is || (Is = {}));
|
|
80620
|
+
});
|
|
80534
80621
|
|
|
80535
80622
|
|
|
80623
|
+
/***/ }),
|
|
80624
|
+
|
|
80625
|
+
/***/ "./node_modules/vscode-languageserver-types/lib/umd sync recursive":
|
|
80626
|
+
/*!****************************************************************!*\
|
|
80627
|
+
!*** ./node_modules/vscode-languageserver-types/lib/umd/ sync ***!
|
|
80628
|
+
\****************************************************************/
|
|
80629
|
+
/***/ ((module) => {
|
|
80630
|
+
|
|
80631
|
+
function webpackEmptyContext(req) {
|
|
80632
|
+
var e = new Error("Cannot find module '" + req + "'");
|
|
80633
|
+
e.code = 'MODULE_NOT_FOUND';
|
|
80634
|
+
throw e;
|
|
80635
|
+
}
|
|
80636
|
+
webpackEmptyContext.keys = () => ([]);
|
|
80637
|
+
webpackEmptyContext.resolve = webpackEmptyContext;
|
|
80638
|
+
webpackEmptyContext.id = "./node_modules/vscode-languageserver-types/lib/umd sync recursive";
|
|
80639
|
+
module.exports = webpackEmptyContext;
|
|
80640
|
+
|
|
80536
80641
|
/***/ }),
|
|
80537
80642
|
|
|
80538
80643
|
/***/ "./node_modules/wrappy/wrappy.js":
|