Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go to definition for java *.class file (textDocument/definition) #60

Closed
vincentLiuxiang opened this issue Mar 2, 2018 · 2 comments
Closed

Comments

@vincentLiuxiang
Copy link

Hi all,
How could I go to definition for some apis like System.out.println which is defined in jdt://xxxx/rt.jar/java.io/PrintStream.class within monaco-languageclient?

@vincentLiuxiang
Copy link
Author

Could I open a new file (jdt://xxxx/rt.jar/java.io/PrintStream.class) within function provideDefinition?. However provideDefinition was defined inside monaco-languageclient.

        var _this = this;
        return {
            provideDefinition: function (model, position, token) {
                if (!_this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {
                    return undefined;
                }
                var params = _this.m2p.asTextDocumentPositionParams(model, position);
                return provider.provideDefinition(params, token).then(function (result) { 
                    return _this.p2m.asDefinitionResult(result);
                });
            }
        };

@vincentLiuxiang
Copy link
Author

I have solved this problem! microsoft/monaco-editor#291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant