A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/redhat-developer/vscode-java/wiki/Contribute-a-Java-Extension below:

Contribute a Java Extension · redhat-developer/vscode-java Wiki · GitHub

You can contribute a VSCode Java Extension to enhance the existing VSCode Java features. Follow these steps to contribute an extension.

Authoring VSCode Extension

You can follow the tutorial here to start your own VSCode extension

Put a server bundle together with your current VS Code extension (in a ./server subfolder, for example), and add the following code snippet to the contributes section of your extension's package.json. Thus, the language server will discover your plugin for later usage.

"contributes": {
    "javaExtensions": ["./server/my.java.plugin.jar"],
}

If you want to communicate with the plugin, add the following code in your extension:

// This should be your command ("my.java.command") corresponding to your server plug-in extension point registration:
function sendMyCommandToJavaLanguageServer(arg) {
    return executeJavaLanguageServerCommand("my.java.command", arg);
}

// This is the VSCode Java command for language server protocol workspace/executeCommand: 
function executeJavaLanguageServerCommand(...rest) {
    return vscode.commands.executeCommand("java.execute.workspaceCommand", ...rest);
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4