Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Contribute a Java Extension

Fred Bricon edited this pageSep 30, 2020 ·4 revisions

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

Server Bundle

Authoring VSCode Extension

You can follow the tutorialhere to start your own VSCode extension

Modify package.json

Put aserver bundle together with your current VS Code extension (in a./server subfolder, for example), and add the following code snippet to thecontributes 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"],}

Execute command

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:functionsendMyCommandToJavaLanguageServer(arg){returnexecuteJavaLanguageServerCommand("my.java.command",arg);}// This is the VSCode Java command for language server protocol workspace/executeCommand:functionexecuteJavaLanguageServerCommand(...rest){returnvscode.commands.executeCommand("java.execute.workspaceCommand", ...rest);}
Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp