From dffb51470c433565af3074dcd18a4db6808800c1 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Fri, 29 Mar 2019 06:28:54 +0000 Subject: [PATCH] feat(Overview): Add document symbol support from meta information Signed-off-by: Gordon Smith --- package-lock.json | 589 +++++++++++++++++------------- package.json | 13 +- src/ecl/documentSymbolProvider.ts | 115 ++++++ src/ecl/main.ts | 2 + 4 files changed, 462 insertions(+), 257 deletions(-) create mode 100644 src/ecl/documentSymbolProvider.ts diff --git a/package-lock.json b/package-lock.json index e3debb82..51ce81be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,221 +5,253 @@ "requires": true, "dependencies": { "@hpcc-js/api": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/@hpcc-js/api/-/api-2.2.6.tgz", - "integrity": "sha512-s44vG/ppuD82Nnvxly3GLOgCD7Naqwhc/tHC5pLZMCqeJepecZ2FtxWAcNMoE5ga5W7gatM9jiWH1CypygAZpw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/api/-/api-2.5.0.tgz", + "integrity": "sha512-/g6wF/BIdJBDIlkxCW+fCmwiCFfm5Tn0OCrK/15zsmvOIgUp5DwftHzrVqO2LLrIajZ4CYLlw3DjrlgITevxqA==", "requires": { - "@hpcc-js/common": "^2.9.0" + "@hpcc-js/common": "^2.14.0" } }, "@hpcc-js/chart": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@hpcc-js/chart/-/chart-2.6.0.tgz", - "integrity": "sha512-T/wdWv9oAHZGTZVRSmbKAUV+oyz6ZcpCwgnvrLuM+6LeOvAmMu8aKs57qbevdLE9ZabUpGBjIP8S/lJtDuCK5A==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/chart/-/chart-2.12.0.tgz", + "integrity": "sha512-mRPXp3GlmB1QZePFrtkhBN/FRL96y6m9Uch8c0mzCB3CjwXJMwMLik6+kOeLfso5hyZMEvk8ksIMaviOv+DY3g==", "requires": { - "@hpcc-js/api": "^2.2.6", - "@hpcc-js/common": "^2.9.0", - "@hpcc-js/util": "^2.1.5", - "d3-transition": "1.1.0" + "@hpcc-js/api": "^2.5.0", + "@hpcc-js/common": "^2.14.0", + "@hpcc-js/util": "^2.4.0" } }, "@hpcc-js/codemirror": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@hpcc-js/codemirror/-/codemirror-2.1.4.tgz", - "integrity": "sha512-6tFNnMET96Sv19XZWdhU2bzxJmtr89jXYZx6pHCBXEcZL1AhiXpeVr3CfPBaPAyf5VSkKzqO785AtClnfb9pDw==", - "requires": { - "@hpcc-js/codemirror-shim": "^2.0.5", - "@hpcc-js/common": "^2.9.0", - "@hpcc-js/dgrid": "^2.0.12", - "@hpcc-js/html": "^2.0.11", - "@hpcc-js/phosphor": "^2.4.1", - "@hpcc-js/util": "^2.1.5" - } - }, - "@hpcc-js/codemirror-shim": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@hpcc-js/codemirror-shim/-/codemirror-shim-2.0.5.tgz", - "integrity": "sha512-KP3CAmbw5y8jLjQONt3MjSf8+XZU89ydyZn4YMK9viUMVuBTQTK3pfCp9XXJpjayrL0/0CAKXjiHbftlQw7v5g==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/codemirror/-/codemirror-2.5.0.tgz", + "integrity": "sha512-x7Gwmxvv4QSKnFhOWQ156ohoyj41y8KNJDegxTXpAn4T2VbF0GAbQ8dbxG1mQ5yUd9S+RgL5+vb8UfLW2GiVsw==", "requires": { - "codemirror": "5.26.0" + "@hpcc-js/common": "^2.14.0" } }, "@hpcc-js/common": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/@hpcc-js/common/-/common-2.9.0.tgz", - "integrity": "sha512-rDYXdaF5CJDaHtb7CfghAr3wZplm8L93AkFwfASCTPnM2U5esCjM/hxMU6nAsRvWWcD8WAn+YZ+TiVnwXnF+XQ==", - "requires": { - "@hpcc-js/util": "^2.1.5", - "d3-selection": "1.1.0", - "d3-transition": "1.1.0" + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/common/-/common-2.14.0.tgz", + "integrity": "sha512-PICcolACrev5s6xB1eNyhIQNECHt5qstCNQUiScyJRROxBWQCziDH9PJ7s1UvQuPExMSG17mB65PjgnaMTScAw==", + "requires": { + "@hpcc-js/util": "^2.4.0", + "@types/d3-array": "1.2.6", + "@types/d3-brush": "1.0.10", + "@types/d3-collection": "1.0.8", + "@types/d3-color": "1.2.2", + "@types/d3-dispatch": "1.0.7", + "@types/d3-drag": "1.2.3", + "@types/d3-dsv": "1.0.36", + "@types/d3-ease": "1.0.8", + "@types/d3-format": "1.3.1", + "@types/d3-interpolate": "1.3.1", + "@types/d3-scale": "1.0.14", + "@types/d3-selection": "1.4.1", + "@types/d3-time-format": "2.1.1", + "@types/d3-transition": "1.1.4", + "@types/d3-zoom": "1.7.4" } }, "@hpcc-js/comms": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@hpcc-js/comms/-/comms-2.0.9.tgz", - "integrity": "sha512-fMys27mLqZQUkiWp5tWF2/vQRhXNtxtKd9AtFWyR2YB4koayLhSFYXRXbQ9GzPmfkaQBD2XcrjZTTBrf6LcFwA==", - "requires": { - "@hpcc-js/util": "^2.1.5", - "node-fetch": "2.0.0", - "safe-buffer": "5.1.1", - "tmp": "0.0.33", - "whatwg-fetch": "2.0.3", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/comms/-/comms-2.4.0.tgz", + "integrity": "sha512-uXrzXjNFLQ2yMxFUEBBoHg6AeOQwTc4ARKSSNjepvmRxu5nQCYmpe76N5mXti9Ehr7aCscmm/0pOQx5e8o2oAQ==", + "requires": { + "@hpcc-js/util": "^2.4.0", + "node-fetch": "2.3.0", + "safe-buffer": "5.1.2", "xmldom": "0.1.27" }, "dependencies": { + "node-fetch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz", + "integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA==" + }, "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } }, "@hpcc-js/composite": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/@hpcc-js/composite/-/composite-2.0.14.tgz", - "integrity": "sha512-nm1Dd7GaJagm8Gec0EKmqTasrsBrWZ4GOAsNfNcTKTqPEwysssA3Q10w47Jg8hpf1B1ZRSjTnV666I0uookKRg==", - "requires": { - "@hpcc-js/api": "^2.2.6", - "@hpcc-js/chart": "^2.6.0", - "@hpcc-js/common": "^2.9.0", - "@hpcc-js/dgrid": "^2.0.12", - "@hpcc-js/form": "^2.2.7", - "@hpcc-js/html": "^2.0.11", - "@hpcc-js/layout": "^2.6.1", - "@hpcc-js/other": "^2.6.1", - "@hpcc-js/phosphor": "^2.4.1", - "d3-transition": "1.1.0" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/composite/-/composite-2.2.0.tgz", + "integrity": "sha512-1BlzYoewQiEphvTmxTxrGpW+GmurXPAJltoJU7E70/YbVkj0Di4f9f4hsJ7SSoStX706Kni+zRvuKNqor/z5xQ==", + "requires": { + "@hpcc-js/api": "^2.5.0", + "@hpcc-js/chart": "^2.12.0", + "@hpcc-js/common": "^2.14.0", + "@hpcc-js/dgrid": "^2.2.0", + "@hpcc-js/form": "^2.5.0", + "@hpcc-js/html": "^2.4.0", + "@hpcc-js/layout": "^2.10.0", + "@hpcc-js/other": "^2.10.0", + "@hpcc-js/phosphor": "^2.7.0" } }, "@hpcc-js/ddl-shim": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@hpcc-js/ddl-shim/-/ddl-shim-2.1.5.tgz", - "integrity": "sha512-BZKYxf5kzKN5E1sHCf33dOusRpD43NhYVGKDacpmESu3o+t2+RIpHenEdlIb/y+8AP7v0polwQEfOnLO+cP9qA==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/ddl-shim/-/ddl-shim-2.3.0.tgz", + "integrity": "sha512-ibh2mHUlUdtVqMF0gSOrdcl8lxHKVb+WGnFVQM5f078wXrCerOyGm0vA1pummWDTWpPSQ3VNANA46JIYMznaSg==" }, "@hpcc-js/dgrid": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/@hpcc-js/dgrid/-/dgrid-2.0.12.tgz", - "integrity": "sha512-V9cSKy4V9QO0OSV8FOSNa13lDJC2juC1eXs90CvB4gn1lNii068vCEJgw3nlurnUQtvoHL8Q/W7q0YQUWWxEsQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/dgrid/-/dgrid-2.2.0.tgz", + "integrity": "sha512-dvNwlvimuh3XsvqiuLOFEHRM0h4FieO1ro1E+Ih7Qks0Me9c2mbyx0jUexUuUA4WB+NPD+lXxPjx04UfEqkGwg==", "requires": { - "@hpcc-js/common": "^2.9.0", - "@hpcc-js/ddl-shim": "^2.1.5", - "@hpcc-js/dgrid-shim": "^2.0.8", - "@hpcc-js/util": "^2.1.5" + "@hpcc-js/common": "^2.14.0", + "@hpcc-js/ddl-shim": "^2.3.0", + "@hpcc-js/dgrid-shim": "^2.2.0", + "@hpcc-js/util": "^2.4.0" } }, "@hpcc-js/dgrid-shim": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@hpcc-js/dgrid-shim/-/dgrid-shim-2.0.8.tgz", - "integrity": "sha512-xlSgK85NNcLBldl4ZYCUqOXAqlsrGAtA6TKcfPp/a/MprBYfRu5kTQdn+dkmNOrlfVEPN/67IrG9n8Yt5EHZDA==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/dgrid-shim/-/dgrid-shim-2.2.0.tgz", + "integrity": "sha512-HNOdrKKWPLzTyrVpFzcNcmovEj0Q4am1XNXaYybhHOFPV4rAf2tY0PkkXdIG3Dn+o5Z+DSpwTRaxmgbWeHVdqw==" + }, + "@hpcc-js/eclwatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/eclwatch/-/eclwatch-2.3.0.tgz", + "integrity": "sha512-y5IldjjBnkg6bPu6cvzf5dy5K5frYaLbxf7/VxEQ9NXGmJgINN2i30mkSFS8BiZrHy1sSXGNsyTFuFApkVKOxA==", + "requires": { + "@hpcc-js/common": "^2.14.0", + "@hpcc-js/comms": "^2.4.0", + "@hpcc-js/dgrid": "^2.2.0", + "@hpcc-js/graph": "^2.7.0", + "@hpcc-js/layout": "^2.10.0", + "@hpcc-js/timeline": "^2.4.0", + "@hpcc-js/util": "^2.4.0" + } }, "@hpcc-js/form": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/@hpcc-js/form/-/form-2.2.7.tgz", - "integrity": "sha512-JuvvX9GXe+8T1Mo7Nukbc1pXyuC92gfpw6S4151BAUyLXPz65er70uuHFcxum3Ldhz/FFE/PsCey64LlpdHABw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/form/-/form-2.5.0.tgz", + "integrity": "sha512-8LUdWw4fh5iMZYl2KgF9ppMD69OXYZpIkJ5W+A/U7/4lqAnp6c6MWyO3LsTlI0gAt+W9eXs4zXpcdH4C+Anecw==", "requires": { - "@hpcc-js/api": "^2.2.6", - "@hpcc-js/chart": "^2.6.0", - "@hpcc-js/common": "^2.9.0" + "@hpcc-js/api": "^2.5.0", + "@hpcc-js/chart": "^2.12.0", + "@hpcc-js/common": "^2.14.0" } }, "@hpcc-js/graph": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/@hpcc-js/graph/-/graph-2.5.4.tgz", - "integrity": "sha512-PPSE6tmHyEJrd25Wa6C9PhZAPRvuhfNYipXhs/d8tAT707kAUgd84eeG04LWaObpJsK2TMxoXPt1cU0nAT/3hw==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/graph/-/graph-2.7.0.tgz", + "integrity": "sha512-7Ol18mHcTDHgg1ERMFi2IbOVScCU2DYxl/4eQjFrZHukUYPc72SAt2tWZcSgxcFJ6Autg3Lt0sf2qYvqUOD7Qg==", "requires": { - "@hpcc-js/api": "^2.2.6", - "@hpcc-js/common": "^2.9.0", - "d3-transition": "1.1.0", - "dagre": "0.8.2" + "@hpcc-js/api": "^2.5.0", + "@hpcc-js/common": "^2.14.0" } }, "@hpcc-js/html": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@hpcc-js/html/-/html-2.0.11.tgz", - "integrity": "sha512-kBh9m6062wZSkrXlttKjtiZa7BLMw4Ul5caVY8/a+wtJCFGvjE6YlxUQ1Zqtt+Wto4uyE7jo5oRhrCXejeiHqg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/html/-/html-2.4.0.tgz", + "integrity": "sha512-10ulPjSGgNvUFMm8ocyMpJwdqJbmXmsTc3sq0B4iAfAWnCjgnJr8/DfOsGIqEjuU0zgnQ7g4BlBN7k53wp8wwA==", "requires": { - "@hpcc-js/common": "^2.9.0", - "@hpcc-js/preact-shim": "^2.0.4" + "@hpcc-js/common": "^2.14.0", + "@hpcc-js/preact-shim": "^2.2.0", + "@hpcc-js/util": "^2.4.0" } }, "@hpcc-js/layout": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@hpcc-js/layout/-/layout-2.6.1.tgz", - "integrity": "sha512-doTNJVorzaY6pGEFrVjw850zS9jnUshlh1SxltsGbbxwlJvtCXLlsjosCT8Ykc5wrGEfihseVS6LagTC7R+OlA==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/layout/-/layout-2.10.0.tgz", + "integrity": "sha512-h5O5sUkJ3iqZ/rssAobAKWQP+Y1+ViI8SKgTTAvJCJveZA4NR3kBgPnNLIoqkbTi+EznkNjRJiTYl0ZNfcPpzg==", "requires": { - "@hpcc-js/api": "^2.2.6", - "@hpcc-js/common": "^2.9.0", - "@hpcc-js/dgrid": "^2.0.12", - "d3-transition": "1.1.0" + "@hpcc-js/api": "^2.5.0", + "@hpcc-js/common": "^2.14.0", + "@hpcc-js/dgrid": "^2.2.0" } }, "@hpcc-js/loader": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@hpcc-js/loader/-/loader-2.1.3.tgz", - "integrity": "sha512-PSE2woGYINPp9nPLmWhr19OFJQqZT1MYcwEmC0XOWs73cyHOKfZvhz48glgvJsd7NYaCCXuzAOXLrlUtnUA4GA==", - "requires": { - "@hpcc-js/requirejs-shim": "^2.0.2", - "es6-promise": "4.2.4" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/loader/-/loader-2.4.0.tgz", + "integrity": "sha512-lBo3GZp2xFYEEeHDHTEISbv96JJX+QLNevhT4JJuJHDqAxr77HacyiJePtGm5cEVPlnUZhGU8NGWojmhlh+/iQ==", + "requires": { + "@hpcc-js/api": "^2.5.0", + "@hpcc-js/chart": "^2.12.0", + "@hpcc-js/codemirror": "^2.5.0", + "@hpcc-js/common": "^2.14.0", + "@hpcc-js/comms": "^2.4.0", + "@hpcc-js/composite": "^2.2.0", + "@hpcc-js/dgrid": "^2.2.0", + "@hpcc-js/eclwatch": "^2.3.0", + "@hpcc-js/form": "^2.5.0", + "@hpcc-js/graph": "^2.7.0", + "@hpcc-js/html": "^2.4.0", + "@hpcc-js/layout": "^2.10.0", + "@hpcc-js/map": "^2.5.0", + "@hpcc-js/marshaller": "^2.11.0", + "@hpcc-js/other": "^2.10.0", + "@hpcc-js/phosphor": "^2.7.0", + "@hpcc-js/react": "^2.2.0", + "@hpcc-js/timeline": "^2.4.0", + "@hpcc-js/tree": "^2.5.0", + "@hpcc-js/util": "^2.4.0" } }, "@hpcc-js/map": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@hpcc-js/map/-/map-2.0.13.tgz", - "integrity": "sha512-sdMohYikXN+4MKI7Ewx4wm2hRkwacVWd5AlixbEx38YzYv290fC91+XhLl2n8drp2iWFruqv6FoRdEtwHmOZkQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/map/-/map-2.5.0.tgz", + "integrity": "sha512-JT6k1J91rwb0nGwi9AoTmTLzz8o3WJiaYGSsDkhrGqEvjZdQAwwMPpMJTpLYoTrTiiJHlAU1RjOj+fAODIYfGg==", "requires": { - "@hpcc-js/api": "^2.2.6", - "@hpcc-js/common": "^2.9.0", - "@hpcc-js/graph": "^2.5.4", - "@hpcc-js/layout": "^2.6.1", - "@hpcc-js/other": "^2.6.1" + "@hpcc-js/api": "^2.5.0", + "@hpcc-js/common": "^2.14.0", + "@hpcc-js/graph": "^2.7.0", + "@hpcc-js/layout": "^2.10.0", + "@hpcc-js/other": "^2.10.0", + "@types/leaflet": "1.4.3" } }, "@hpcc-js/marshaller": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/@hpcc-js/marshaller/-/marshaller-2.8.1.tgz", - "integrity": "sha512-kvDAVC40VeHnyKxFKvGcWw15w7UnbP8oZB+wMJXyL/VIEnI66BxCldKmJCiG81bQJmUTsBNlpa/ECY2yDyXK6g==", - "requires": { - "@hpcc-js/chart": "^2.6.0", - "@hpcc-js/codemirror": "^2.1.4", - "@hpcc-js/common": "^2.9.0", - "@hpcc-js/comms": "^2.0.9", - "@hpcc-js/composite": "^2.0.14", - "@hpcc-js/ddl-shim": "^2.1.5", - "@hpcc-js/dgrid": "^2.0.12", - "@hpcc-js/form": "^2.2.7", - "@hpcc-js/graph": "^2.5.4", - "@hpcc-js/layout": "^2.6.1", - "@hpcc-js/map": "^2.0.13", - "@hpcc-js/other": "^2.6.1", - "@hpcc-js/phosphor": "^2.4.1", - "@hpcc-js/util": "^2.1.5" + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/marshaller/-/marshaller-2.11.0.tgz", + "integrity": "sha512-qbiwObJj85HNT1Wm1MrMzUkO6P8Sj1/3sNq7pN6Zwo/q85Vkx2F5apSnRuU8HZu1+9lNTlRip5pIQEUMosTEng==", + "requires": { + "@hpcc-js/chart": "^2.12.0", + "@hpcc-js/codemirror": "^2.5.0", + "@hpcc-js/common": "^2.14.0", + "@hpcc-js/comms": "^2.4.0", + "@hpcc-js/composite": "^2.2.0", + "@hpcc-js/ddl-shim": "^2.3.0", + "@hpcc-js/dgrid": "^2.2.0", + "@hpcc-js/form": "^2.5.0", + "@hpcc-js/graph": "^2.7.0", + "@hpcc-js/layout": "^2.10.0", + "@hpcc-js/map": "^2.5.0", + "@hpcc-js/other": "^2.10.0", + "@hpcc-js/phosphor": "^2.7.0", + "@hpcc-js/util": "^2.4.0" } }, "@hpcc-js/other": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@hpcc-js/other/-/other-2.6.1.tgz", - "integrity": "sha512-Twh21QRyHMjQ0Ugum1ZhSH899ePGr/Kmls8k6gzV8AmtcfBmZtp76foatdE4l+ZO+nXDb+v3WRtdA22bf8jG+A==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/other/-/other-2.10.0.tgz", + "integrity": "sha512-7eeLV+NSS/SllGH7xlJ/04lkoyOdUxFPkpfmUFbe+8Te6YN3JNVPKpAeMqFPskolAOn+NtGPzQlgjKog//Vn0Q==", "requires": { - "@hpcc-js/api": "^2.2.6", - "@hpcc-js/common": "^2.9.0", - "@hpcc-js/layout": "^2.6.1" + "@hpcc-js/api": "^2.5.0", + "@hpcc-js/common": "^2.14.0", + "@hpcc-js/layout": "^2.10.0" } }, "@hpcc-js/phosphor": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@hpcc-js/phosphor/-/phosphor-2.4.1.tgz", - "integrity": "sha512-UDIfNSkeLW1Pm/bHHOOcdHGYrVeRrw6+t1mB95oahuRRDL6dcGsEFmYAmzDLQWaEV3CMrS0ePUnN1vxCI0s+Ew==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/phosphor/-/phosphor-2.7.0.tgz", + "integrity": "sha512-F/g/O38i+PEhegR7Mo5YaDQXA0Ne4uQOr3sadX8Wo8743Nj9r6qQ2/fyOSSQYJeacpQmPPvK37zH1g1D58F8Wg==", "requires": { - "@hpcc-js/common": "^2.9.0", - "@hpcc-js/other": "^2.6.1", - "@hpcc-js/phosphor-shim": "^2.0.5", - "@hpcc-js/util": "^2.1.5" + "@hpcc-js/common": "^2.14.0", + "@hpcc-js/other": "^2.10.0", + "@hpcc-js/phosphor-shim": "^2.2.0", + "@hpcc-js/util": "^2.4.0" } }, "@hpcc-js/phosphor-shim": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@hpcc-js/phosphor-shim/-/phosphor-shim-2.0.5.tgz", - "integrity": "sha512-ojdZYXdIKugy/iSi2j/vyQ7i17Q2cGwGfLf457IITws+P8IrkyQdmsX8P+KlAQnzChwUdjTlK/oUGZfCbYp4QA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/phosphor-shim/-/phosphor-shim-2.2.0.tgz", + "integrity": "sha512-r7ez4pjf38yNgg9r7jrsmn76RD/kkLkwaxMrh4iXtKP2x3i1QnFLZ4aLWPUyTAq+rCmFys78TAi2mxnuSN7VUw==", "requires": { "@phosphor/algorithm": "1.1.2", "@phosphor/commands": "1.5.0", @@ -228,22 +260,44 @@ } }, "@hpcc-js/preact-shim": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@hpcc-js/preact-shim/-/preact-shim-2.0.4.tgz", - "integrity": "sha512-wtHLDuUPMExxcubnAHONOfP8Z6r2XZx7BbctIertwQ+bnw9ynL1ADF2xcfZWB6OL5VryBGMzE94/TaeuulJF3Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/preact-shim/-/preact-shim-2.2.0.tgz", + "integrity": "sha512-54nlDD6QFPxlgYAOOAgY68f88//k3iXQU5+Bq4qN1GI1bm9COx2lN9olcbQxfd2vcnX3gEbIxII5NalwN8kQWA==", "requires": { "preact": "8.2.1" } }, - "@hpcc-js/requirejs-shim": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@hpcc-js/requirejs-shim/-/requirejs-shim-2.0.2.tgz", - "integrity": "sha512-bfiOyxi9EmeXThRYW4ChgCdqmvwFl4WsdPsuHiFK/mK1mAWib4HWxUdQxpvsqzIX9PutkJEFKnj7jybWSsfQMg==" + "@hpcc-js/react": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/react/-/react-2.2.0.tgz", + "integrity": "sha512-EKo26WT6X7iiNZ5ngQ2yfuPoKMQEw7kRG/Q5TOKQ4wLCer4JN2GNzaOFiGGf3/EDWPJQJH/8jwUcyWK50DQvOg==", + "requires": { + "@hpcc-js/common": "^2.14.0" + } + }, + "@hpcc-js/timeline": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/timeline/-/timeline-2.4.0.tgz", + "integrity": "sha512-qTdTv/zMdbqLtGr9bpIBAdwQYQvV+wflj4lOp5qclEHtuQO/RoniPUoc+fZWxbeyU027JHtO4Iur9FARc10DPA==", + "requires": { + "@hpcc-js/api": "^2.5.0", + "@hpcc-js/chart": "^2.12.0", + "@hpcc-js/common": "^2.14.0" + } + }, + "@hpcc-js/tree": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/tree/-/tree-2.5.0.tgz", + "integrity": "sha512-e/MYeSNMzC82P9TH14fTD4VxoptajT7Air8n101d0U1FWhYgAJPWe33OjwWc/llwdrte0KR82zj8Cl4xIAm05A==", + "requires": { + "@hpcc-js/api": "^2.5.0", + "@hpcc-js/common": "^2.14.0" + } }, "@hpcc-js/util": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@hpcc-js/util/-/util-2.1.5.tgz", - "integrity": "sha512-Lsqe+OZKdGk5KxElDXc9eL3GywlZuyM+rLZXVUyRqr+4+cwXj3Penm0qdZS2tsG/PgcF0jmmw6HQxMkdhPzS1A==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/util/-/util-2.4.0.tgz", + "integrity": "sha512-z56ghTJP7KSB32kop2YljyLgpVdEpBbbq1D8wPGY50H0Ym4NMzAwbydbfj0T6MKRxnoorZ9j8uEhkw3o9VRL5A==" }, "@phosphor/algorithm": { "version": "1.1.2", @@ -351,12 +405,124 @@ "@phosphor/virtualdom": "^1.1.2" } }, + "@types/d3-array": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-1.2.6.tgz", + "integrity": "sha512-/EcY/15X5tnwkMT2txpjiLUNJj5xHA2vGHOXI8NTYGhETK914RRLQLjNm6EpAI1D2IY5vh3CzuLODnqBAwKjPA==" + }, + "@types/d3-brush": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-1.0.10.tgz", + "integrity": "sha512-J8jREATIrfJaAfhJivqaEKPnJsRlwwrOPje+ABqZFgamADjll+q9zaDXnYyjiGPPsiJEU+Qq9jQi5rECxIOfhg==", + "requires": { + "@types/d3-selection": "*" + } + }, + "@types/d3-collection": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/d3-collection/-/d3-collection-1.0.8.tgz", + "integrity": "sha512-y5lGlazdc0HNO0F3UUX2DPE7OmYvd9Kcym4hXwrJcNUkDaypR5pX+apuMikl9LfTxKItJsY9KYvzBulpCKyvuQ==" + }, + "@types/d3-color": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-1.2.2.tgz", + "integrity": "sha512-6pBxzJ8ZP3dYEQ4YjQ+NVbQaOflfgXq/JbDiS99oLobM2o72uAST4q6yPxHv6FOTCRC/n35ktuo8pvw/S4M7sw==" + }, + "@types/d3-dispatch": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-1.0.7.tgz", + "integrity": "sha512-M+z84G7UKwK6hEPnGCSccOg8zJ3Nk2hgDQ9sCstHXgsFU0sMxlIZVKqKB5oxUDbALqQG6ucg0G9e8cmOSlishg==" + }, + "@types/d3-drag": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-1.2.3.tgz", + "integrity": "sha512-rWB5SPvkYVxW3sqUxHOJUZwifD0KqvKwvt1bhNqcLpW6Azsd0BJgRNcyVW8GAferaAk5r8dzeZnf9zKlg9+xMQ==", + "requires": { + "@types/d3-selection": "*" + } + }, + "@types/d3-dsv": { + "version": "1.0.36", + "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-1.0.36.tgz", + "integrity": "sha512-jbIWQ27QJcBNMZbQv0NSQMHnBDCmxghAxePxgyiPH1XPCRkOsTBei7jcdi3fDrUCGpCV3lKrSZFSlOkhUQVClA==" + }, + "@types/d3-ease": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-1.0.8.tgz", + "integrity": "sha512-VRf8czVWHSJPoUWxMunzpePK02//wHDAswknU8QWzcyrQn6pqe46bHRYi2smSpw5VjsT2CG8k/QeWIdWPS3Bmg==" + }, + "@types/d3-format": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-1.3.1.tgz", + "integrity": "sha512-KAWvReOKMDreaAwOjdfQMm0HjcUMlQG47GwqdVKgmm20vTd2pucj0a70c3gUSHrnsmo6H2AMrkBsZU2UhJLq8A==" + }, + "@types/d3-interpolate": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-1.3.1.tgz", + "integrity": "sha512-z8Zmi08XVwe8e62vP6wcA+CNuRhpuUU5XPEfqpG0hRypDE5BWNthQHB1UNWWDB7ojCbGaN4qBdsWp5kWxhT1IQ==", + "requires": { + "@types/d3-color": "*" + } + }, + "@types/d3-scale": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-1.0.14.tgz", + "integrity": "sha512-dW6Ii8bH+10klJzVVPPeeQvRpCbX3BO3x9cLTngu/+lXNDbk2uC51aFAA/XhocehZroaG5ajwAFelMFsgpClMg==", + "requires": { + "@types/d3-time": "*" + } + }, + "@types/d3-selection": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-1.4.1.tgz", + "integrity": "sha512-bv8IfFYo/xG6dxri9OwDnK3yCagYPeRIjTlrcdYJSx+FDWlCeBDepIHUpqROmhPtZ53jyna0aUajZRk0I3rXNA==" + }, + "@types/d3-time": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-1.0.10.tgz", + "integrity": "sha512-aKf62rRQafDQmSiv1NylKhIMmznsjRN+MnXRXTqHoqm0U/UZzVpdrtRnSIfdiLS616OuC1soYeX1dBg2n1u8Xw==" + }, + "@types/d3-time-format": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-2.1.1.tgz", + "integrity": "sha512-tJSyXta8ZyJ52wDDHA96JEsvkbL6jl7wowGmuf45+fAkj5Y+SQOnz0N7/H68OWmPshPsAaWMQh+GAws44IzH3g==" + }, + "@types/d3-transition": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-1.1.4.tgz", + "integrity": "sha512-/vsmKVUIXEyCcIXYAlw7bnYkIs9/J/nZbptRJFKUN3FdXq/dF6j9z9xXzerkyU6TDHLrMrwx9eGwdKyTIy/j9w==", + "requires": { + "@types/d3-selection": "*" + } + }, + "@types/d3-zoom": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-1.7.4.tgz", + "integrity": "sha512-5jnFo/itYhJeB2khO/lKe730kW/h2EbKMOvY0uNp3+7NdPm4w63DwPEMxifQZ7n902xGYK5DdU67FmToSoy4VA==", + "requires": { + "@types/d3-interpolate": "*", + "@types/d3-selection": "*" + } + }, "@types/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/diff/-/diff-4.0.2.tgz", "integrity": "sha512-mIenTfsIe586/yzsyfql69KRnA75S8SVXQbTLpDejRrjH0QSJcpu3AUOi/Vjnt9IOsXKxPhJfGpQUNMueIU1fQ==", "dev": true }, + "@types/geojson": { + "version": "7946.0.7", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.7.tgz", + "integrity": "sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ==" + }, + "@types/leaflet": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.4.3.tgz", + "integrity": "sha512-jFRBSsPHi1EwQSwrN0cOJLdPhwOZsRl4IMxvm/2ShLh0YM5GfCtQXCzsrv8RE7DWL+AykXdYSAd9bFLWbZT4CQ==", + "requires": { + "@types/geojson": "*" + } + }, "@types/mocha": { "version": "5.2.6", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", @@ -840,11 +1006,6 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, - "codemirror": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.26.0.tgz", - "integrity": "sha1-vL7oaBbtEjhwwmBGHCtcQLaHRuU=" - }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -1149,61 +1310,6 @@ "array-find-index": "^1.0.1" } }, - "d3-color": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.2.3.tgz", - "integrity": "sha512-x37qq3ChOTLd26hnps36lexMRhNXEtVxZ4B25rL0DVdDsGQIJGB18S7y9XDwlDD6MD/ZBzITCf4JjGMM10TZkw==" - }, - "d3-dispatch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.5.tgz", - "integrity": "sha512-vwKx+lAqB1UuCeklr6Jh1bvC4SZgbSqbkGBLClItFBIYH4vqDJCA7qfoy14lXmJdnBOdxndAMxjCbImJYW7e6g==" - }, - "d3-ease": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.5.tgz", - "integrity": "sha512-Ct1O//ly5y5lFM9YTdu+ygq7LleSgSE4oj7vUt9tPLHUi8VCV7QoizGpdWRWAwCO9LdYzIrQDg97+hGVdsSGPQ==" - }, - "d3-interpolate": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.3.2.tgz", - "integrity": "sha512-NlNKGopqaz9qM1PXh9gBF1KSCVh+jSFErrSlD/4hybwoNX/gt1d8CDbDW+3i+5UOHhjC6s6nMvRxcuoMVNgL2w==", - "requires": { - "d3-color": "1" - } - }, - "d3-selection": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-1.1.0.tgz", - "integrity": "sha1-GZhoSJZIj4OcoDchI9o08dMYgJw=" - }, - "d3-timer": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.9.tgz", - "integrity": "sha512-rT34J5HnQUHhcLvhSB9GjCkN0Ddd5Y8nCwDBG2u6wQEeYxT/Lf51fTFFkldeib/sE/J0clIe0pnCfs6g/lRbyg==" - }, - "d3-transition": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-1.1.0.tgz", - "integrity": "sha1-z8hcdOUjkyQpBUZiNXKZBWDDlm8=", - "requires": { - "d3-color": "1", - "d3-dispatch": "1", - "d3-ease": "1", - "d3-interpolate": "1", - "d3-selection": "^1.1.0", - "d3-timer": "1" - } - }, - "dagre": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/dagre/-/dagre-0.8.2.tgz", - "integrity": "sha512-TEOOGZOkCOgCG7AoUIq64sJ3d21SMv8tyoqteLpX+UsUsS9Qw8iap4hhogXY4oB3r0bbZuAjO0atAilgCmsE0Q==", - "requires": { - "graphlib": "^2.1.5", - "lodash": "^4.17.4" - } - }, "dargs": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", @@ -1467,7 +1573,8 @@ "es6-promise": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==" + "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==", + "dev": true }, "es6-promisify": { "version": "5.0.0", @@ -2125,14 +2232,6 @@ "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", "dev": true }, - "graphlib": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.7.tgz", - "integrity": "sha512-TyI9jIy2J4j0qgPmOOrHTCtpPqJGN/aurBwc6ZT+bRii+di1I+Wv3obRhVrmBEXet+qkMaEX67dXrwsd3QQM6w==", - "requires": { - "lodash": "^4.17.5" - } - }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -2744,7 +2843,8 @@ "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true }, "lodash._reinterpolate": { "version": "3.0.0", @@ -3102,11 +3202,6 @@ "object.getownpropertydescriptors": "^2.0.3" } }, - "node-fetch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.0.0.tgz", - "integrity": "sha1-mCu6Q+zU8pIqKcwYamu7C7c/y6Y=" - }, "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", @@ -3294,7 +3389,8 @@ "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true }, "osenv": { "version": "0.1.5", @@ -3686,6 +3782,14 @@ "tough-cookie": "~2.4.3", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } } }, "require-directory": { @@ -3747,9 +3851,9 @@ } }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", "dev": true }, "safe-regex": { @@ -4223,14 +4327,6 @@ "xtend": "~4.0.1" } }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "~1.0.2" - } - }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -4753,11 +4849,6 @@ "underscore": "^1.8.3" } }, - "whatwg-fetch": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", - "integrity": "sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ=" - }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", diff --git a/package.json b/package.json index 3c498b08..dfcd005e 100644 --- a/package.json +++ b/package.json @@ -33,13 +33,10 @@ "publish": "run-s standard-version git-push vsce-publish" }, "dependencies": { - "@hpcc-js/comms": "2.3.0", - "@hpcc-js/util": "2.3.0", - "@hpcc-js/loader": "2.3.0", - "@hpcc-js/marshaller": "2.10.0", - "node-fetch": "2.0.0", - "safe-buffer": "5.1.1", - "xmldom": "0.1.27", + "@hpcc-js/comms": "2.4.0", + "@hpcc-js/util": "2.4.0", + "@hpcc-js/loader": "2.4.0", + "@hpcc-js/marshaller": "2.11.0", "diff": "4.0.1", "tslib": "1.9.3", "vscode-debugadapter": "1.34.0", @@ -521,4 +518,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/ecl/documentSymbolProvider.ts b/src/ecl/documentSymbolProvider.ts new file mode 100644 index 00000000..161663d0 --- /dev/null +++ b/src/ecl/documentSymbolProvider.ts @@ -0,0 +1,115 @@ +import { attachWorkspace, Definition, ECLScope, Import, Source, Workspace } from "@hpcc-js/comms"; +import { scopedLogger } from "@hpcc-js/util"; +import * as vscode from "vscode"; + +const logger = scopedLogger("documentSymbolProvider.ts"); + +const knownTypes = {}; + +export let eclDocumentSymbolProvider: ECLDocumentSymbolProvider; +export class ECLDocumentSymbolProvider implements vscode.DocumentSymbolProvider { + protected _ctx: vscode.ExtensionContext; + + private constructor(ctx: vscode.ExtensionContext) { + this._ctx = ctx; + ctx.subscriptions.push(vscode.languages.registerDocumentSymbolProvider("ecl", this)); + } + + static attach(ctx: vscode.ExtensionContext): ECLDocumentSymbolProvider { + if (!eclDocumentSymbolProvider) { + eclDocumentSymbolProvider = new ECLDocumentSymbolProvider(ctx); + } + return eclDocumentSymbolProvider; + } + + typeToSymbolKind(type: string): vscode.SymbolKind { + switch (type) { + case "module": + return vscode.SymbolKind.Module; + case "attribute": + return vscode.SymbolKind.Variable; + case "record": + return vscode.SymbolKind.Struct; + case "macro": + return vscode.SymbolKind.Function; + case "function": + return vscode.SymbolKind.Function; + case "transform": + return vscode.SymbolKind.Operator; + default: + if (!knownTypes[type]) { + knownTypes[type] = true; + console.log(`case "${type}":\n break;`); + } + } + return vscode.SymbolKind.Variable; + } + + calcPos(document: vscode.TextDocument, pos: number, line: number) { + return pos ? document.positionAt(pos) : new vscode.Position(line || 0, 0); + } + + calcRange(document: vscode.TextDocument, scope: ECLScope): vscode.Range { + const startPos = this.calcPos(document, scope.start, scope.line); + const endPos = this.calcPos(document, scope.end, scope.line + 1); + return new vscode.Range(startPos, endPos); + } + + calcSelectionRange(document: vscode.TextDocument, scope: ECLScope): vscode.Range { + const startPos = this.calcPos(document, scope.start, scope.line); + const endPos = this.calcPos(document, scope["body"] || scope.end, scope.line + 1); + return new vscode.Range(startPos, endPos); + } + + parseImports(document: vscode.TextDocument, imports: Import[]): vscode.DocumentSymbol[] { + const retVal: vscode.DocumentSymbol[] = []; + imports.forEach(imp => { + const nullPos = new vscode.Position(0, 0); + const nullRange = new vscode.Range(nullPos, nullPos); + const docSymbol = new vscode.DocumentSymbol(imp.name, "import", vscode.SymbolKind.Namespace, nullRange, nullRange); + retVal.push(docSymbol); + }); + return retVal; + } + + parseDefinitions(document: vscode.TextDocument, parentName: string, defs: Definition[]): vscode.DocumentSymbol[] { + const retVal: vscode.DocumentSymbol[] = []; + defs.forEach(def => { + console.log(`${def.fullname.toLowerCase()}.indexOf(${parentName.toLowerCase()}) === ${def.fullname.toLowerCase().indexOf(parentName.toLowerCase())}`); + if (!parentName || def.fullname.toLowerCase().indexOf(parentName.toLowerCase()) === 0) { + const docSymbol = new vscode.DocumentSymbol(def.name, def.type, this.typeToSymbolKind(def.type), this.calcRange(document, def), this.calcSelectionRange(document, def)); + docSymbol.children = this.parseDefinitions(document, def.fullname, def.definitions); + def.fields.forEach(field => { + if (field.definition !== def) { + docSymbol.children = docSymbol.children.concat(this.parseDefinitions(document, def.fullname, [field.definition])); + } + }); + retVal.push(docSymbol); + } + }); + return retVal; + } + + provideDocumentSymbols(document: vscode.TextDocument, token: vscode.CancellationToken): vscode.ProviderResult { + let retVal: vscode.DocumentSymbol[] = []; + let metaWorkspace: undefined | Workspace; + if (vscode.workspace.rootPath) { + metaWorkspace = attachWorkspace(vscode.workspace.rootPath); + } else if (vscode.workspace.workspaceFolders) { + for (const wuf of vscode.workspace.workspaceFolders) { + if (wuf.uri.fsPath !== vscode.workspace.rootPath) { + metaWorkspace = attachWorkspace(wuf.uri.fsPath); + break; + } + } + } + if (metaWorkspace !== undefined) { + const eclSource: Source = metaWorkspace._sourceByPath.get(document.fileName); + if (eclSource) { + retVal = retVal.concat(this.parseImports(document, eclSource.imports)); + retVal = retVal.concat(this.parseDefinitions(document, "", eclSource.definitions)); + } + } + return retVal; + } +} diff --git a/src/ecl/main.ts b/src/ecl/main.ts index 3a4ae8e4..7c9aa2e7 100644 --- a/src/ecl/main.ts +++ b/src/ecl/main.ts @@ -2,6 +2,7 @@ import * as vscode from "vscode"; import { ECLCommands } from "./command"; import { ECLConfigurationProvider } from "./configProvider"; import { ECLDiagnostic } from "./diagnostic"; +import { ECLDocumentSymbolProvider } from "./documentSymbolProvider"; import { ECLEditor } from "./editor"; import { ECLStatusBar } from "./status"; import { ECLTree } from "./tree"; @@ -26,6 +27,7 @@ export function activate(ctx: vscode.ExtensionContext): void { ECLCommands.attach(ctx); ECLEditor.attach(ctx); ECLStatusBar.attach(ctx); + ECLDocumentSymbolProvider.attach(ctx); ECLTree.attach(ctx); ECLWatch.attach(ctx); }