@@ -8,8 +8,7 @@ import type { AstNode, AstNodeDescription, LangiumDocument, PrecomputedScopes }
88import type { DomainModelServices } from './domain-model-module.js' ;
99import type { QualifiedNameProvider } from './domain-model-naming.js' ;
1010import type { Domainmodel , PackageDeclaration } from './generated/ast.js' ;
11- import { AstUtils , DefaultScopeComputation , interruptAndCheck , MultiMap } from 'langium' ;
12- import { CancellationToken } from 'vscode-jsonrpc' ;
11+ import { AstUtils , Cancellation , DefaultScopeComputation , interruptAndCheck , MultiMap } from 'langium' ;
1312import { isType , isPackageDeclaration } from './generated/ast.js' ;
1413
1514export class DomainModelScopeComputation extends DefaultScopeComputation {
@@ -24,7 +23,7 @@ export class DomainModelScopeComputation extends DefaultScopeComputation {
2423 /**
2524 * Exports only types (`DataType or `Entity`) with their qualified names.
2625 */
27- override async computeExports ( document : LangiumDocument , cancelToken = CancellationToken . None ) : Promise < AstNodeDescription [ ] > {
26+ override async computeExports ( document : LangiumDocument , cancelToken = Cancellation . CancellationToken . None ) : Promise < AstNodeDescription [ ] > {
2827 const descr : AstNodeDescription [ ] = [ ] ;
2928 for ( const modelNode of AstUtils . streamAllContents ( document . parseResult . value ) ) {
3029 await interruptAndCheck ( cancelToken ) ;
@@ -41,14 +40,14 @@ export class DomainModelScopeComputation extends DefaultScopeComputation {
4140 return descr ;
4241 }
4342
44- override async computeLocalScopes ( document : LangiumDocument , cancelToken = CancellationToken . None ) : Promise < PrecomputedScopes > {
43+ override async computeLocalScopes ( document : LangiumDocument , cancelToken = Cancellation . CancellationToken . None ) : Promise < PrecomputedScopes > {
4544 const model = document . parseResult . value as Domainmodel ;
4645 const scopes = new MultiMap < AstNode , AstNodeDescription > ( ) ;
4746 await this . processContainer ( model , scopes , document , cancelToken ) ;
4847 return scopes ;
4948 }
5049
51- protected async processContainer ( container : Domainmodel | PackageDeclaration , scopes : PrecomputedScopes , document : LangiumDocument , cancelToken : CancellationToken ) : Promise < AstNodeDescription [ ] > {
50+ protected async processContainer ( container : Domainmodel | PackageDeclaration , scopes : PrecomputedScopes , document : LangiumDocument , cancelToken : Cancellation . CancellationToken ) : Promise < AstNodeDescription [ ] > {
5251 const localDescriptions : AstNodeDescription [ ] = [ ] ;
5352 for ( const element of container . elements ) {
5453 await interruptAndCheck ( cancelToken ) ;
0 commit comments