Documentation
¶
Overview ¶
Package java is the Java language pack (SPEC §8.1, §10.15, §10.34): Java. The grammar and the language configuration are in assets/, copied by scripts/update-assets.sh; the licenses are in third_party/ and NOTICE. Since step 24b.6 the pack also runs Eclipse JDT LS (jdtls): the server is found, started and shown by extensions/internal/langserver (the path setting java.jdt.ls.path, a jdtls on PATH, the status item, the notification for a missing server), java runs it (java.jdt.ls.java.home, JAVA_HOME or java on PATH, Java 21 or newer) with a workspace of its own in Emetos's cache folder, the settings of vscode-java that change the server are registered and sent to it, the classes of jars and of the JDK open as read-only documents (jdt:// locations, java/classFileContents), the status item follows the server's own notifications (language/status, language/progressReport), a question of the server (language/ actionableNotification) is a notification with buttons, and the commands are Java: Restart Language Server, Clean Java Language Server Workspace, Force Java Compilation, Update Project Configuration and Organize Imports.
Index ¶
Constants ¶
const ( // RestartCommand restarts the language server ("Java: Restart Language Server"; vscode-java's id). RestartCommand = "java.server.restart" // CleanWorkspaceCommand deletes the workspace of the server (its index and the state of its projects) and starts it again. CleanWorkspaceCommand = "java.clean.workspace" // CompileWorkspaceCommand builds the projects again ("Java: Force Java Compilation"); a boolean argument says full (true) or incremental // without asking. CompileWorkspaceCommand = "java.workspace.compile" // UpdateProjectConfigurationCommand reads the build files of the project of the file in front (or of the URI the command is given) again. UpdateProjectConfigurationCommand = "java.projectConfiguration.update" // OrganizeImportsCommand sorts the imports of the file in front and removes the ones nothing uses. OrganizeImportsCommand = "java.action.organizeImports" )
The ids of the commands.
const ( // ID is the id of the extension, and ServerID the id of its language server in the manifest. ID = "emetos.java" ServerID = "jdtls" )
The ids the pack uses.
const ( // PathSetting holds the jdtls folder (the folder that has plugins and config_linux). PathSetting = "java.jdt.ls.path" // JavaHomeSetting is the JDK that runs the server. JavaHomeSetting = "java.jdt.ls.java.home" // VMArgsSetting are the options of the JVM that runs the server. VMArgsSetting = "java.jdt.ls.vmargs" // TraceSetting traces the traffic with the server (the host's; vscode-java's name). TraceSetting = "java.trace.server" // UpdateBuildConfigurationSetting says what happens when a build file changes (disabled, interactive, automatic). UpdateBuildConfigurationSetting = "java.configuration.updateBuildConfiguration" )
The settings that are not options of the server.
const ContentScheme = "jdt"
ContentScheme is the scheme of the documents the pack provides, the scheme of the URIs jdtls uses for class files.
const RequirementJava = "java"
RequirementJava is the id of the requirement of the Java runtime.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.