Skip to content

Help with the references in my dsl #1194

Answered by msujew
Anthie123 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @Anthie123,

the scope provider snippet that you provided isn't quite correct. The context.container property contains the owner of the reference. Since the tests reference is on the Testfunction type, the isTest(context.container) check will never return true. I haven't tested it, but something like this should work in that case:

    override getScope(context: ReferenceInfo): Scope {
        if (context.property === 'tests' && isTestfunction(context.container)) {
            const testFunction = context.container;
            // The container of the `Testfunction` type should be a `Test` element
            const testFunctionContainer = testFunction.$container as Test;
            // …

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Anthie123
Comment options

@msujew
Comment options

@Anthie123
Comment options

@snarkipus
Comment options

@Anthie123
Comment options

Answer selected by Anthie123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants