@abaplint/cli 2.100.1 → 2.100.2

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.
Files changed (2) hide show
  1. package/build/cli.js +53 -1
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -39852,6 +39852,53 @@ exports.CodeActions = CodeActions;
39852
39852
 
39853
39853
  /***/ }),
39854
39854
 
39855
+ /***/ "./node_modules/@abaplint/core/build/src/lsp/code_lens.js":
39856
+ /*!****************************************************************!*\
39857
+ !*** ./node_modules/@abaplint/core/build/src/lsp/code_lens.js ***!
39858
+ \****************************************************************/
39859
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
39860
+
39861
+ "use strict";
39862
+
39863
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
39864
+ exports.CodeLens = void 0;
39865
+ const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/esm/main.js");
39866
+ const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
39867
+ const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
39868
+ const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
39869
+ class CodeLens {
39870
+ constructor(reg) {
39871
+ this.reg = reg;
39872
+ }
39873
+ list(textDocument) {
39874
+ var _a;
39875
+ const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, textDocument.uri);
39876
+ if (file === undefined) {
39877
+ return [];
39878
+ }
39879
+ const obj = this.reg.findObjectForFile(file);
39880
+ if (obj === undefined || !(obj instanceof _abap_object_1.ABAPObject)) {
39881
+ return [];
39882
+ }
39883
+ new syntax_1.SyntaxLogic(this.reg, obj).run();
39884
+ const ret = [];
39885
+ const list = this.reg.getMSAGReferences().listByFilename(file.getFilename());
39886
+ for (const l of list) {
39887
+ const msag = this.reg.getObject("MSAG", l.messageClass);
39888
+ if (msag === undefined) {
39889
+ continue;
39890
+ }
39891
+ const text = (_a = msag.getByNumber(l.number)) === null || _a === void 0 ? void 0 : _a.getMessage();
39892
+ ret.push(LServer.CodeLens.create(_lsp_utils_1.LSPUtils.tokenToRange(l.token), text));
39893
+ }
39894
+ return ret;
39895
+ }
39896
+ }
39897
+ exports.CodeLens = CodeLens;
39898
+ //# sourceMappingURL=code_lens.js.map
39899
+
39900
+ /***/ }),
39901
+
39855
39902
  /***/ "./node_modules/@abaplint/core/build/src/lsp/definition.js":
39856
39903
  /*!*****************************************************************!*\
39857
39904
  !*** ./node_modules/@abaplint/core/build/src/lsp/definition.js ***!
@@ -40549,6 +40596,7 @@ const references_1 = __webpack_require__(/*! ./references */ "./node_modules/@ab
40549
40596
  const implementation_1 = __webpack_require__(/*! ./implementation */ "./node_modules/@abaplint/core/build/src/lsp/implementation.js");
40550
40597
  const semantic_1 = __webpack_require__(/*! ./semantic */ "./node_modules/@abaplint/core/build/src/lsp/semantic.js");
40551
40598
  const statement_flow_1 = __webpack_require__(/*! ../abap/flow/statement_flow */ "./node_modules/@abaplint/core/build/src/abap/flow/statement_flow.js");
40599
+ const code_lens_1 = __webpack_require__(/*! ./code_lens */ "./node_modules/@abaplint/core/build/src/lsp/code_lens.js");
40552
40600
  // note Ranges are zero based in LSP,
40553
40601
  // https://github.com/microsoft/language-server-protocol/blob/main/versions/protocol-2-x.md#range
40554
40602
  // but 1 based in abaplint
@@ -40629,6 +40677,10 @@ class LanguageServer {
40629
40677
  semanticTokensRange(range) {
40630
40678
  return new semantic_1.SemanticHighlighting(this.reg).semanticTokensRange(range);
40631
40679
  }
40680
+ // https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_codeLens
40681
+ codeLens(textDocument) {
40682
+ return new code_lens_1.CodeLens(this.reg).list(textDocument);
40683
+ }
40632
40684
  ////////////////////////////////////////
40633
40685
  // ______ _
40634
40686
  // | ____| | |
@@ -47704,7 +47756,7 @@ class Registry {
47704
47756
  }
47705
47757
  static abaplintVersion() {
47706
47758
  // magic, see build script "version.sh"
47707
- return "2.100.1";
47759
+ return "2.100.2";
47708
47760
  }
47709
47761
  getDDICReferences() {
47710
47762
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.100.1",
3
+ "version": "2.100.2",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.100.1",
41
+ "@abaplint/core": "^2.100.2",
42
42
  "@types/chai": "^4.3.5",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.2",