diff --git a/lib/extension.ts b/lib/extension.ts index 2399f95d..3a16d510 100644 --- a/lib/extension.ts +++ b/lib/extension.ts @@ -4,7 +4,7 @@ import * as Path from "path"; import * as FS from "fs"; import {window, workspace, ExtensionContext, commands, tasks, Task, TaskExecution, ShellExecution, Uri, TaskDefinition, languages, IndentAction, Progress, ProgressLocation, debug, DebugConfiguration, Range, Position, TextDocument, TextDocumentContentProvider, CancellationToken, ProviderResult, ConfigurationChangeEvent} from 'vscode'; -import {LanguageClient, LanguageClientOptions, ServerOptions, NotificationType} from "vscode-languageclient"; +import {LanguageClient, LanguageClientOptions, ServerOptions, NotificationType} from "vscode-languageclient/node"; import {loadStyles, decoration} from './textMate'; import * as AdmZip from 'adm-zip'; @@ -17,7 +17,7 @@ export async function activate(context: ExtensionContext) { // Teach VSCode to open JAR files workspace.registerTextDocumentContentProvider('jar', new JarFileSystemProvider()); - + // Options to control the language client let clientOptions: LanguageClientOptions = { // Register the server for java documents @@ -42,7 +42,7 @@ export async function activate(context: ExtensionContext) { let launcherRelativePath = platformSpecificLangServer(); let launcherPath = [context.extensionPath].concat(launcherRelativePath); let launcher = Path.resolve(...launcherPath); - + // Start the child java process let serverOptions: ServerOptions = { command: launcher, @@ -58,19 +58,20 @@ export async function activate(context: ExtensionContext) { // Create the language client and start the client. let client = new LanguageClient('java', 'Java Language Server', serverOptions, clientOptions); - let disposable = client.start(); - // Push the disposable to the context's subscriptions so that the + // Push the client to the context's subscriptions so that the // client can be deactivated on extension deactivation - context.subscriptions.push(disposable); + context.subscriptions.push(client); + + await client.start(); // Register test commands commands.registerCommand('java.command.test.run', runTest); commands.registerCommand('java.command.test.debug', debugTest); commands.registerCommand('java.command.findReferences', runFindReferences); - // When the language client activates, register a progress-listener - client.onReady().then(() => createProgressListeners(client)); + // Register a progress-listener + createProgressListeners(client); // Apply semantic colors using custom notification function asRange(r: RangeLike) { @@ -119,12 +120,12 @@ export async function activate(context: ExtensionContext) { applySemanticColors() } } - client.onReady().then(() => { - client.onNotification(new NotificationType('java/colors'), cacheSemanticColors); - context.subscriptions.push(window.onDidChangeVisibleTextEditors(applySemanticColors)); - context.subscriptions.push(workspace.onDidCloseTextDocument(forgetSemanticColors)); - context.subscriptions.push(workspace.onDidChangeConfiguration(onChangeConfiguration)) - }); + + client.onNotification(new NotificationType('java/colors'), cacheSemanticColors); + context.subscriptions.push(window.onDidChangeVisibleTextEditors(applySemanticColors)); + context.subscriptions.push(workspace.onDidCloseTextDocument(forgetSemanticColors)); + context.subscriptions.push(workspace.onDidChangeConfiguration(onChangeConfiguration)) + await loadStyles(); applySemanticColors(); } @@ -259,7 +260,7 @@ function templateCommand(command: string[], file: string, className: string, met } interface ProgressMessage { - message: string + message: string increment: number } @@ -268,7 +269,7 @@ function createProgressListeners(client: LanguageClient) { let progressListener = new class { progress: Progress<{message: string, increment?: number}> resolve: (nothing: {}) => void - + startProgress(message: string) { if (this.progress != null) this.endProgress(); @@ -278,11 +279,11 @@ function createProgressListeners(client: LanguageClient) { this.resolve = resolve; })); } - + reportProgress(message: string, increment: number) { if (increment == -1) this.progress.report({message}); - else + else this.progress.report({message, increment}) } @@ -340,10 +341,10 @@ function platformSpecificLangServer(): string[] { // Alternative server options if you want to use visualvm function visualVmConfig(context: ExtensionContext): ServerOptions { let javaExecutablePath = findJavaExecutable('java'); - + if (javaExecutablePath == null) { window.showErrorMessage("Couldn't locate java in $JAVA_HOME or $PATH"); - + throw "Gave up"; } const jars = [ @@ -353,7 +354,7 @@ function visualVmConfig(context: ExtensionContext): ServerOptions { ]; const classpath = jars.map(jar => Path.resolve(context.extensionPath, "dist", "classpath", jar)).join(':'); let args = [ - '-cp', classpath, + '-cp', classpath, '-Xverify:none', // helps VisualVM avoid 'error 62' '-Xdebug', // '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005', @@ -369,9 +370,9 @@ function visualVmConfig(context: ExtensionContext): ServerOptions { // Opens, needed at runtime for reflection "--add-opens", "jdk.compiler/com.sun.tools.javac.api=javacs", ]; - + console.log(javaExecutablePath + ' ' + args.join(' ')); - + // Start the child java process return { command: javaExecutablePath, @@ -410,7 +411,7 @@ function findJavaExecutable(binname: string) { // Then search PATH parts if (process.env['PATH']) { console.log('Looking for java in PATH'); - + let pathparts = process.env['PATH'].split(Path.delimiter); for (let i = 0; i < pathparts.length; i++) { let binpath = Path.join(pathparts[i], binname); @@ -419,8 +420,8 @@ function findJavaExecutable(binname: string) { } } } - - // Else return the binary name directly (this will likely always fail downstream) + + // Else return the binary name directly (this will likely always fail downstream) return null; } @@ -437,7 +438,7 @@ function findJavaExecutableInJavaHome(javaHome: string, binname: string) { for (let i = 0; i < workspaces.length; i++) { let binpath = Path.join(workspaces[i], 'bin', binname); - if (FS.existsSync(binpath)) + if (FS.existsSync(binpath)) return binpath; } diff --git a/package-lock.json b/package-lock.json index 0ef127c5..dc6fcbb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,14 +12,14 @@ "adm-zip": "^0.4.13", "jsonc-parser": "^2.1.1", "vscode-debugadapter": "^1.35.0", - "vscode-languageclient": "^5.3.0-next.4" + "vscode-languageclient": "^9.0.1" }, "devDependencies": { "@types/adm-zip": "^0.4.32", "@types/mocha": "^2.2.42", "@types/node": "^10.14.6", - "@types/vscode": "^1.37.0", - "typescript": "^3.9.10", + "@types/vscode": "^1.96.0", + "typescript": "^5.7.2", "vsce": "^2.9.2", "vscode-debugadapter-testsupport": "^1.35.0", "vscode-test": "^1.2.0" @@ -50,9 +50,9 @@ "dev": true }, "node_modules/@types/vscode": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.37.0.tgz", - "integrity": "sha512-PRfeuqYuzk3vjf+puzxltIUWC+AhEGYpFX29/37w30DQSQnpf5AgMVf7GDBAdmTbWTBou+EMFz/Ne6XCM/KxzQ==", + "version": "1.96.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.96.0.tgz", + "integrity": "sha512-qvZbSZo+K4ZYmmDuaodMbAa67Pl6VDQzLKFka6rq+3WUTY4Kro7Bwoi0CuZLO/wema0ygcmpwow7zZfPJTs5jg==", "dev": true }, "node_modules/adm-zip": { @@ -97,8 +97,7 @@ "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "node_modules/base64-js": { "version": "1.5.1", @@ -1030,7 +1029,8 @@ "node_modules/semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true }, "node_modules/side-channel": { "version": "1.0.4", @@ -1197,16 +1197,16 @@ } }, "node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/uc.micro": { @@ -1291,32 +1291,69 @@ "integrity": "sha512-+OMm11R1bGYbpIJ5eQIkwoDGFF4GvBz3Ztl6/VM+/RNNb2Gjk2c0Ku+oMmfhlTmTlPCpgHBsH4JqVCbUYhu5bA==" }, "node_modules/vscode-jsonrpc": { - "version": "4.1.0-next.2", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.1.0-next.2.tgz", - "integrity": "sha512-GsBLjP9DxQ42yl1mW9GEIlnSc0+R8mfzhaebwmmTPEJjezD5SPoAo3DFrIAFZha9yvQ1nzZfZlhtVpGQmgxtXg==" + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "engines": { + "node": ">=14.0.0" + } }, "node_modules/vscode-languageclient": { - "version": "5.3.0-next.5", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-5.3.0-next.5.tgz", - "integrity": "sha512-R7mblF1qsb4ragFBCyRr5RDASymwJ1GoZRwg7kuuCWi1R/x58RZ3AQ9osxT6MeHdhE4PKDB3LyTbfvHu7Q1d6Q==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-9.0.1.tgz", + "integrity": "sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==", + "dependencies": { + "minimatch": "^5.1.0", + "semver": "^7.3.7", + "vscode-languageserver-protocol": "3.17.5" + }, + "engines": { + "vscode": "^1.82.0" + } + }, + "node_modules/vscode-languageclient/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dependencies": { - "semver": "^5.5.0", - "vscode-languageserver-protocol": "3.15.0-next.5" + "balanced-match": "^1.0.0" + } + }, + "node_modules/vscode-languageclient/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/vscode-languageclient/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/vscode-languageserver-protocol": { - "version": "3.15.0-next.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.0-next.5.tgz", - "integrity": "sha512-rR7Zo5WZTGSsE9lq7pPSgO+VMhVV8UVq6emrDoQ3x5dUyhLKB2/gbMkGKucQpsKGLtF/NuccCa+3jMsO788HjQ==", + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", "dependencies": { - "vscode-jsonrpc": "^4.1.0-next.2", - "vscode-languageserver-types": "3.15.0-next.1" + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" } }, "node_modules/vscode-languageserver-types": { - "version": "3.15.0-next.1", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.1.tgz", - "integrity": "sha512-R0kzmaI8gOGEoU7b9huYQAzgZzRQ/5Q8HKjsIUdfz0MjXcBZ4tr1ik1So1p1O5kGrI1VTCd22Fw/wI7ECGoIPw==" + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" }, "node_modules/vscode-test": { "version": "1.2.0", @@ -1406,9 +1443,9 @@ "dev": true }, "@types/vscode": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.37.0.tgz", - "integrity": "sha512-PRfeuqYuzk3vjf+puzxltIUWC+AhEGYpFX29/37w30DQSQnpf5AgMVf7GDBAdmTbWTBou+EMFz/Ne6XCM/KxzQ==", + "version": "1.96.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.96.0.tgz", + "integrity": "sha512-qvZbSZo+K4ZYmmDuaodMbAa67Pl6VDQzLKFka6rq+3WUTY4Kro7Bwoi0CuZLO/wema0ygcmpwow7zZfPJTs5jg==", "dev": true }, "adm-zip": { @@ -1453,8 +1490,7 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base64-js": { "version": "1.5.1", @@ -2184,7 +2220,8 @@ "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true }, "side-channel": { "version": "1.0.4", @@ -2301,9 +2338,9 @@ } }, "typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true }, "uc.micro": { @@ -2382,32 +2419,56 @@ "integrity": "sha512-+OMm11R1bGYbpIJ5eQIkwoDGFF4GvBz3Ztl6/VM+/RNNb2Gjk2c0Ku+oMmfhlTmTlPCpgHBsH4JqVCbUYhu5bA==" }, "vscode-jsonrpc": { - "version": "4.1.0-next.2", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.1.0-next.2.tgz", - "integrity": "sha512-GsBLjP9DxQ42yl1mW9GEIlnSc0+R8mfzhaebwmmTPEJjezD5SPoAo3DFrIAFZha9yvQ1nzZfZlhtVpGQmgxtXg==" + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==" }, "vscode-languageclient": { - "version": "5.3.0-next.5", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-5.3.0-next.5.tgz", - "integrity": "sha512-R7mblF1qsb4ragFBCyRr5RDASymwJ1GoZRwg7kuuCWi1R/x58RZ3AQ9osxT6MeHdhE4PKDB3LyTbfvHu7Q1d6Q==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-9.0.1.tgz", + "integrity": "sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==", "requires": { - "semver": "^5.5.0", - "vscode-languageserver-protocol": "3.15.0-next.5" + "minimatch": "^5.1.0", + "semver": "^7.3.7", + "vscode-languageserver-protocol": "3.17.5" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==" + } } }, "vscode-languageserver-protocol": { - "version": "3.15.0-next.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.0-next.5.tgz", - "integrity": "sha512-rR7Zo5WZTGSsE9lq7pPSgO+VMhVV8UVq6emrDoQ3x5dUyhLKB2/gbMkGKucQpsKGLtF/NuccCa+3jMsO788HjQ==", + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", "requires": { - "vscode-jsonrpc": "^4.1.0-next.2", - "vscode-languageserver-types": "3.15.0-next.1" + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" } }, "vscode-languageserver-types": { - "version": "3.15.0-next.1", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.1.tgz", - "integrity": "sha512-R0kzmaI8gOGEoU7b9huYQAzgZzRQ/5Q8HKjsIUdfz0MjXcBZ4tr1ik1So1p1O5kGrI1VTCd22Fw/wI7ECGoIPw==" + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" }, "vscode-test": { "version": "1.2.0", diff --git a/package.json b/package.json index 3e3d4c19..0697c285 100644 --- a/package.json +++ b/package.json @@ -190,14 +190,14 @@ "adm-zip": "^0.4.13", "jsonc-parser": "^2.1.1", "vscode-debugadapter": "^1.35.0", - "vscode-languageclient": "^5.3.0-next.4" + "vscode-languageclient": "^9.0.1" }, "devDependencies": { "@types/adm-zip": "^0.4.32", "@types/mocha": "^2.2.42", "@types/node": "^10.14.6", - "@types/vscode": "^1.37.0", - "typescript": "^3.9.10", + "@types/vscode": "^1.96.0", + "typescript": "^5.7.2", "vsce": "^2.9.2", "vscode-debugadapter-testsupport": "^1.35.0", "vscode-test": "^1.2.0" diff --git a/src/main/java/org/javacs/lsp/DiagnosticTag.java b/src/main/java/org/javacs/lsp/DiagnosticTag.java index 09aba741..84ef2121 100644 --- a/src/main/java/org/javacs/lsp/DiagnosticTag.java +++ b/src/main/java/org/javacs/lsp/DiagnosticTag.java @@ -2,4 +2,5 @@ public class DiagnosticTag { public static final int Unnecessary = 1; + public static final int Deprecated = 2; } diff --git a/src/main/java/org/javacs/markup/ErrorProvider.java b/src/main/java/org/javacs/markup/ErrorProvider.java index a15f9687..58f003b6 100644 --- a/src/main/java/org/javacs/markup/ErrorProvider.java +++ b/src/main/java/org/javacs/markup/ErrorProvider.java @@ -86,6 +86,9 @@ private org.javacs.lsp.Diagnostic lspDiagnostic(javax.tools.Diagnostic