java

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 21 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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.

View Source
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.

View Source
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.

View Source
const ContentScheme = "jdt"

ContentScheme is the scheme of the documents the pack provides, the scheme of the URIs jdtls uses for class files.

View Source
const RequirementJava = "java"

RequirementJava is the id of the requirement of the Java runtime.

Variables

This section is empty.

Functions

func New

func New() extension.Extension

New is the Factory of the pack.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL