@hydranium/core 1.0.0-next.10
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/LICENSE +21 -0
- package/README.md +100 -0
- package/lib/documents/ast-document-manager.d.ts +243 -0
- package/lib/documents/ast-document-manager.d.ts.map +1 -0
- package/lib/documents/ast-document-manager.js +302 -0
- package/lib/documents/ast-document-manager.js.map +1 -0
- package/lib/documents/client-ids.d.ts +30 -0
- package/lib/documents/client-ids.d.ts.map +1 -0
- package/lib/documents/client-ids.js +30 -0
- package/lib/documents/client-ids.js.map +1 -0
- package/lib/documents/hydranium-text-documents.d.ts +490 -0
- package/lib/documents/hydranium-text-documents.d.ts.map +1 -0
- package/lib/documents/hydranium-text-documents.js +893 -0
- package/lib/documents/hydranium-text-documents.js.map +1 -0
- package/lib/documents/index.d.ts +14 -0
- package/lib/documents/index.d.ts.map +1 -0
- package/lib/documents/index.js +14 -0
- package/lib/documents/index.js.map +1 -0
- package/lib/documents/language-client-text-shadow.d.ts +101 -0
- package/lib/documents/language-client-text-shadow.d.ts.map +1 -0
- package/lib/documents/language-client-text-shadow.js +156 -0
- package/lib/documents/language-client-text-shadow.js.map +1 -0
- package/lib/documents/self-save-registry.d.ts +55 -0
- package/lib/documents/self-save-registry.d.ts.map +1 -0
- package/lib/documents/self-save-registry.js +68 -0
- package/lib/documents/self-save-registry.js.map +1 -0
- package/lib/index.d.ts +38 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +39 -0
- package/lib/index.js.map +1 -0
- package/lib/langium/ast-extension/ast-extension-contribution.d.ts +33 -0
- package/lib/langium/ast-extension/ast-extension-contribution.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-extension-contribution.js +10 -0
- package/lib/langium/ast-extension/ast-extension-contribution.js.map +1 -0
- package/lib/langium/ast-extension/ast-extension-service.d.ts +212 -0
- package/lib/langium/ast-extension/ast-extension-service.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-extension-service.js +181 -0
- package/lib/langium/ast-extension/ast-extension-service.js.map +1 -0
- package/lib/langium/ast-extension/ast-node-builder.d.ts +90 -0
- package/lib/langium/ast-extension/ast-node-builder.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-node-builder.js +61 -0
- package/lib/langium/ast-extension/ast-node-builder.js.map +1 -0
- package/lib/langium/ast-extension/index.d.ts +12 -0
- package/lib/langium/ast-extension/index.d.ts.map +1 -0
- package/lib/langium/ast-extension/index.js +12 -0
- package/lib/langium/ast-extension/index.js.map +1 -0
- package/lib/langium/bootstrap.d.ts +224 -0
- package/lib/langium/bootstrap.d.ts.map +1 -0
- package/lib/langium/bootstrap.js +512 -0
- package/lib/langium/bootstrap.js.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts +77 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.js +102 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.js.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass.d.ts +106 -0
- package/lib/langium/build-phase-pass/build-phase-pass.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass.js +43 -0
- package/lib/langium/build-phase-pass/build-phase-pass.js.map +1 -0
- package/lib/langium/build-phase-pass/index.d.ts +11 -0
- package/lib/langium/build-phase-pass/index.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/index.js +11 -0
- package/lib/langium/build-phase-pass/index.js.map +1 -0
- package/lib/langium/config/index.d.ts +10 -0
- package/lib/langium/config/index.d.ts.map +1 -0
- package/lib/langium/config/index.js +10 -0
- package/lib/langium/config/index.js.map +1 -0
- package/lib/langium/config/settings.d.ts +173 -0
- package/lib/langium/config/settings.d.ts.map +1 -0
- package/lib/langium/config/settings.js +196 -0
- package/lib/langium/config/settings.js.map +1 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts +109 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts.map +1 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.js +153 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.js.map +1 -0
- package/lib/langium/diagnostics/index.d.ts +14 -0
- package/lib/langium/diagnostics/index.d.ts.map +1 -0
- package/lib/langium/diagnostics/index.js +19 -0
- package/lib/langium/diagnostics/index.js.map +1 -0
- package/lib/langium/diagnostics/log-file-token.d.ts +16 -0
- package/lib/langium/diagnostics/log-file-token.d.ts.map +1 -0
- package/lib/langium/diagnostics/log-file-token.js +25 -0
- package/lib/langium/diagnostics/log-file-token.js.map +1 -0
- package/lib/langium/diagnostics/log-preamble.d.ts +42 -0
- package/lib/langium/diagnostics/log-preamble.d.ts.map +1 -0
- package/lib/langium/diagnostics/log-preamble.js +57 -0
- package/lib/langium/diagnostics/log-preamble.js.map +1 -0
- package/lib/langium/diagnostics/logger.d.ts +104 -0
- package/lib/langium/diagnostics/logger.d.ts.map +1 -0
- package/lib/langium/diagnostics/logger.js +178 -0
- package/lib/langium/diagnostics/logger.js.map +1 -0
- package/lib/langium/diagnostics/lsp-logger.d.ts +76 -0
- package/lib/langium/diagnostics/lsp-logger.d.ts.map +1 -0
- package/lib/langium/diagnostics/lsp-logger.js +223 -0
- package/lib/langium/diagnostics/lsp-logger.js.map +1 -0
- package/lib/langium/diagnostics/server-tracer.d.ts +27 -0
- package/lib/langium/diagnostics/server-tracer.d.ts.map +1 -0
- package/lib/langium/diagnostics/server-tracer.js +66 -0
- package/lib/langium/diagnostics/server-tracer.js.map +1 -0
- package/lib/langium/document-builder/build-pipeline-integration.d.ts +88 -0
- package/lib/langium/document-builder/build-pipeline-integration.d.ts.map +1 -0
- package/lib/langium/document-builder/build-pipeline-integration.js +151 -0
- package/lib/langium/document-builder/build-pipeline-integration.js.map +1 -0
- package/lib/langium/document-builder/document-builder.d.ts +405 -0
- package/lib/langium/document-builder/document-builder.d.ts.map +1 -0
- package/lib/langium/document-builder/document-builder.js +729 -0
- package/lib/langium/document-builder/document-builder.js.map +1 -0
- package/lib/langium/document-builder/index.d.ts +12 -0
- package/lib/langium/document-builder/index.d.ts.map +1 -0
- package/lib/langium/document-builder/index.js +12 -0
- package/lib/langium/document-builder/index.js.map +1 -0
- package/lib/langium/document-builder/labeled-phase-listener.d.ts +21 -0
- package/lib/langium/document-builder/labeled-phase-listener.d.ts.map +1 -0
- package/lib/langium/document-builder/labeled-phase-listener.js +15 -0
- package/lib/langium/document-builder/labeled-phase-listener.js.map +1 -0
- package/lib/langium/documentation/comment-provider.d.ts +31 -0
- package/lib/langium/documentation/comment-provider.d.ts.map +1 -0
- package/lib/langium/documentation/comment-provider.js +36 -0
- package/lib/langium/documentation/comment-provider.js.map +1 -0
- package/lib/langium/documentation/index.d.ts +10 -0
- package/lib/langium/documentation/index.d.ts.map +1 -0
- package/lib/langium/documentation/index.js +10 -0
- package/lib/langium/documentation/index.js.map +1 -0
- package/lib/langium/integration-services.d.ts +200 -0
- package/lib/langium/integration-services.d.ts.map +1 -0
- package/lib/langium/integration-services.js +65 -0
- package/lib/langium/integration-services.js.map +1 -0
- package/lib/langium/integrity/index.d.ts +12 -0
- package/lib/langium/integrity/index.d.ts.map +1 -0
- package/lib/langium/integrity/index.js +12 -0
- package/lib/langium/integrity/index.js.map +1 -0
- package/lib/langium/integrity/integrity-contribution.d.ts +42 -0
- package/lib/langium/integrity/integrity-contribution.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-contribution.js +10 -0
- package/lib/langium/integrity/integrity-contribution.js.map +1 -0
- package/lib/langium/integrity/integrity-rule.d.ts +82 -0
- package/lib/langium/integrity/integrity-rule.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-rule.js +52 -0
- package/lib/langium/integrity/integrity-rule.js.map +1 -0
- package/lib/langium/integrity/integrity-service.d.ts +221 -0
- package/lib/langium/integrity/integrity-service.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-service.js +328 -0
- package/lib/langium/integrity/integrity-service.js.map +1 -0
- package/lib/langium/keys/default-element-key-provider.d.ts +19 -0
- package/lib/langium/keys/default-element-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/default-element-key-provider.js +18 -0
- package/lib/langium/keys/default-element-key-provider.js.map +1 -0
- package/lib/langium/keys/element-key-provider.d.ts +106 -0
- package/lib/langium/keys/element-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/element-key-provider.js +25 -0
- package/lib/langium/keys/element-key-provider.js.map +1 -0
- package/lib/langium/keys/index.d.ts +13 -0
- package/lib/langium/keys/index.d.ts.map +1 -0
- package/lib/langium/keys/index.js +13 -0
- package/lib/langium/keys/index.js.map +1 -0
- package/lib/langium/keys/name-based-key-provider.d.ts +99 -0
- package/lib/langium/keys/name-based-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/name-based-key-provider.js +134 -0
- package/lib/langium/keys/name-based-key-provider.js.map +1 -0
- package/lib/langium/keys/positional-key-provider.d.ts +41 -0
- package/lib/langium/keys/positional-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/positional-key-provider.js +48 -0
- package/lib/langium/keys/positional-key-provider.js.map +1 -0
- package/lib/langium/labeling/index.d.ts +10 -0
- package/lib/langium/labeling/index.d.ts.map +1 -0
- package/lib/langium/labeling/index.js +10 -0
- package/lib/langium/labeling/index.js.map +1 -0
- package/lib/langium/labeling/label-provider.d.ts +79 -0
- package/lib/langium/labeling/label-provider.d.ts.map +1 -0
- package/lib/langium/labeling/label-provider.js +44 -0
- package/lib/langium/labeling/label-provider.js.map +1 -0
- package/lib/langium/language-module.d.ts +281 -0
- package/lib/langium/language-module.d.ts.map +1 -0
- package/lib/langium/language-module.js +103 -0
- package/lib/langium/language-module.js.map +1 -0
- package/lib/langium/language-types.d.ts +85 -0
- package/lib/langium/language-types.d.ts.map +1 -0
- package/lib/langium/language-types.js +173 -0
- package/lib/langium/language-types.js.map +1 -0
- package/lib/langium/model-service/index.d.ts +10 -0
- package/lib/langium/model-service/index.d.ts.map +1 -0
- package/lib/langium/model-service/index.js +10 -0
- package/lib/langium/model-service/index.js.map +1 -0
- package/lib/langium/model-service/model-service.d.ts +598 -0
- package/lib/langium/model-service/model-service.d.ts.map +1 -0
- package/lib/langium/model-service/model-service.js +889 -0
- package/lib/langium/model-service/model-service.js.map +1 -0
- package/lib/langium/module.d.ts +308 -0
- package/lib/langium/module.d.ts.map +1 -0
- package/lib/langium/module.js +165 -0
- package/lib/langium/module.js.map +1 -0
- package/lib/langium/naming/index.d.ts +11 -0
- package/lib/langium/naming/index.d.ts.map +1 -0
- package/lib/langium/naming/index.js +11 -0
- package/lib/langium/naming/index.js.map +1 -0
- package/lib/langium/naming/name-provider.d.ts +360 -0
- package/lib/langium/naming/name-provider.d.ts.map +1 -0
- package/lib/langium/naming/name-provider.js +240 -0
- package/lib/langium/naming/name-provider.js.map +1 -0
- package/lib/langium/naming/name-separator-validation.d.ts +47 -0
- package/lib/langium/naming/name-separator-validation.d.ts.map +1 -0
- package/lib/langium/naming/name-separator-validation.js +61 -0
- package/lib/langium/naming/name-separator-validation.js.map +1 -0
- package/lib/langium/project/abstract-project-manager.d.ts +242 -0
- package/lib/langium/project/abstract-project-manager.d.ts.map +1 -0
- package/lib/langium/project/abstract-project-manager.js +545 -0
- package/lib/langium/project/abstract-project-manager.js.map +1 -0
- package/lib/langium/project/index.d.ts +13 -0
- package/lib/langium/project/index.d.ts.map +1 -0
- package/lib/langium/project/index.js +13 -0
- package/lib/langium/project/index.js.map +1 -0
- package/lib/langium/project/project-change-event.d.ts +64 -0
- package/lib/langium/project/project-change-event.d.ts.map +1 -0
- package/lib/langium/project/project-change-event.js +10 -0
- package/lib/langium/project/project-change-event.js.map +1 -0
- package/lib/langium/project/project-manager.d.ts +196 -0
- package/lib/langium/project/project-manager.d.ts.map +1 -0
- package/lib/langium/project/project-manager.js +10 -0
- package/lib/langium/project/project-manager.js.map +1 -0
- package/lib/langium/project/single-project-manager.d.ts +69 -0
- package/lib/langium/project/single-project-manager.d.ts.map +1 -0
- package/lib/langium/project/single-project-manager.js +104 -0
- package/lib/langium/project/single-project-manager.js.map +1 -0
- package/lib/langium/residency/cst-residency-service.d.ts +214 -0
- package/lib/langium/residency/cst-residency-service.d.ts.map +1 -0
- package/lib/langium/residency/cst-residency-service.js +349 -0
- package/lib/langium/residency/cst-residency-service.js.map +1 -0
- package/lib/langium/residency/index.d.ts +10 -0
- package/lib/langium/residency/index.d.ts.map +1 -0
- package/lib/langium/residency/index.js +10 -0
- package/lib/langium/residency/index.js.map +1 -0
- package/lib/langium/scope/ast-node-description-provider.d.ts +122 -0
- package/lib/langium/scope/ast-node-description-provider.d.ts.map +1 -0
- package/lib/langium/scope/ast-node-description-provider.js +115 -0
- package/lib/langium/scope/ast-node-description-provider.js.map +1 -0
- package/lib/langium/scope/hydranium-scope-computation.d.ts +163 -0
- package/lib/langium/scope/hydranium-scope-computation.d.ts.map +1 -0
- package/lib/langium/scope/hydranium-scope-computation.js +220 -0
- package/lib/langium/scope/hydranium-scope-computation.js.map +1 -0
- package/lib/langium/scope/hydranium-scope-provider.d.ts +411 -0
- package/lib/langium/scope/hydranium-scope-provider.d.ts.map +1 -0
- package/lib/langium/scope/hydranium-scope-provider.js +543 -0
- package/lib/langium/scope/hydranium-scope-provider.js.map +1 -0
- package/lib/langium/scope/index.d.ts +18 -0
- package/lib/langium/scope/index.d.ts.map +1 -0
- package/lib/langium/scope/index.js +18 -0
- package/lib/langium/scope/index.js.map +1 -0
- package/lib/langium/scope/reference-builder.d.ts +125 -0
- package/lib/langium/scope/reference-builder.d.ts.map +1 -0
- package/lib/langium/scope/reference-builder.js +115 -0
- package/lib/langium/scope/reference-builder.js.map +1 -0
- package/lib/langium/scope/reference-candidate-provider.d.ts +228 -0
- package/lib/langium/scope/reference-candidate-provider.d.ts.map +1 -0
- package/lib/langium/scope/reference-candidate-provider.js +185 -0
- package/lib/langium/scope/reference-candidate-provider.js.map +1 -0
- package/lib/langium/scope/scope-extension-contribution.d.ts +32 -0
- package/lib/langium/scope/scope-extension-contribution.d.ts.map +1 -0
- package/lib/langium/scope/scope-extension-contribution.js +10 -0
- package/lib/langium/scope/scope-extension-contribution.js.map +1 -0
- package/lib/langium/scope/scope-extension-service.d.ts +149 -0
- package/lib/langium/scope/scope-extension-service.d.ts.map +1 -0
- package/lib/langium/scope/scope-extension-service.js +94 -0
- package/lib/langium/scope/scope-extension-service.js.map +1 -0
- package/lib/langium/scope/scoped-ast-node-description.d.ts +160 -0
- package/lib/langium/scope/scoped-ast-node-description.d.ts.map +1 -0
- package/lib/langium/scope/scoped-ast-node-description.js +98 -0
- package/lib/langium/scope/scoped-ast-node-description.js.map +1 -0
- package/lib/langium/scope/tier-specificity.d.ts +47 -0
- package/lib/langium/scope/tier-specificity.d.ts.map +1 -0
- package/lib/langium/scope/tier-specificity.js +83 -0
- package/lib/langium/scope/tier-specificity.js.map +1 -0
- package/lib/langium/serialization/abstract-serializer.d.ts +316 -0
- package/lib/langium/serialization/abstract-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/abstract-serializer.js +351 -0
- package/lib/langium/serialization/abstract-serializer.js.map +1 -0
- package/lib/langium/serialization/index.d.ts +14 -0
- package/lib/langium/serialization/index.d.ts.map +1 -0
- package/lib/langium/serialization/index.js +14 -0
- package/lib/langium/serialization/index.js.map +1 -0
- package/lib/langium/serialization/json-serializer.d.ts +106 -0
- package/lib/langium/serialization/json-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/json-serializer.js +198 -0
- package/lib/langium/serialization/json-serializer.js.map +1 -0
- package/lib/langium/serialization/serialization-util.d.ts +29 -0
- package/lib/langium/serialization/serialization-util.d.ts.map +1 -0
- package/lib/langium/serialization/serialization-util.js +37 -0
- package/lib/langium/serialization/serialization-util.js.map +1 -0
- package/lib/langium/serialization/serializer.d.ts +66 -0
- package/lib/langium/serialization/serializer.d.ts.map +1 -0
- package/lib/langium/serialization/serializer.js +10 -0
- package/lib/langium/serialization/serializer.js.map +1 -0
- package/lib/langium/serialization/yaml-serializer.d.ts +166 -0
- package/lib/langium/serialization/yaml-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/yaml-serializer.js +228 -0
- package/lib/langium/serialization/yaml-serializer.js.map +1 -0
- package/lib/langium/service-registry.d.ts +220 -0
- package/lib/langium/service-registry.d.ts.map +1 -0
- package/lib/langium/service-registry.js +258 -0
- package/lib/langium/service-registry.js.map +1 -0
- package/lib/langium/shared-services.d.ts +98 -0
- package/lib/langium/shared-services.d.ts.map +1 -0
- package/lib/langium/shared-services.js +30 -0
- package/lib/langium/shared-services.js.map +1 -0
- package/lib/langium/transfer/index.d.ts +10 -0
- package/lib/langium/transfer/index.d.ts.map +1 -0
- package/lib/langium/transfer/index.js +10 -0
- package/lib/langium/transfer/index.js.map +1 -0
- package/lib/langium/transfer/transfer-encoder.d.ts +294 -0
- package/lib/langium/transfer/transfer-encoder.d.ts.map +1 -0
- package/lib/langium/transfer/transfer-encoder.js +328 -0
- package/lib/langium/transfer/transfer-encoder.js.map +1 -0
- package/lib/langium/update-rewrite/index.d.ts +14 -0
- package/lib/langium/update-rewrite/index.d.ts.map +1 -0
- package/lib/langium/update-rewrite/index.js +14 -0
- package/lib/langium/update-rewrite/index.js.map +1 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.d.ts +52 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.d.ts.map +1 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.js +83 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.js.map +1 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.d.ts +37 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.d.ts.map +1 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.js +51 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.d.ts +42 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.js +10 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-service.d.ts +89 -0
- package/lib/langium/update-rewrite/update-rewrite-service.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-service.js +75 -0
- package/lib/langium/update-rewrite/update-rewrite-service.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite.d.ts +59 -0
- package/lib/langium/update-rewrite/update-rewrite.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite.js +10 -0
- package/lib/langium/update-rewrite/update-rewrite.js.map +1 -0
- package/lib/langium/validation/document-validator.d.ts +106 -0
- package/lib/langium/validation/document-validator.d.ts.map +1 -0
- package/lib/langium/validation/document-validator.js +118 -0
- package/lib/langium/validation/document-validator.js.map +1 -0
- package/lib/langium/validation/index.d.ts +12 -0
- package/lib/langium/validation/index.d.ts.map +1 -0
- package/lib/langium/validation/index.js +12 -0
- package/lib/langium/validation/index.js.map +1 -0
- package/lib/langium/validation/validation-contribution-collector.d.ts +34 -0
- package/lib/langium/validation/validation-contribution-collector.d.ts.map +1 -0
- package/lib/langium/validation/validation-contribution-collector.js +51 -0
- package/lib/langium/validation/validation-contribution-collector.js.map +1 -0
- package/lib/langium/validation/validation-contribution.d.ts +36 -0
- package/lib/langium/validation/validation-contribution.d.ts.map +1 -0
- package/lib/langium/validation/validation-contribution.js +10 -0
- package/lib/langium/validation/validation-contribution.js.map +1 -0
- package/lib/langium/workspace/additional-document-contribution.d.ts +68 -0
- package/lib/langium/workspace/additional-document-contribution.d.ts.map +1 -0
- package/lib/langium/workspace/additional-document-contribution.js +23 -0
- package/lib/langium/workspace/additional-document-contribution.js.map +1 -0
- package/lib/langium/workspace/document-uri-policy.d.ts +151 -0
- package/lib/langium/workspace/document-uri-policy.d.ts.map +1 -0
- package/lib/langium/workspace/document-uri-policy.js +121 -0
- package/lib/langium/workspace/document-uri-policy.js.map +1 -0
- package/lib/langium/workspace/file-system-provider.d.ts +30 -0
- package/lib/langium/workspace/file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/file-system-provider.js +41 -0
- package/lib/langium/workspace/file-system-provider.js.map +1 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts +45 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.js +64 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.js.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-lock.d.ts +31 -0
- package/lib/langium/workspace/hydranium-workspace-lock.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-lock.js +33 -0
- package/lib/langium/workspace/hydranium-workspace-lock.js.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts +232 -0
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-manager.js +368 -0
- package/lib/langium/workspace/hydranium-workspace-manager.js.map +1 -0
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts +127 -0
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/in-memory-file-system-provider.js +195 -0
- package/lib/langium/workspace/in-memory-file-system-provider.js.map +1 -0
- package/lib/langium/workspace/index-manager.d.ts +142 -0
- package/lib/langium/workspace/index-manager.d.ts.map +1 -0
- package/lib/langium/workspace/index-manager.js +245 -0
- package/lib/langium/workspace/index-manager.js.map +1 -0
- package/lib/langium/workspace/index.d.ts +23 -0
- package/lib/langium/workspace/index.d.ts.map +1 -0
- package/lib/langium/workspace/index.js +23 -0
- package/lib/langium/workspace/index.js.map +1 -0
- package/lib/langium/workspace/initialize-workspace.d.ts +63 -0
- package/lib/langium/workspace/initialize-workspace.d.ts.map +1 -0
- package/lib/langium/workspace/initialize-workspace.js +88 -0
- package/lib/langium/workspace/initialize-workspace.js.map +1 -0
- package/lib/langium/workspace/langium-documents.d.ts +47 -0
- package/lib/langium/workspace/langium-documents.d.ts.map +1 -0
- package/lib/langium/workspace/langium-documents.js +85 -0
- package/lib/langium/workspace/langium-documents.js.map +1 -0
- package/lib/langium/workspace/persistent-file-system-provider.d.ts +207 -0
- package/lib/langium/workspace/persistent-file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/persistent-file-system-provider.js +208 -0
- package/lib/langium/workspace/persistent-file-system-provider.js.map +1 -0
- package/lib/langium/workspace/synthetic.d.ts +38 -0
- package/lib/langium/workspace/synthetic.d.ts.map +1 -0
- package/lib/langium/workspace/synthetic.js +58 -0
- package/lib/langium/workspace/synthetic.js.map +1 -0
- package/lib/langium/workspace/virtual-document.d.ts +78 -0
- package/lib/langium/workspace/virtual-document.d.ts.map +1 -0
- package/lib/langium/workspace/virtual-document.js +89 -0
- package/lib/langium/workspace/virtual-document.js.map +1 -0
- package/lib/langium/workspace/write-lock-scope.d.ts +69 -0
- package/lib/langium/workspace/write-lock-scope.d.ts.map +1 -0
- package/lib/langium/workspace/write-lock-scope.js +54 -0
- package/lib/langium/workspace/write-lock-scope.js.map +1 -0
- package/lib/launcher/index.d.ts +10 -0
- package/lib/launcher/index.d.ts.map +1 -0
- package/lib/launcher/index.js +12 -0
- package/lib/launcher/index.js.map +1 -0
- package/lib/launcher/integrated-server.d.ts +28 -0
- package/lib/launcher/integrated-server.d.ts.map +1 -0
- package/lib/launcher/integrated-server.js +10 -0
- package/lib/launcher/integrated-server.js.map +1 -0
- package/lib/lsp/completion/hydranium-completion-provider.d.ts +89 -0
- package/lib/lsp/completion/hydranium-completion-provider.d.ts.map +1 -0
- package/lib/lsp/completion/hydranium-completion-provider.js +123 -0
- package/lib/lsp/completion/hydranium-completion-provider.js.map +1 -0
- package/lib/lsp/hydranium-document-update-handler.d.ts +204 -0
- package/lib/lsp/hydranium-document-update-handler.d.ts.map +1 -0
- package/lib/lsp/hydranium-document-update-handler.js +288 -0
- package/lib/lsp/hydranium-document-update-handler.js.map +1 -0
- package/lib/lsp/index.d.ts +23 -0
- package/lib/lsp/index.d.ts.map +1 -0
- package/lib/lsp/index.js +23 -0
- package/lib/lsp/index.js.map +1 -0
- package/lib/lsp/instrument-connection.d.ts +36 -0
- package/lib/lsp/instrument-connection.d.ts.map +1 -0
- package/lib/lsp/instrument-connection.js +62 -0
- package/lib/lsp/instrument-connection.js.map +1 -0
- package/lib/lsp/language-module.d.ts +53 -0
- package/lib/lsp/language-module.d.ts.map +1 -0
- package/lib/lsp/language-module.js +28 -0
- package/lib/lsp/language-module.js.map +1 -0
- package/lib/lsp/semantic-token-provider.d.ts +131 -0
- package/lib/lsp/semantic-token-provider.d.ts.map +1 -0
- package/lib/lsp/semantic-token-provider.js +148 -0
- package/lib/lsp/semantic-token-provider.js.map +1 -0
- package/lib/lsp/shared-module.d.ts +76 -0
- package/lib/lsp/shared-module.d.ts.map +1 -0
- package/lib/lsp/shared-module.js +33 -0
- package/lib/lsp/shared-module.js.map +1 -0
- package/lib/lsp/start-language-server.d.ts +43 -0
- package/lib/lsp/start-language-server.d.ts.map +1 -0
- package/lib/lsp/start-language-server.js +60 -0
- package/lib/lsp/start-language-server.js.map +1 -0
- package/lib/node/ast-ground-truth.d.ts +57 -0
- package/lib/node/ast-ground-truth.d.ts.map +1 -0
- package/lib/node/ast-ground-truth.js +46 -0
- package/lib/node/ast-ground-truth.js.map +1 -0
- package/lib/node/event-loop-monitor.d.ts +40 -0
- package/lib/node/event-loop-monitor.d.ts.map +1 -0
- package/lib/node/event-loop-monitor.js +62 -0
- package/lib/node/event-loop-monitor.js.map +1 -0
- package/lib/node/index.d.ts +29 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +50 -0
- package/lib/node/index.js.map +1 -0
- package/lib/node/latency-from-env.d.ts +32 -0
- package/lib/node/latency-from-env.d.ts.map +1 -0
- package/lib/node/latency-from-env.js +36 -0
- package/lib/node/latency-from-env.js.map +1 -0
- package/lib/node/lint-grammar.d.ts +87 -0
- package/lib/node/lint-grammar.d.ts.map +1 -0
- package/lib/node/lint-grammar.js +124 -0
- package/lib/node/lint-grammar.js.map +1 -0
- package/lib/node/log-file-sink.d.ts +22 -0
- package/lib/node/log-file-sink.d.ts.map +1 -0
- package/lib/node/log-file-sink.js +43 -0
- package/lib/node/log-file-sink.js.map +1 -0
- package/lib/node/log-preamble-node.d.ts +28 -0
- package/lib/node/log-preamble-node.d.ts.map +1 -0
- package/lib/node/log-preamble-node.js +55 -0
- package/lib/node/log-preamble-node.js.map +1 -0
- package/lib/node/measure-memory.d.ts +86 -0
- package/lib/node/measure-memory.d.ts.map +1 -0
- package/lib/node/measure-memory.js +128 -0
- package/lib/node/measure-memory.js.map +1 -0
- package/lib/node/memory-monitor.d.ts +42 -0
- package/lib/node/memory-monitor.d.ts.map +1 -0
- package/lib/node/memory-monitor.js +83 -0
- package/lib/node/memory-monitor.js.map +1 -0
- package/lib/node/node-file-system-provider.d.ts +112 -0
- package/lib/node/node-file-system-provider.d.ts.map +1 -0
- package/lib/node/node-file-system-provider.js +230 -0
- package/lib/node/node-file-system-provider.js.map +1 -0
- package/lib/node/process-memory.d.ts +66 -0
- package/lib/node/process-memory.d.ts.map +1 -0
- package/lib/node/process-memory.js +252 -0
- package/lib/node/process-memory.js.map +1 -0
- package/lib/node/profile-capture.d.ts +118 -0
- package/lib/node/profile-capture.d.ts.map +1 -0
- package/lib/node/profile-capture.js +315 -0
- package/lib/node/profile-capture.js.map +1 -0
- package/lib/node/profile-digest.d.ts +49 -0
- package/lib/node/profile-digest.d.ts.map +1 -0
- package/lib/node/profile-digest.js +74 -0
- package/lib/node/profile-digest.js.map +1 -0
- package/lib/node/profiling-run.d.ts +80 -0
- package/lib/node/profiling-run.d.ts.map +1 -0
- package/lib/node/profiling-run.js +183 -0
- package/lib/node/profiling-run.js.map +1 -0
- package/lib/node/reflect-grammar.d.ts +109 -0
- package/lib/node/reflect-grammar.d.ts.map +1 -0
- package/lib/node/reflect-grammar.js +96 -0
- package/lib/node/reflect-grammar.js.map +1 -0
- package/lib/node/server-diagnostics.d.ts +43 -0
- package/lib/node/server-diagnostics.d.ts.map +1 -0
- package/lib/node/server-diagnostics.js +46 -0
- package/lib/node/server-diagnostics.js.map +1 -0
- package/lib/node/server-state-snapshot.d.ts +48 -0
- package/lib/node/server-state-snapshot.d.ts.map +1 -0
- package/lib/node/server-state-snapshot.js +139 -0
- package/lib/node/server-state-snapshot.js.map +1 -0
- package/lib/node/socket-launcher.d.ts +106 -0
- package/lib/node/socket-launcher.d.ts.map +1 -0
- package/lib/node/socket-launcher.js +138 -0
- package/lib/node/socket-launcher.js.map +1 -0
- package/lib/node/stdio-launcher.d.ts +88 -0
- package/lib/node/stdio-launcher.d.ts.map +1 -0
- package/lib/node/stdio-launcher.js +83 -0
- package/lib/node/stdio-launcher.js.map +1 -0
- package/lib/node/validate-workspace.d.ts +80 -0
- package/lib/node/validate-workspace.d.ts.map +1 -0
- package/lib/node/validate-workspace.js +72 -0
- package/lib/node/validate-workspace.js.map +1 -0
- package/lib/node/write-lock-scope-node.d.ts +27 -0
- package/lib/node/write-lock-scope-node.d.ts.map +1 -0
- package/lib/node/write-lock-scope-node.js +38 -0
- package/lib/node/write-lock-scope-node.js.map +1 -0
- package/lib/testing/ast-snapshot.d.ts +38 -0
- package/lib/testing/ast-snapshot.d.ts.map +1 -0
- package/lib/testing/ast-snapshot.js +78 -0
- package/lib/testing/ast-snapshot.js.map +1 -0
- package/lib/testing/document-uri-policy-conformance.d.ts +65 -0
- package/lib/testing/document-uri-policy-conformance.d.ts.map +1 -0
- package/lib/testing/document-uri-policy-conformance.js +69 -0
- package/lib/testing/document-uri-policy-conformance.js.map +1 -0
- package/lib/testing/fake-description.d.ts +35 -0
- package/lib/testing/fake-description.d.ts.map +1 -0
- package/lib/testing/fake-description.js +38 -0
- package/lib/testing/fake-description.js.map +1 -0
- package/lib/testing/fake-document.d.ts +71 -0
- package/lib/testing/fake-document.d.ts.map +1 -0
- package/lib/testing/fake-document.js +85 -0
- package/lib/testing/fake-document.js.map +1 -0
- package/lib/testing/fake-reflection.d.ts +29 -0
- package/lib/testing/fake-reflection.d.ts.map +1 -0
- package/lib/testing/fake-reflection.js +30 -0
- package/lib/testing/fake-reflection.js.map +1 -0
- package/lib/testing/index.d.ts +44 -0
- package/lib/testing/index.d.ts.map +1 -0
- package/lib/testing/index.js +44 -0
- package/lib/testing/index.js.map +1 -0
- package/lib/testing/langium-test-helpers.d.ts +26 -0
- package/lib/testing/langium-test-helpers.d.ts.map +1 -0
- package/lib/testing/langium-test-helpers.js +26 -0
- package/lib/testing/langium-test-helpers.js.map +1 -0
- package/lib/testing/make-noop-language-services.d.ts +39 -0
- package/lib/testing/make-noop-language-services.d.ts.map +1 -0
- package/lib/testing/make-noop-language-services.js +30 -0
- package/lib/testing/make-noop-language-services.js.map +1 -0
- package/lib/testing/make-noop-shared-services.d.ts +61 -0
- package/lib/testing/make-noop-shared-services.d.ts.map +1 -0
- package/lib/testing/make-noop-shared-services.js +49 -0
- package/lib/testing/make-noop-shared-services.js.map +1 -0
- package/lib/testing/make-test-services.d.ts +217 -0
- package/lib/testing/make-test-services.d.ts.map +1 -0
- package/lib/testing/make-test-services.js +128 -0
- package/lib/testing/make-test-services.js.map +1 -0
- package/lib/testing/make-test-tracer.d.ts +67 -0
- package/lib/testing/make-test-tracer.d.ts.map +1 -0
- package/lib/testing/make-test-tracer.js +68 -0
- package/lib/testing/make-test-tracer.js.map +1 -0
- package/lib/testing/node/generated-workspace.d.ts +95 -0
- package/lib/testing/node/generated-workspace.d.ts.map +1 -0
- package/lib/testing/node/generated-workspace.js +134 -0
- package/lib/testing/node/generated-workspace.js.map +1 -0
- package/lib/testing/node/golden-corpus.d.ts +50 -0
- package/lib/testing/node/golden-corpus.d.ts.map +1 -0
- package/lib/testing/node/golden-corpus.js +80 -0
- package/lib/testing/node/golden-corpus.js.map +1 -0
- package/lib/testing/node/index.d.ts +28 -0
- package/lib/testing/node/index.d.ts.map +1 -0
- package/lib/testing/node/index.js +28 -0
- package/lib/testing/node/index.js.map +1 -0
- package/lib/testing/node/lsp-harness.d.ts +139 -0
- package/lib/testing/node/lsp-harness.d.ts.map +1 -0
- package/lib/testing/node/lsp-harness.js +119 -0
- package/lib/testing/node/lsp-harness.js.map +1 -0
- package/lib/testing/node/lsp-server-connection.d.ts +232 -0
- package/lib/testing/node/lsp-server-connection.d.ts.map +1 -0
- package/lib/testing/node/lsp-server-connection.js +304 -0
- package/lib/testing/node/lsp-server-connection.js.map +1 -0
- package/lib/testing/node/scratch-workspace.d.ts +60 -0
- package/lib/testing/node/scratch-workspace.d.ts.map +1 -0
- package/lib/testing/node/scratch-workspace.js +87 -0
- package/lib/testing/node/scratch-workspace.js.map +1 -0
- package/lib/testing/node/spawned-server.d.ts +170 -0
- package/lib/testing/node/spawned-server.d.ts.map +1 -0
- package/lib/testing/node/spawned-server.js +265 -0
- package/lib/testing/node/spawned-server.js.map +1 -0
- package/lib/testing/parse-semantic-root.d.ts +83 -0
- package/lib/testing/parse-semantic-root.d.ts.map +1 -0
- package/lib/testing/parse-semantic-root.js +119 -0
- package/lib/testing/parse-semantic-root.js.map +1 -0
- package/lib/testing/playwright/browser-capture-bridge.d.ts +80 -0
- package/lib/testing/playwright/browser-capture-bridge.d.ts.map +1 -0
- package/lib/testing/playwright/browser-capture-bridge.js +161 -0
- package/lib/testing/playwright/browser-capture-bridge.js.map +1 -0
- package/lib/testing/playwright/e2e-profiling.d.ts +132 -0
- package/lib/testing/playwright/e2e-profiling.d.ts.map +1 -0
- package/lib/testing/playwright/e2e-profiling.js +270 -0
- package/lib/testing/playwright/e2e-profiling.js.map +1 -0
- package/lib/testing/playwright/index.d.ts +13 -0
- package/lib/testing/playwright/index.d.ts.map +1 -0
- package/lib/testing/playwright/index.js +16 -0
- package/lib/testing/playwright/index.js.map +1 -0
- package/lib/testing/playwright/server-log-capture.d.ts +230 -0
- package/lib/testing/playwright/server-log-capture.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-capture.js +336 -0
- package/lib/testing/playwright/server-log-capture.js.map +1 -0
- package/lib/testing/playwright/server-log-fixture.d.ts +36 -0
- package/lib/testing/playwright/server-log-fixture.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-fixture.js +38 -0
- package/lib/testing/playwright/server-log-fixture.js.map +1 -0
- package/lib/testing/playwright/server-log-rename-reporter.d.ts +22 -0
- package/lib/testing/playwright/server-log-rename-reporter.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-rename-reporter.js +26 -0
- package/lib/testing/playwright/server-log-rename-reporter.js.map +1 -0
- package/lib/testing/run-update-pipeline.d.ts +99 -0
- package/lib/testing/run-update-pipeline.d.ts.map +1 -0
- package/lib/testing/run-update-pipeline.js +24 -0
- package/lib/testing/run-update-pipeline.js.map +1 -0
- package/lib/testing/stub-ast-document-manager.d.ts +82 -0
- package/lib/testing/stub-ast-document-manager.d.ts.map +1 -0
- package/lib/testing/stub-ast-document-manager.js +125 -0
- package/lib/testing/stub-ast-document-manager.js.map +1 -0
- package/lib/testing/stub-document-builder.d.ts +99 -0
- package/lib/testing/stub-document-builder.d.ts.map +1 -0
- package/lib/testing/stub-document-builder.js +142 -0
- package/lib/testing/stub-document-builder.js.map +1 -0
- package/lib/testing/stub-hydranium-text-documents.d.ts +125 -0
- package/lib/testing/stub-hydranium-text-documents.d.ts.map +1 -0
- package/lib/testing/stub-hydranium-text-documents.js +164 -0
- package/lib/testing/stub-hydranium-text-documents.js.map +1 -0
- package/lib/testing/stub-index-manager.d.ts +40 -0
- package/lib/testing/stub-index-manager.d.ts.map +1 -0
- package/lib/testing/stub-index-manager.js +38 -0
- package/lib/testing/stub-index-manager.js.map +1 -0
- package/lib/testing/stub-langium-documents.d.ts +53 -0
- package/lib/testing/stub-langium-documents.d.ts.map +1 -0
- package/lib/testing/stub-langium-documents.js +62 -0
- package/lib/testing/stub-langium-documents.js.map +1 -0
- package/lib/testing/stub-model-service.d.ts +31 -0
- package/lib/testing/stub-model-service.d.ts.map +1 -0
- package/lib/testing/stub-model-service.js +45 -0
- package/lib/testing/stub-model-service.js.map +1 -0
- package/lib/testing/stub-project-manager.d.ts +43 -0
- package/lib/testing/stub-project-manager.d.ts.map +1 -0
- package/lib/testing/stub-project-manager.js +125 -0
- package/lib/testing/stub-project-manager.js.map +1 -0
- package/lib/testing/stub-self-save-registry.d.ts +31 -0
- package/lib/testing/stub-self-save-registry.d.ts.map +1 -0
- package/lib/testing/stub-self-save-registry.js +23 -0
- package/lib/testing/stub-self-save-registry.js.map +1 -0
- package/lib/testing/stub-service-registry.d.ts +95 -0
- package/lib/testing/stub-service-registry.d.ts.map +1 -0
- package/lib/testing/stub-service-registry.js +108 -0
- package/lib/testing/stub-service-registry.js.map +1 -0
- package/lib/testing/stub-writable-file-system.d.ts +42 -0
- package/lib/testing/stub-writable-file-system.d.ts.map +1 -0
- package/lib/testing/stub-writable-file-system.js +26 -0
- package/lib/testing/stub-writable-file-system.js.map +1 -0
- package/lib/util/connection-liveness.d.ts +25 -0
- package/lib/util/connection-liveness.d.ts.map +1 -0
- package/lib/util/connection-liveness.js +46 -0
- package/lib/util/connection-liveness.js.map +1 -0
- package/lib/util/environment.d.ts +53 -0
- package/lib/util/environment.d.ts.map +1 -0
- package/lib/util/environment.js +78 -0
- package/lib/util/environment.js.map +1 -0
- package/lib/util/index.d.ts +13 -0
- package/lib/util/index.d.ts.map +1 -0
- package/lib/util/index.js +18 -0
- package/lib/util/index.js.map +1 -0
- package/lib/util/registry.d.ts +88 -0
- package/lib/util/registry.d.ts.map +1 -0
- package/lib/util/registry.js +105 -0
- package/lib/util/registry.js.map +1 -0
- package/package.json +134 -0
- package/src/documents/ast-document-manager.ts +455 -0
- package/src/documents/client-ids.ts +33 -0
- package/src/documents/hydranium-text-documents.ts +1142 -0
- package/src/documents/index.ts +14 -0
- package/src/documents/language-client-text-shadow.ts +175 -0
- package/src/documents/self-save-registry.ts +81 -0
- package/src/index.ts +39 -0
- package/src/langium/ast-extension/ast-extension-contribution.ts +35 -0
- package/src/langium/ast-extension/ast-extension-service.ts +311 -0
- package/src/langium/ast-extension/ast-node-builder.ts +125 -0
- package/src/langium/ast-extension/index.ts +12 -0
- package/src/langium/bootstrap.ts +600 -0
- package/src/langium/build-phase-pass/build-phase-pass-service.ts +141 -0
- package/src/langium/build-phase-pass/build-phase-pass.ts +123 -0
- package/src/langium/build-phase-pass/index.ts +11 -0
- package/src/langium/config/index.ts +10 -0
- package/src/langium/config/settings.ts +353 -0
- package/src/langium/diagnostics/hydranium-langium-profiler.ts +187 -0
- package/src/langium/diagnostics/index.ts +19 -0
- package/src/langium/diagnostics/log-file-token.ts +26 -0
- package/src/langium/diagnostics/log-preamble.ts +87 -0
- package/src/langium/diagnostics/logger.ts +246 -0
- package/src/langium/diagnostics/lsp-logger.ts +277 -0
- package/src/langium/diagnostics/server-tracer.ts +73 -0
- package/src/langium/document-builder/build-pipeline-integration.ts +193 -0
- package/src/langium/document-builder/document-builder.ts +839 -0
- package/src/langium/document-builder/index.ts +12 -0
- package/src/langium/document-builder/labeled-phase-listener.ts +26 -0
- package/src/langium/documentation/comment-provider.ts +37 -0
- package/src/langium/documentation/index.ts +10 -0
- package/src/langium/integration-services.ts +281 -0
- package/src/langium/integrity/index.ts +12 -0
- package/src/langium/integrity/integrity-contribution.ts +44 -0
- package/src/langium/integrity/integrity-rule.ts +100 -0
- package/src/langium/integrity/integrity-service.ts +423 -0
- package/src/langium/keys/default-element-key-provider.ts +20 -0
- package/src/langium/keys/element-key-provider.ts +114 -0
- package/src/langium/keys/index.ts +13 -0
- package/src/langium/keys/name-based-key-provider.ts +146 -0
- package/src/langium/keys/positional-key-provider.ts +57 -0
- package/src/langium/labeling/index.ts +10 -0
- package/src/langium/labeling/label-provider.ts +110 -0
- package/src/langium/language-module.ts +367 -0
- package/src/langium/language-types.ts +214 -0
- package/src/langium/model-service/index.ts +10 -0
- package/src/langium/model-service/model-service.ts +1051 -0
- package/src/langium/module.ts +446 -0
- package/src/langium/naming/index.ts +11 -0
- package/src/langium/naming/name-provider.ts +533 -0
- package/src/langium/naming/name-separator-validation.ts +73 -0
- package/src/langium/project/abstract-project-manager.ts +630 -0
- package/src/langium/project/index.ts +13 -0
- package/src/langium/project/project-change-event.ts +66 -0
- package/src/langium/project/project-manager.ts +221 -0
- package/src/langium/project/single-project-manager.ts +126 -0
- package/src/langium/residency/cst-residency-service.ts +412 -0
- package/src/langium/residency/index.ts +10 -0
- package/src/langium/scope/ast-node-description-provider.ts +141 -0
- package/src/langium/scope/hydranium-scope-computation.ts +246 -0
- package/src/langium/scope/hydranium-scope-provider.ts +659 -0
- package/src/langium/scope/index.ts +18 -0
- package/src/langium/scope/reference-builder.ts +194 -0
- package/src/langium/scope/reference-candidate-provider.ts +314 -0
- package/src/langium/scope/scope-extension-contribution.ts +34 -0
- package/src/langium/scope/scope-extension-service.ts +207 -0
- package/src/langium/scope/scoped-ast-node-description.ts +174 -0
- package/src/langium/scope/tier-specificity.ts +89 -0
- package/src/langium/serialization/abstract-serializer.ts +474 -0
- package/src/langium/serialization/index.ts +14 -0
- package/src/langium/serialization/json-serializer.ts +264 -0
- package/src/langium/serialization/serialization-util.ts +40 -0
- package/src/langium/serialization/serializer.ts +68 -0
- package/src/langium/serialization/yaml-serializer.ts +348 -0
- package/src/langium/service-registry.ts +323 -0
- package/src/langium/shared-services.ts +107 -0
- package/src/langium/transfer/index.ts +10 -0
- package/src/langium/transfer/transfer-encoder.ts +434 -0
- package/src/langium/update-rewrite/index.ts +14 -0
- package/src/langium/update-rewrite/normalize-empty-strings.ts +86 -0
- package/src/langium/update-rewrite/semantic-root-rewrite.ts +57 -0
- package/src/langium/update-rewrite/update-rewrite-contribution.ts +44 -0
- package/src/langium/update-rewrite/update-rewrite-service.ts +129 -0
- package/src/langium/update-rewrite/update-rewrite.ts +60 -0
- package/src/langium/validation/document-validator.ts +188 -0
- package/src/langium/validation/index.ts +12 -0
- package/src/langium/validation/validation-contribution-collector.ts +61 -0
- package/src/langium/validation/validation-contribution.ts +38 -0
- package/src/langium/workspace/additional-document-contribution.ts +80 -0
- package/src/langium/workspace/document-uri-policy.ts +187 -0
- package/src/langium/workspace/file-system-provider.ts +52 -0
- package/src/langium/workspace/hydranium-langium-document-factory.ts +78 -0
- package/src/langium/workspace/hydranium-workspace-lock.ts +35 -0
- package/src/langium/workspace/hydranium-workspace-manager.ts +412 -0
- package/src/langium/workspace/in-memory-file-system-provider.ts +241 -0
- package/src/langium/workspace/index-manager.ts +266 -0
- package/src/langium/workspace/index.ts +23 -0
- package/src/langium/workspace/initialize-workspace.ts +102 -0
- package/src/langium/workspace/langium-documents.ts +94 -0
- package/src/langium/workspace/persistent-file-system-provider.ts +287 -0
- package/src/langium/workspace/synthetic.ts +63 -0
- package/src/langium/workspace/virtual-document.ts +94 -0
- package/src/langium/workspace/write-lock-scope.ts +88 -0
- package/src/launcher/index.ts +12 -0
- package/src/launcher/integrated-server.ts +28 -0
- package/src/lsp/completion/hydranium-completion-provider.ts +132 -0
- package/src/lsp/hydranium-document-update-handler.ts +345 -0
- package/src/lsp/index.ts +24 -0
- package/src/lsp/instrument-connection.ts +66 -0
- package/src/lsp/language-module.ts +64 -0
- package/src/lsp/semantic-token-provider.ts +215 -0
- package/src/lsp/shared-module.ts +88 -0
- package/src/lsp/start-language-server.ts +68 -0
- package/src/node/ast-ground-truth.ts +76 -0
- package/src/node/event-loop-monitor.ts +89 -0
- package/src/node/index.ts +53 -0
- package/src/node/latency-from-env.ts +39 -0
- package/src/node/lint-grammar.ts +189 -0
- package/src/node/log-file-sink.ts +43 -0
- package/src/node/log-preamble-node.ts +63 -0
- package/src/node/measure-memory.ts +196 -0
- package/src/node/memory-monitor.ts +103 -0
- package/src/node/node-file-system-provider.ts +252 -0
- package/src/node/process-memory.ts +299 -0
- package/src/node/profile-capture.ts +377 -0
- package/src/node/profile-digest.ts +112 -0
- package/src/node/profiling-run.ts +236 -0
- package/src/node/reflect-grammar.ts +182 -0
- package/src/node/server-diagnostics.ts +63 -0
- package/src/node/server-state-snapshot.ts +192 -0
- package/src/node/socket-launcher.ts +210 -0
- package/src/node/stdio-launcher.ts +150 -0
- package/src/node/validate-workspace.ts +133 -0
- package/src/node/write-lock-scope-node.ts +41 -0
- package/src/testing/ast-snapshot.ts +88 -0
- package/src/testing/document-uri-policy-conformance.ts +104 -0
- package/src/testing/fake-description.ts +52 -0
- package/src/testing/fake-document.ts +120 -0
- package/src/testing/fake-reflection.ts +39 -0
- package/src/testing/index.ts +45 -0
- package/src/testing/langium-test-helpers.ts +26 -0
- package/src/testing/make-noop-language-services.ts +47 -0
- package/src/testing/make-noop-shared-services.ts +78 -0
- package/src/testing/make-test-services.ts +356 -0
- package/src/testing/make-test-tracer.ts +92 -0
- package/src/testing/node/generated-workspace.ts +222 -0
- package/src/testing/node/golden-corpus.ts +114 -0
- package/src/testing/node/index.ts +29 -0
- package/src/testing/node/lsp-harness.ts +230 -0
- package/src/testing/node/lsp-server-connection.ts +575 -0
- package/src/testing/node/scratch-workspace.ts +137 -0
- package/src/testing/node/spawned-server.ts +447 -0
- package/src/testing/parse-semantic-root.ts +150 -0
- package/src/testing/playwright/browser-capture-bridge.ts +258 -0
- package/src/testing/playwright/e2e-profiling.ts +362 -0
- package/src/testing/playwright/index.ts +16 -0
- package/src/testing/playwright/server-log-capture.ts +433 -0
- package/src/testing/playwright/server-log-fixture.ts +57 -0
- package/src/testing/playwright/server-log-rename-reporter.ts +29 -0
- package/src/testing/run-update-pipeline.ts +113 -0
- package/src/testing/stub-ast-document-manager.ts +224 -0
- package/src/testing/stub-document-builder.ts +242 -0
- package/src/testing/stub-hydranium-text-documents.ts +270 -0
- package/src/testing/stub-index-manager.ts +79 -0
- package/src/testing/stub-langium-documents.ts +104 -0
- package/src/testing/stub-model-service.ts +72 -0
- package/src/testing/stub-project-manager.ts +161 -0
- package/src/testing/stub-self-save-registry.ts +43 -0
- package/src/testing/stub-service-registry.ts +192 -0
- package/src/testing/stub-writable-file-system.ts +58 -0
- package/src/util/connection-liveness.ts +47 -0
- package/src/util/environment.ts +88 -0
- package/src/util/index.ts +18 -0
- package/src/util/registry.ts +129 -0
|
@@ -0,0 +1,659 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
type Tracer,
|
|
12
|
+
type ReferenceContext,
|
|
13
|
+
type ReferenceRequest,
|
|
14
|
+
type ReferenceSource,
|
|
15
|
+
type SyntheticSource,
|
|
16
|
+
isDocumentSource,
|
|
17
|
+
isElementSource,
|
|
18
|
+
isReferenceContext,
|
|
19
|
+
isSyntheticSource
|
|
20
|
+
} from '@hydranium/protocol';
|
|
21
|
+
import {
|
|
22
|
+
type AstNode,
|
|
23
|
+
type AstNodeDescription,
|
|
24
|
+
type AstNodeLocator,
|
|
25
|
+
AstUtils,
|
|
26
|
+
DefaultScopeProvider,
|
|
27
|
+
type LangiumDocuments,
|
|
28
|
+
MapScope,
|
|
29
|
+
type ReferenceInfo,
|
|
30
|
+
type Scope,
|
|
31
|
+
type ScopeOptions,
|
|
32
|
+
StreamScope,
|
|
33
|
+
type URI,
|
|
34
|
+
UriUtils,
|
|
35
|
+
WorkspaceCache,
|
|
36
|
+
stream
|
|
37
|
+
} from '@hydranium/langium';
|
|
38
|
+
import { type LogNameOptions } from '../diagnostics/logger.js';
|
|
39
|
+
import { type HydraniumLanguageServices } from '../language-module.js';
|
|
40
|
+
import { type NameProvider } from '../naming/name-provider.js';
|
|
41
|
+
import { type ScopeExtensionService } from './scope-extension-service.js';
|
|
42
|
+
import { isTieredDescription } from './scoped-ast-node-description.js';
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Construction-time options for {@link HydraniumScopeProvider}. Extends
|
|
46
|
+
* {@link LogNameOptions} so the standard `logName?` field
|
|
47
|
+
* carries through.
|
|
48
|
+
*/
|
|
49
|
+
export interface HydraniumScopeProviderOptions extends LogNameOptions {
|
|
50
|
+
/**
|
|
51
|
+
* When `true`, own-project `'public'`-tier descriptions are visible
|
|
52
|
+
* from within their owning project's resolution scope — i.e. the
|
|
53
|
+
* own-project canonical filter is relaxed for public-tier descriptions
|
|
54
|
+
* whose `projectId` matches the source's project.
|
|
55
|
+
*
|
|
56
|
+
* Adopters that use the project-qualified name as a reference form
|
|
57
|
+
* within their own project enable this. Default `false` matches the
|
|
58
|
+
* strict multi-tier emission pattern where the project-tier short name
|
|
59
|
+
* is the canonical reference within the owning project.
|
|
60
|
+
*
|
|
61
|
+
* This affects the **resolution** scope only. The completion pipeline's
|
|
62
|
+
* canonical filter (see `DefaultReferenceCandidateProvider` and
|
|
63
|
+
* `HydraniumCompletionProvider`) independently collapses tier-siblings
|
|
64
|
+
* to the canonical tier, so a user still sees one entry per node in
|
|
65
|
+
* dropdowns even when this option is `true`.
|
|
66
|
+
*/
|
|
67
|
+
readonly includeOwnProjectPublic?: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Per-query context shared across the three sub-scope factory hooks of
|
|
72
|
+
* {@link HydraniumScopeProvider}. Built once per scope build by
|
|
73
|
+
* {@link HydraniumScopeProvider.makeScopeContext}, which walks the global
|
|
74
|
+
* scope exactly once and partitions it into per-tier buckets via
|
|
75
|
+
* {@link HydraniumScopeProvider.bucketFor}. The sub-scope hooks wrap their
|
|
76
|
+
* bucket (or re-read {@link descriptions} to widen) without re-walking
|
|
77
|
+
* the index.
|
|
78
|
+
*/
|
|
79
|
+
export interface ScopeContext {
|
|
80
|
+
/** Owning project id of the source URI. */
|
|
81
|
+
readonly sourceProjectId: string;
|
|
82
|
+
/** Visibility closure of {@link sourceProjectId} (includes itself). */
|
|
83
|
+
readonly visibleProjectIds: ReadonlySet<string>;
|
|
84
|
+
/** Materialised global-scope descriptions for the queried reference type. */
|
|
85
|
+
readonly descriptions: readonly AstNodeDescription[];
|
|
86
|
+
/** Descriptions routed to the own-project tier (single-pass partition). */
|
|
87
|
+
readonly ownProjectEntries: readonly AstNodeDescription[];
|
|
88
|
+
/** Descriptions routed to the dependency-projects tier. */
|
|
89
|
+
readonly dependencyEntries: readonly AstNodeDescription[];
|
|
90
|
+
/** Descriptions routed to the universal tier. */
|
|
91
|
+
readonly universalEntries: readonly AstNodeDescription[];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Per-language scope provider that owns the full scope chain in ONE
|
|
96
|
+
* class. Bridges the protocol-layer {@link ReferenceContext} to
|
|
97
|
+
* Langium's {@link ReferenceInfo}, layers per-context scope-extension
|
|
98
|
+
* contributions ({@link ScopeExtensionService}) at their declared tier,
|
|
99
|
+
* and composes the cached project-tier chain (own-project → dependency
|
|
100
|
+
* → universal) on top of Langium's unfiltered global index.
|
|
101
|
+
*
|
|
102
|
+
* ## Scope chain (high → low, inner shadows outer)
|
|
103
|
+
*
|
|
104
|
+
* ```
|
|
105
|
+
* document-local (Langium precomputed) [DefaultScopeProvider.getScope]
|
|
106
|
+
* extension:local [layerLocalExtension, per-context]
|
|
107
|
+
* own-project → dependency → universal-index [createGlobalScope default, CACHED per ${project}::${refType}]
|
|
108
|
+
* extension:universal [layerUniversalExtension, per-context, outermost]
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* Implementation: Langium's `getScope` layers document-local on top of
|
|
112
|
+
* whatever `getGlobalScope` returns. The framework owns `getGlobalScope`
|
|
113
|
+
* and uses it to assemble everything *below* document-local, with the
|
|
114
|
+
* adopter-overridable {@link createGlobalScope} in the middle.
|
|
115
|
+
*
|
|
116
|
+
* ## Adopter override surface
|
|
117
|
+
*
|
|
118
|
+
* - **{@link createGlobalScope}** — the SINGLE level adopters override
|
|
119
|
+
* to change the per-context global/project scope. Because extension
|
|
120
|
+
* layering lives in framework-owned `getGlobalScope` outside
|
|
121
|
+
* `createGlobalScope`, an adopter's bypass cannot hide the extension
|
|
122
|
+
* layers.
|
|
123
|
+
* - Tier-walk hooks ({@link makeScopeContext}, {@link bucketFor},
|
|
124
|
+
* {@link createOwnProjectScope}, {@link createDependencyScope},
|
|
125
|
+
* {@link createUniversalScope}, {@link chainScopes},
|
|
126
|
+
* {@link getProjectIdForDescription}) — override an individual tier
|
|
127
|
+
* without re-implementing the whole project-tier walk.
|
|
128
|
+
* - Source-resolution hooks ({@link resolveSyntheticSource},
|
|
129
|
+
* {@link resolveRootElement}, {@link resolveElementByName}) — override
|
|
130
|
+
* individual cases of the `ReferenceSource` switch.
|
|
131
|
+
* - **{@link createScopeForNodes}** — inherited from Langium and re-keyed by
|
|
132
|
+
* the framework to bare own-names, so it is the helper a `getScope`
|
|
133
|
+
* override uses to resolve a dotted member reference against a container
|
|
134
|
+
* the reference chain cannot reach.
|
|
135
|
+
*
|
|
136
|
+
* **Do NOT override `getGlobalScope` itself** — that is the framework's
|
|
137
|
+
* extension-assembly seam. Overriding it would hide the scope-extension
|
|
138
|
+
* layers behind your override.
|
|
139
|
+
*
|
|
140
|
+
* **Owns scope construction and reference resolution.** The complementary
|
|
141
|
+
* candidate-side pipeline (filter / sort / dedupe / build wire DTO) lives
|
|
142
|
+
* on `ReferenceCandidateProvider` in the sibling
|
|
143
|
+
* `reference-candidate-provider.ts` module.
|
|
144
|
+
*/
|
|
145
|
+
export class HydraniumScopeProvider extends DefaultScopeProvider {
|
|
146
|
+
protected readonly langiumDocuments: LangiumDocuments;
|
|
147
|
+
protected readonly astNodeLocator: AstNodeLocator;
|
|
148
|
+
protected readonly scopeExtensionService: ScopeExtensionService;
|
|
149
|
+
protected readonly options: HydraniumScopeProviderOptions;
|
|
150
|
+
/**
|
|
151
|
+
* Cache keyed by `${sourceProjectId}::${referenceType}`. Result is
|
|
152
|
+
* the chained `project → public → universal` scope built from one
|
|
153
|
+
* single-pass partition over the global index. Evicted by
|
|
154
|
+
* Langium's `DocumentBuilder.onUpdate` (the `WorkspaceCache` default)
|
|
155
|
+
* so any index change rebuilds.
|
|
156
|
+
*
|
|
157
|
+
* Per-language by design — the cache key already includes `refType`,
|
|
158
|
+
* which is language-specific, so nothing is shared across languages
|
|
159
|
+
* even though the `WorkspaceCache(services.shared)` instance evicts on
|
|
160
|
+
* the workspace-global `DocumentBuilder.onUpdate`.
|
|
161
|
+
*/
|
|
162
|
+
protected readonly scopeCache: WorkspaceCache<string, Scope>;
|
|
163
|
+
protected readonly tracer: Tracer;
|
|
164
|
+
/**
|
|
165
|
+
* Narrows the inherited Langium {@link NameProvider} field to the framework's
|
|
166
|
+
* {@link NameProvider} so call sites read `this.nameProvider.nameSeparator`
|
|
167
|
+
* without a per-callsite cast. Bound by the framework's
|
|
168
|
+
* `createServerLanguageModule` to a `DefaultNameProvider` subclass instance.
|
|
169
|
+
*/
|
|
170
|
+
declare protected readonly nameProvider: NameProvider;
|
|
171
|
+
|
|
172
|
+
constructor(
|
|
173
|
+
protected readonly services: HydraniumLanguageServices,
|
|
174
|
+
options: HydraniumScopeProviderOptions = {}
|
|
175
|
+
) {
|
|
176
|
+
super(services);
|
|
177
|
+
this.langiumDocuments = services.shared.workspace.LangiumDocuments;
|
|
178
|
+
this.astNodeLocator = services.workspace.AstNodeLocator;
|
|
179
|
+
this.scopeExtensionService = services.references.ScopeExtensionService;
|
|
180
|
+
this.options = options;
|
|
181
|
+
this.scopeCache = new WorkspaceCache(services.shared);
|
|
182
|
+
this.tracer = services.shared.Tracer.for(options.logName ?? 'ScopeProvider').trace('instantiated');
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Framework-owned assembly seam. **Adopters do NOT override this** —
|
|
187
|
+
* override {@link createGlobalScope} instead. This method layers the
|
|
188
|
+
* scope-extension tiers around the adopter-overridable global scope.
|
|
189
|
+
*
|
|
190
|
+
* Langium's `DefaultScopeProvider.getScope` then layers document-local
|
|
191
|
+
* on top of this result, yielding the full chain documented on the
|
|
192
|
+
* class.
|
|
193
|
+
*/
|
|
194
|
+
protected override getGlobalScope(referenceType: string, context: ReferenceInfo): Scope {
|
|
195
|
+
const projectChain = this.createGlobalScope(referenceType, context);
|
|
196
|
+
const withUniversal = this.layerUniversalExtension(referenceType, context, projectChain);
|
|
197
|
+
return this.layerLocalExtension(referenceType, context, withUniversal);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* The SINGLE adopter-overridable level of the project/global scope.
|
|
202
|
+
* Adopters override to change the per-context global scope for
|
|
203
|
+
* specific reference contexts — e.g. return `EMPTY_SCOPE` to suppress
|
|
204
|
+
* the global scope entirely (so only document-local + extension:local
|
|
205
|
+
* remain), or return a raw unfiltered scope to bypass the project-tier
|
|
206
|
+
* filter for specific reference types.
|
|
207
|
+
*
|
|
208
|
+
* Default: builds the cached project-tier chain (own-project →
|
|
209
|
+
* dependency → universal) on top of Langium's unfiltered global index,
|
|
210
|
+
* keyed `${sourceProjectId}::${refType}` and evicted on workspace
|
|
211
|
+
* update. Returns the input scope unchanged when:
|
|
212
|
+
* - The source URI has no owning project (URIs outside any registered
|
|
213
|
+
* project folder).
|
|
214
|
+
* - `ProjectManager.isSingleProject` reports `true` — the project
|
|
215
|
+
* filter would be a no-op in a single-project workspace (the
|
|
216
|
+
* synthetic workspace project owns everything, every tier is the
|
|
217
|
+
* source's own tier).
|
|
218
|
+
*
|
|
219
|
+
* Adopters bypassing the tier filter should call
|
|
220
|
+
* {@link getAllElementsGlobalScope} to obtain the complete global
|
|
221
|
+
* scope (every element of the requested type, regardless of tier
|
|
222
|
+
* visibility), or `super.getGlobalScope` directly when even the
|
|
223
|
+
* helper is too much indirection.
|
|
224
|
+
*/
|
|
225
|
+
protected createGlobalScope(referenceType: string, context: ReferenceInfo): Scope {
|
|
226
|
+
const langiumGlobal = super.getGlobalScope(referenceType, context);
|
|
227
|
+
const sourceUri = AstUtils.getDocument(context.container).uri;
|
|
228
|
+
return this.getProjectScope(sourceUri, langiumGlobal, referenceType);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Layer scope-extension `local`-tier descriptions on top of `inner`.
|
|
233
|
+
* Returns `inner` unchanged when no extension contributes for the
|
|
234
|
+
* reference type (zero-cost common path).
|
|
235
|
+
*/
|
|
236
|
+
protected layerLocalExtension(referenceType: string, context: ReferenceInfo, inner: Scope): Scope {
|
|
237
|
+
return this.scopeExtensionService.getLocalExtensionScope(referenceType, context.container, inner);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Layer scope-extension `universal`-tier descriptions BELOW `inner`
|
|
242
|
+
* (extensions appear last in the chain, shadowed by inner). Returns
|
|
243
|
+
* `inner` unchanged when no extension contributes for the reference
|
|
244
|
+
* type.
|
|
245
|
+
*/
|
|
246
|
+
protected layerUniversalExtension(referenceType: string, context: ReferenceInfo, inner: Scope): Scope {
|
|
247
|
+
return this.scopeExtensionService.getUniversalExtensionScope(referenceType, context.container, inner);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Project-tier scope filter. Given a source URI and a global scope,
|
|
252
|
+
* returns the subset of descriptions whose owning project is visible
|
|
253
|
+
* from the URI's owning project — the project-dependency visibility
|
|
254
|
+
* model. Cached per `${sourceProjectId}::${referenceType}`.
|
|
255
|
+
*
|
|
256
|
+
* `referenceType` is part of the cache key — separate scopes per
|
|
257
|
+
* cross-reference type so name collisions across types don't shadow
|
|
258
|
+
* each other in the chain.
|
|
259
|
+
*
|
|
260
|
+
* Public for adopter consumption: code outside the scope chain that
|
|
261
|
+
* wants to apply the same project-tier filter to a custom scope (e.g.
|
|
262
|
+
* a candidate provider's introspection mode) calls this method.
|
|
263
|
+
*/
|
|
264
|
+
getProjectScope(sourceUri: URI, globalScope: Scope, referenceType: string): Scope {
|
|
265
|
+
const projectManager = this.services.shared.workspace.ProjectManager;
|
|
266
|
+
const sourceProjectId = projectManager.getProject(sourceUri)?.id;
|
|
267
|
+
if (!sourceProjectId) {
|
|
268
|
+
return globalScope;
|
|
269
|
+
}
|
|
270
|
+
if (projectManager.isSingleProject()) {
|
|
271
|
+
return globalScope;
|
|
272
|
+
}
|
|
273
|
+
const cacheKey = `${sourceProjectId}::${referenceType}`;
|
|
274
|
+
return this.scopeCache.get(cacheKey, () => this.buildProjectScope(sourceProjectId, globalScope));
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* The complete global scope — every element of the requested
|
|
279
|
+
* reference type that the workspace knows about, with no tier
|
|
280
|
+
* filtering and no extension-layer composition. Use from inside a
|
|
281
|
+
* {@link createGlobalScope} override when a specific context needs
|
|
282
|
+
* to bypass the framework's project-tier visibility filter (e.g.
|
|
283
|
+
* a self-referential cross-reference that must see all candidate
|
|
284
|
+
* projects, including those outside the source's visibility
|
|
285
|
+
* closure).
|
|
286
|
+
*
|
|
287
|
+
* Contrast {@link getGlobalScope}, which applies the framework's
|
|
288
|
+
* tier filter to this set, and `getScope` (Langium default), which
|
|
289
|
+
* additionally merges in the local scope.
|
|
290
|
+
*/
|
|
291
|
+
protected getAllElementsGlobalScope(referenceType: string, context: ReferenceInfo): Scope {
|
|
292
|
+
return super.getGlobalScope(referenceType, context);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Build the chained project scope from three tier sub-scopes. The
|
|
297
|
+
* single scope walk happens once in {@link makeScopeContext}; the
|
|
298
|
+
* sub-scope hooks classify the materialised array via {@link bucketFor}
|
|
299
|
+
* (cheap in-memory filtering, no extra scope/index walk). Chained
|
|
300
|
+
* inner-first so a more specific tier shadows a less specific one of
|
|
301
|
+
* the same name: own-project → dependency-projects → universal.
|
|
302
|
+
*/
|
|
303
|
+
protected buildProjectScope(sourceProjectId: string, globalScope: Scope): Scope {
|
|
304
|
+
const context = this.makeScopeContext(sourceProjectId, globalScope);
|
|
305
|
+
const ownScope = this.createOwnProjectScope(context);
|
|
306
|
+
const dependencyScope = this.createDependencyScope(context);
|
|
307
|
+
const universalScope = this.createUniversalScope(context);
|
|
308
|
+
return this.chainScopes(ownScope, dependencyScope, universalScope);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Build the per-query {@link ScopeContext}. Walks `globalScope` exactly
|
|
313
|
+
* once (the one scope walk per cache miss) and partitions it into
|
|
314
|
+
* per-tier buckets via a single pass over {@link bucketFor}, so the
|
|
315
|
+
* untagged URI-lookup fallback runs at most once per description.
|
|
316
|
+
*/
|
|
317
|
+
protected makeScopeContext(sourceProjectId: string, globalScope: Scope): ScopeContext {
|
|
318
|
+
const visibleProjectIds = new Set(this.services.shared.workspace.ProjectManager.getVisibleProjects(sourceProjectId));
|
|
319
|
+
const descriptions = globalScope.getAllElements().toArray();
|
|
320
|
+
const ownProjectEntries: AstNodeDescription[] = [];
|
|
321
|
+
const dependencyEntries: AstNodeDescription[] = [];
|
|
322
|
+
const universalEntries: AstNodeDescription[] = [];
|
|
323
|
+
for (const description of descriptions) {
|
|
324
|
+
switch (this.bucketFor(description, sourceProjectId, visibleProjectIds)) {
|
|
325
|
+
case 'project':
|
|
326
|
+
ownProjectEntries.push(description);
|
|
327
|
+
break;
|
|
328
|
+
case 'public':
|
|
329
|
+
dependencyEntries.push(description);
|
|
330
|
+
break;
|
|
331
|
+
case 'universal':
|
|
332
|
+
universalEntries.push(description);
|
|
333
|
+
break;
|
|
334
|
+
case 'hidden':
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return { sourceProjectId, visibleProjectIds, descriptions, ownProjectEntries, dependencyEntries, universalEntries };
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Own-project sub-scope — descriptions in the source's own project.
|
|
343
|
+
* Includes own-project `'public'`-tier descriptions when
|
|
344
|
+
* {@link HydraniumScopeProviderOptions.includeOwnProjectPublic} is set
|
|
345
|
+
* (routed to the own-project bucket by {@link bucketFor}). Returns a
|
|
346
|
+
* {@link StreamScope} (not {@link MapScope}) so same-name siblings are
|
|
347
|
+
* preserved rather than collapsed.
|
|
348
|
+
*/
|
|
349
|
+
protected createOwnProjectScope(context: ScopeContext): Scope {
|
|
350
|
+
return new StreamScope(stream(context.ownProjectEntries));
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Dependency-projects sub-scope — `'public'`-tier descriptions whose
|
|
355
|
+
* owning project is reachable through the source's dependency closure
|
|
356
|
+
* (own-project canonical filter applied by {@link bucketFor}).
|
|
357
|
+
*/
|
|
358
|
+
protected createDependencyScope(context: ScopeContext): Scope {
|
|
359
|
+
return new StreamScope(stream(context.dependencyEntries));
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Universal sub-scope — descriptions with no project association,
|
|
364
|
+
* visible everywhere unconditionally.
|
|
365
|
+
*/
|
|
366
|
+
protected createUniversalScope(context: ScopeContext): Scope {
|
|
367
|
+
return new MapScope(context.universalEntries);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Chain three tier sub-scopes inner-first. The `outerScope` argument
|
|
372
|
+
* of {@link StreamScope} is consulted only when the inner stream has
|
|
373
|
+
* no match, so a more specific tier shadows a less specific one of
|
|
374
|
+
* the same name.
|
|
375
|
+
*/
|
|
376
|
+
protected chainScopes(ownScope: Scope, dependencyScope: Scope, universalScope: Scope): Scope {
|
|
377
|
+
return new StreamScope(ownScope.getAllElements(), new StreamScope(dependencyScope.getAllElements(), universalScope));
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Classify a description into one of three sub-scope buckets, or
|
|
382
|
+
* `'hidden'` when it should not appear in the project-scope chain.
|
|
383
|
+
*
|
|
384
|
+
* Typed path (description carries `tier`):
|
|
385
|
+
* - `'local'` → hidden (defensive — locals belong to per-document map)
|
|
386
|
+
* - `'project'` → `'project'` iff `projectId === sourceProjectId`,
|
|
387
|
+
* else hidden (equality check)
|
|
388
|
+
* - `'public'` → `'public'` iff `projectId !== sourceProjectId` AND
|
|
389
|
+
* `projectId` in source's visibility closure; own-project public is
|
|
390
|
+
* routed to `'project'` when
|
|
391
|
+
* {@link HydraniumScopeProviderOptions.includeOwnProjectPublic} is
|
|
392
|
+
* set, else hidden (own-project canonical filter + closure
|
|
393
|
+
* membership)
|
|
394
|
+
* - `'universal'` → `'universal'` unconditionally
|
|
395
|
+
*
|
|
396
|
+
* Untagged path (no `tier` field) — preserved for backward-compat with
|
|
397
|
+
* third-party Langium services emitting plain descriptions: URI →
|
|
398
|
+
* project lookup via {@link getProjectIdForDescription}, then the same
|
|
399
|
+
* bucketing rule.
|
|
400
|
+
*/
|
|
401
|
+
protected bucketFor(
|
|
402
|
+
description: AstNodeDescription,
|
|
403
|
+
sourceProjectId: string,
|
|
404
|
+
visibleProjectIds: ReadonlySet<string>
|
|
405
|
+
): 'project' | 'public' | 'universal' | 'hidden' {
|
|
406
|
+
if (isTieredDescription(description)) {
|
|
407
|
+
switch (description.tier) {
|
|
408
|
+
case 'local':
|
|
409
|
+
return 'hidden';
|
|
410
|
+
case 'project':
|
|
411
|
+
return description.projectId === sourceProjectId ? 'project' : 'hidden';
|
|
412
|
+
case 'public':
|
|
413
|
+
if (description.projectId === sourceProjectId) {
|
|
414
|
+
return this.options.includeOwnProjectPublic ? 'project' : 'hidden';
|
|
415
|
+
}
|
|
416
|
+
return description.projectId !== undefined && visibleProjectIds.has(description.projectId) ? 'public' : 'hidden';
|
|
417
|
+
case 'universal':
|
|
418
|
+
return 'universal';
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
const projectId = this.getProjectIdForDescription(description);
|
|
422
|
+
if (projectId === undefined) {
|
|
423
|
+
return 'universal';
|
|
424
|
+
}
|
|
425
|
+
if (projectId === sourceProjectId) {
|
|
426
|
+
return 'project';
|
|
427
|
+
}
|
|
428
|
+
if (visibleProjectIds.has(projectId)) {
|
|
429
|
+
return 'public';
|
|
430
|
+
}
|
|
431
|
+
return 'hidden';
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Map a description to its owning project's id. Default: look up via
|
|
436
|
+
* `ProjectManager.getProject(description.documentUri)`. A pure fallback
|
|
437
|
+
* path — consulted only for descriptions carrying no `tier` field.
|
|
438
|
+
*/
|
|
439
|
+
protected getProjectIdForDescription(description: AstNodeDescription): string | undefined {
|
|
440
|
+
return this.services.shared.workspace.ProjectManager.getProject(description.documentUri)?.id;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Keys the scope by {@link NameProvider.getOwnName} instead of Langium's
|
|
445
|
+
* `getName`. Same correction `HydraniumScopeComputation.addLocalSymbol`
|
|
446
|
+
* makes to the local-symbols pass, for the same reason: `getName` defaults
|
|
447
|
+
* to the project-qualified form here, so the base would key a member scope
|
|
448
|
+
* by the fully qualified `Container.member` while the reference text after
|
|
449
|
+
* the dot is the bare `member` — and nothing reports the mismatch, because
|
|
450
|
+
* the scope is non-empty and only the lookup misses.
|
|
451
|
+
*
|
|
452
|
+
* Callers building a member scope should leave `outerScope` unset: a
|
|
453
|
+
* reference to a member the container does not have must fail rather than
|
|
454
|
+
* fall through to a same-named member on an unrelated type.
|
|
455
|
+
*/
|
|
456
|
+
protected override createScopeForNodes(elements: Iterable<AstNode>, outerScope?: Scope, options?: ScopeOptions): Scope {
|
|
457
|
+
const descriptions = stream(elements)
|
|
458
|
+
.map(node => {
|
|
459
|
+
const name = this.nameProvider.getOwnName(node);
|
|
460
|
+
// The framework's description provider stamps `tier: 'local'`, which
|
|
461
|
+
// is correct here — these are constructed, never indexed.
|
|
462
|
+
return name ? this.descriptions.createDescription(node, name, AstUtils.getDocument(node)) : undefined;
|
|
463
|
+
})
|
|
464
|
+
.nonNullable();
|
|
465
|
+
return new StreamScope(descriptions, outerScope, options);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Convert a protocol-layer {@link ReferenceContext} into a Langium
|
|
470
|
+
* {@link ReferenceInfo} the rest of the scope/linking machinery accepts.
|
|
471
|
+
*
|
|
472
|
+
* Walks `syntheticPath` by FABRICATING a type-only stub per step, so a
|
|
473
|
+
* scope can be queried for an element that does not exist yet — which is
|
|
474
|
+
* what synthetic paths are for. The stubs carry no children, so a caller
|
|
475
|
+
* that needs to read a collection off the leaf wants
|
|
476
|
+
* {@link resolveReferenceSource} instead, which walks the same path into
|
|
477
|
+
* the real tree.
|
|
478
|
+
*
|
|
479
|
+
* Throws if the context references an unresolvable source; callers
|
|
480
|
+
* that prefer a soft failure should catch and fall back to
|
|
481
|
+
* `EMPTY_SCOPE`.
|
|
482
|
+
*/
|
|
483
|
+
referenceContextToInfo(ctx: ReferenceContext): ReferenceInfo {
|
|
484
|
+
let container = this.resolveReferenceSource(ctx.source);
|
|
485
|
+
if (!container) {
|
|
486
|
+
throw new Error('Invalid reference source');
|
|
487
|
+
}
|
|
488
|
+
for (const step of ctx.syntheticPath ?? []) {
|
|
489
|
+
container = {
|
|
490
|
+
$container: container,
|
|
491
|
+
$containerProperty: step.containerProperty,
|
|
492
|
+
// Part of Langium's own container contract, so a stub that omits it
|
|
493
|
+
// is an under-specified node: anything reading position off the
|
|
494
|
+
// chain (a key provider, an adopter scope extension) sees
|
|
495
|
+
// `undefined` where the caller named a slot.
|
|
496
|
+
$containerIndex: step.index,
|
|
497
|
+
$type: step.type
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
return {
|
|
501
|
+
reference: { $refText: '', ref: undefined },
|
|
502
|
+
container,
|
|
503
|
+
property: ctx.property
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Resolve a protocol-layer {@link ReferenceRequest} via the scope built for
|
|
509
|
+
* its context. Returns `undefined` if the scope has no matching element or
|
|
510
|
+
* if the description can't be resolved to a node.
|
|
511
|
+
*/
|
|
512
|
+
resolveReference(reference: ReferenceRequest): AstNode | undefined {
|
|
513
|
+
try {
|
|
514
|
+
const referenceInfo = this.referenceContextToInfo(reference);
|
|
515
|
+
const description = this.getScope(referenceInfo).getElement(reference.value);
|
|
516
|
+
if (!description) {
|
|
517
|
+
return undefined;
|
|
518
|
+
}
|
|
519
|
+
if (description.node) {
|
|
520
|
+
return description.node;
|
|
521
|
+
}
|
|
522
|
+
const document = this.langiumDocuments.getDocument(description.documentUri);
|
|
523
|
+
if (!document) {
|
|
524
|
+
return undefined;
|
|
525
|
+
}
|
|
526
|
+
return this.astNodeLocator.getAstNode(document.parseResult.value, description.path);
|
|
527
|
+
} catch {
|
|
528
|
+
return undefined;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Resolve the SOURCE side of a reference — the element a query is asked
|
|
534
|
+
* *from* — to a real node. Given a bare {@link ReferenceSource} it resolves
|
|
535
|
+
* the anchor; given a whole {@link ReferenceContext} it continues along
|
|
536
|
+
* `syntheticPath`, descending into the anchor's real children, and answers
|
|
537
|
+
* the leaf.
|
|
538
|
+
*
|
|
539
|
+
* The counterpart to {@link resolveReference}, which resolves the other end:
|
|
540
|
+
* that one answers what a reference POINTS AT, this one what the reference
|
|
541
|
+
* is written ON. Distinct again from {@link referenceContextToInfo}, which
|
|
542
|
+
* walks the same path but FABRICATES a type-only stub per step — the right
|
|
543
|
+
* shape for a scope query, the wrong one for reading a collection off the
|
|
544
|
+
* leaf, because a fabricated node has no children.
|
|
545
|
+
*
|
|
546
|
+
* A step addressing an array slot must carry `index`; without one the walk
|
|
547
|
+
* stops rather than descending into the array itself, since an array is not
|
|
548
|
+
* an `AstNode` and continuing would fail later somewhere unrelated. A step's
|
|
549
|
+
* `type` is NOT verified against the child that was found — it names what
|
|
550
|
+
* the caller expects, and narrowing on it would reject trees a permissive
|
|
551
|
+
* adopter grammar allows.
|
|
552
|
+
*
|
|
553
|
+
* Answers `undefined` as soon as any step is missing.
|
|
554
|
+
*/
|
|
555
|
+
resolveReferenceSource(source: ReferenceSource | ReferenceContext): AstNode | undefined {
|
|
556
|
+
if (isReferenceContext(source)) {
|
|
557
|
+
return this.resolveContextLeaf(source);
|
|
558
|
+
}
|
|
559
|
+
if (isSyntheticSource(source)) {
|
|
560
|
+
return this.resolveSyntheticSource(source);
|
|
561
|
+
}
|
|
562
|
+
if (isDocumentSource(source)) {
|
|
563
|
+
return this.resolveRootElement(UriUtils.toUri(source.uri));
|
|
564
|
+
}
|
|
565
|
+
if (isElementSource(source)) {
|
|
566
|
+
return this.resolveElementByName(source.name, source.type);
|
|
567
|
+
}
|
|
568
|
+
return undefined;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/** Walk `syntheticPath` from the resolved anchor into real children. */
|
|
572
|
+
protected resolveContextLeaf(ctx: ReferenceContext): AstNode | undefined {
|
|
573
|
+
let node = this.resolveReferenceSource(ctx.source);
|
|
574
|
+
for (const step of ctx.syntheticPath ?? []) {
|
|
575
|
+
if (!node) {
|
|
576
|
+
return undefined;
|
|
577
|
+
}
|
|
578
|
+
const slot: unknown = (node as unknown as Record<string, unknown>)[step.containerProperty];
|
|
579
|
+
node = Array.isArray(slot)
|
|
580
|
+
? step.index === undefined
|
|
581
|
+
? undefined
|
|
582
|
+
: (slot[step.index] as AstNode | undefined)
|
|
583
|
+
: (slot as AstNode | undefined);
|
|
584
|
+
}
|
|
585
|
+
return node ?? undefined;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Build a transient AST-node stub for a {@link SyntheticSource} request.
|
|
590
|
+
* Default: looks up the document via `LangiumDocuments` and uses its parse
|
|
591
|
+
* root as the container; returns `undefined` if the document isn't loaded.
|
|
592
|
+
* Consumers that need to materialise an empty document on demand (e.g.
|
|
593
|
+
* to query the scope before a file exists) override this.
|
|
594
|
+
*/
|
|
595
|
+
protected resolveSyntheticSource(source: SyntheticSource): AstNode | undefined {
|
|
596
|
+
const document = this.langiumDocuments.getDocument(UriUtils.toUri(source.uri));
|
|
597
|
+
if (!document) {
|
|
598
|
+
return undefined;
|
|
599
|
+
}
|
|
600
|
+
return { $type: source.type, $container: document.parseResult.value };
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Resolve the semantic root node of the document at `uri`. Default: looks
|
|
605
|
+
* up the document via `LangiumDocuments` and returns its parse-result root.
|
|
606
|
+
* Consumers with a custom "semantic root" notion (i.e. an inner element
|
|
607
|
+
* that is the meaningful root inside a wrapper grammar) override this.
|
|
608
|
+
*/
|
|
609
|
+
protected resolveRootElement(uri: URI): AstNode | undefined {
|
|
610
|
+
return this.langiumDocuments.getDocument(uri)?.parseResult.value;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Resolve a node by **name**, given an optional reference type for
|
|
615
|
+
* disambiguation.
|
|
616
|
+
*
|
|
617
|
+
* The contract on `name`:
|
|
618
|
+
*
|
|
619
|
+
* - It is a **qualified name** — the form a source-text writer would type,
|
|
620
|
+
* normally `NameProvider.getProjectQualifiedName`. Not a bare own-name,
|
|
621
|
+
* unless the adopter's naming scheme makes the two coincide.
|
|
622
|
+
* - It is **not rename-stable.** Renaming the element changes its name and
|
|
623
|
+
* therefore this address. Callers holding an address across an edit must
|
|
624
|
+
* re-derive it.
|
|
625
|
+
* - It is **distinct from the element key.** `ElementKeyProvider` produces a
|
|
626
|
+
* handle that round-trips to a node *within one document* (used for GModel
|
|
627
|
+
* ids and UI selection); this resolves a name against the whole workspace.
|
|
628
|
+
* Neither substitutes for the other, and there is no framework identifier
|
|
629
|
+
* that is both workspace-wide and rename-stable.
|
|
630
|
+
*
|
|
631
|
+
* Base implementation returns `undefined` — the framework does not decide
|
|
632
|
+
* which qualification level an adopter's names carry. Adopters override,
|
|
633
|
+
* typically by delegating to
|
|
634
|
+
* `HydraniumIndexManager.resolveElementByName`, which resolves against
|
|
635
|
+
* the `elementsByName` index that `HydraniumScopeComputation` populates.
|
|
636
|
+
*/
|
|
637
|
+
protected resolveElementByName(_name: string, _type?: string): AstNode | undefined {
|
|
638
|
+
return undefined;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Sort key for the candidate provider's
|
|
643
|
+
* `ReferenceCandidateProvider.getCandidateScope` pipeline. Default
|
|
644
|
+
* prefixes the qualified-name segment count so local (bare-name)
|
|
645
|
+
* entries surface before nested (`a.b.c`) entries, then sorts
|
|
646
|
+
* lexicographically. Adopters whose name provider uses a non-default
|
|
647
|
+
* separator inherit the default behaviour; adopters wanting a
|
|
648
|
+
* different rank override.
|
|
649
|
+
*
|
|
650
|
+
* Public because the LSP `CompletionProvider` reads the same sort key
|
|
651
|
+
* directly when assembling completion items, and the sibling candidate
|
|
652
|
+
* provider in `reference-candidate-provider.ts` reads it during
|
|
653
|
+
* its sort stage. Lives on the scope provider so both callers share
|
|
654
|
+
* one implementation.
|
|
655
|
+
*/
|
|
656
|
+
sortText(description: AstNodeDescription): string {
|
|
657
|
+
return description.name.split(this.nameProvider.nameSeparator).length + '_' + description.name;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
|
|
10
|
+
export * from './ast-node-description-provider.js';
|
|
11
|
+
export * from './reference-builder.js';
|
|
12
|
+
export * from './reference-candidate-provider.js';
|
|
13
|
+
export * from './hydranium-scope-computation.js';
|
|
14
|
+
export * from './hydranium-scope-provider.js';
|
|
15
|
+
export * from './scope-extension-contribution.js';
|
|
16
|
+
export * from './scope-extension-service.js';
|
|
17
|
+
export * from './scoped-ast-node-description.js';
|
|
18
|
+
export * from './tier-specificity.js';
|