@reqlan/language 1.9.5 → 1.9.7
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/README.md +14 -0
- package/README.template.md +2 -0
- package/out/file-path-rewrite.d.ts +3 -0
- package/out/file-path-rewrite.js +1 -0
- package/out/file-path-rewrite.js.map +1 -1
- package/out/index.d.ts +2 -1
- package/out/index.js +2 -1
- package/out/index.js.map +1 -1
- package/out/reqlan-code-action-provider.d.ts +1 -0
- package/out/reqlan-code-action-provider.js +12 -21
- package/out/reqlan-code-action-provider.js.map +1 -1
- package/out/reqlan-comment-diagnostics.d.ts +11 -0
- package/out/reqlan-comment-diagnostics.js +81 -11
- package/out/reqlan-comment-diagnostics.js.map +1 -1
- package/out/reqlan-comment-rename.d.ts +1 -0
- package/out/reqlan-comment-rename.js.map +1 -1
- package/out/reqlan-document-builder.d.ts +9 -0
- package/out/reqlan-document-builder.js +26 -0
- package/out/reqlan-document-builder.js.map +1 -0
- package/out/reqlan-document-link-provider.d.ts +3 -1
- package/out/reqlan-document-link-provider.js +6 -1
- package/out/reqlan-document-link-provider.js.map +1 -1
- package/out/reqlan-idea-move-imports.d.ts +24 -0
- package/out/reqlan-idea-move-imports.js +309 -0
- package/out/reqlan-idea-move-imports.js.map +1 -0
- package/out/reqlan-idea-refactor.d.ts +15 -4
- package/out/reqlan-idea-refactor.js +106 -14
- package/out/reqlan-idea-refactor.js.map +1 -1
- package/out/reqlan-import-edits.d.ts +1 -0
- package/out/reqlan-import-edits.js +8 -0
- package/out/reqlan-import-edits.js.map +1 -1
- package/out/reqlan-module.js +3 -1
- package/out/reqlan-module.js.map +1 -1
- package/out/reqlan-path-references.js +8 -2
- package/out/reqlan-path-references.js.map +1 -1
- package/out/reqlan-validator.d.ts +5 -0
- package/out/reqlan-validator.js +17 -0
- package/out/reqlan-validator.js.map +1 -1
- package/package.json +1 -1
- package/src/file-path-rewrite.ts +3 -0
- package/src/index.ts +4 -0
- package/src/reqlan-code-action-provider.ts +12 -24
- package/src/reqlan-comment-diagnostics.ts +108 -11
- package/src/reqlan-comment-rename.ts +1 -0
- package/src/reqlan-document-builder.ts +35 -0
- package/src/reqlan-document-link-provider.ts +18 -3
- package/src/reqlan-idea-move-imports.ts +398 -0
- package/src/reqlan-idea-refactor.ts +152 -15
- package/src/reqlan-import-edits.ts +9 -0
- package/src/reqlan-module.ts +3 -1
- package/src/reqlan-path-references.ts +9 -2
- package/src/reqlan-validator.ts +23 -0
package/src/reqlan-validator.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
type AnonymousBlock,
|
|
12
12
|
type Model
|
|
13
13
|
} from './generated/ast.js';
|
|
14
|
+
import { collectCommentReferenceIssues } from './reqlan-comment-diagnostics.js';
|
|
14
15
|
import {
|
|
15
16
|
collectFileLinks,
|
|
16
17
|
fileLinkTargetIssueMessage
|
|
@@ -36,6 +37,8 @@ import {
|
|
|
36
37
|
* rq:["../../../reqlan rq/language/imports.rq".import_error_recovery]
|
|
37
38
|
* rq:["../../../reqlan rq/language/imports.rq".import_tokenisation]
|
|
38
39
|
* rq:["../../../reqlan rq/language/syntax.rq".no_name_idea_safe_warning]
|
|
40
|
+
* rq:["../../../reqlan rq/language/syntax.rq".comment_reference_resolution_error]
|
|
41
|
+
* rq:["../../../reqlan rq/extension/features-non-rq-code-comment/functional-code-comment-references.rq".comment_reference_resolution_error_state]
|
|
39
42
|
*/
|
|
40
43
|
export function registerValidationChecks(services: ReqlanServices) {
|
|
41
44
|
const registry = services.validation.ValidationRegistry;
|
|
@@ -53,6 +56,8 @@ export function registerValidationChecks(services: ReqlanServices) {
|
|
|
53
56
|
* rq:["../../../reqlan rq/language/imports.rq".import_error_recovery]
|
|
54
57
|
* rq:["../../../reqlan rq/language/imports.rq".import_tokenisation]
|
|
55
58
|
* rq:["../../../reqlan rq/language/syntax.rq".no_name_idea_safe_warning]
|
|
59
|
+
* rq:["../../../reqlan rq/language/syntax.rq".comment_reference_resolution_error]
|
|
60
|
+
* rq:["../../../reqlan rq/extension/features-non-rq-code-comment/functional-code-comment-references.rq".comment_reference_resolution_error_state]
|
|
56
61
|
*/
|
|
57
62
|
export class ReqlanValidator {
|
|
58
63
|
|
|
@@ -64,6 +69,7 @@ export class ReqlanValidator {
|
|
|
64
69
|
this.checkImportSyntax(model, accept);
|
|
65
70
|
this.checkImportTargets(model, accept);
|
|
66
71
|
this.checkFileReferenceTargets(model, accept);
|
|
72
|
+
this.checkCommentReferences(model, accept);
|
|
67
73
|
this.checkWildcardReferences(model, accept);
|
|
68
74
|
}
|
|
69
75
|
|
|
@@ -212,6 +218,23 @@ export class ReqlanValidator {
|
|
|
212
218
|
}
|
|
213
219
|
}
|
|
214
220
|
|
|
221
|
+
checkCommentReferences(model: Model, accept: ValidationAcceptor): void {
|
|
222
|
+
const document = AstUtils.getDocument(model);
|
|
223
|
+
const { shared } = this.services;
|
|
224
|
+
for (const issue of collectCommentReferenceIssues(
|
|
225
|
+
document,
|
|
226
|
+
shared.workspace.LangiumDocuments,
|
|
227
|
+
shared.workspace.FileSystemProvider,
|
|
228
|
+
pathResolveContextFromServices(this.services)
|
|
229
|
+
)) {
|
|
230
|
+
accept('error', issue.message, {
|
|
231
|
+
node: model,
|
|
232
|
+
range: issue.range,
|
|
233
|
+
code: issue.code
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
215
238
|
checkWildcardReferences(model: Model, accept: ValidationAcceptor): void {
|
|
216
239
|
const { shared } = this.services;
|
|
217
240
|
const context = pathResolveContextFromServices(this.services);
|