diff --git a/package-lock.json b/package-lock.json index 44ac485d..b99a0550 100644 --- a/package-lock.json +++ b/package-lock.json @@ -103,9 +103,9 @@ "dev": true }, "@types/vscode": { - "version": "1.55.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.55.0.tgz", - "integrity": "sha512-49hysH7jneTQoSC8TWbAi7nKK9Lc5osQNjmDHVosrcU8o3jecD9GrK0Qyul8q4aGPSXRfNGqIp9CBdb13akETg==", + "version": "1.57.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.57.0.tgz", + "integrity": "sha512-FeznBFtIDCWRluojTsi9c3LLcCHOXP5etQfBK42+ixo1CoEAchkw39tuui9zomjZuKfUVL33KZUDIwHZ/xvOkQ==", "dev": true }, "@webassemblyjs/ast": { @@ -2026,15 +2026,23 @@ }, "dependencies": { "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { - "is-extglob": "^2.1.0" + "is-extglob": "^2.1.1" } } } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } } } }, diff --git a/package.json b/package.json index 0431ba0a..afbedce7 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "debugger" ], "engines": { - "vscode": "^1.55.0" + "vscode": "^1.57.0" }, "license": "SEE LICENSE IN LICENSE.txt", "repository": { @@ -946,7 +946,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^14.14.10", "@types/uuid": "^8.3.0", - "@types/vscode": "1.55.0", + "@types/vscode": "1.57.0", "cross-env": "^5.2.0", "gulp": "^4.0.2", "gulp-tslint": "^8.1.4", diff --git a/src/JavaInlineValueProvider.ts b/src/JavaInlineValueProvider.ts index 74537f6a..87979c75 100644 --- a/src/JavaInlineValueProvider.ts +++ b/src/JavaInlineValueProvider.ts @@ -1,18 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. -import * as compareVersions from "compare-versions"; import { debug, InlineValue, InlineValueContext, InlineValueEvaluatableExpression, InlineValuesProvider, InlineValueText, InlineValueVariableLookup, - Range, TextDocument, version } from "vscode"; + Range, TextDocument } from "vscode"; import { instrumentOperation, instrumentOperationStep, sendInfo } from "vscode-extension-telemetry-wrapper"; import * as CodeConverter from "vscode-languageclient/lib/codeConverter"; import * as ProtocolConverter from "vscode-languageclient/lib/protocolConverter"; import { InlineKind, InlineVariable, resolveInlineVariables } from "./languageServerPlugin"; -// In VS Code 1.55.0, viewport doesn't change while scrolling the editor and it's fixed in 1.56.0. -// So dynamically enable viewport support based on the user's VS Code version. -const isViewPortSupported = compareVersions(version.replace(/-insider$/i, ""), "1.56.0") >= 0; - const protoConverter: ProtocolConverter.Converter = ProtocolConverter.createConverter(); const codeConverter: CodeConverter.Converter = CodeConverter.createConverter(); @@ -23,7 +18,7 @@ export class JavaInlineValuesProvider implements InlineValuesProvider { const resolveInlineVariablesStep = instrumentOperationStep(operationId, "resolveInlineVariables", async () => { return (await resolveInlineVariables({ uri: document.uri.toString(), - viewPort: isViewPortSupported ? codeConverter.asRange(viewPort) : undefined, + viewPort: codeConverter.asRange(viewPort), stoppedLocation: codeConverter.asRange(context.stoppedLocation), })); }); diff --git a/src/customWidget.ts b/src/customWidget.ts index 80bcc674..5235d8e0 100644 --- a/src/customWidget.ts +++ b/src/customWidget.ts @@ -7,8 +7,9 @@ export class NotificationBar implements vscode.Disposable { private statusBar: vscode.StatusBarItem; private lastUpdateTime: number; - constructor() { - this.statusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, Number.POSITIVE_INFINITY); + constructor(id: string, name: string) { + this.statusBar = vscode.window.createStatusBarItem(id, vscode.StatusBarAlignment.Left, Number.POSITIVE_INFINITY); + this.statusBar.name = name; } public show(text: string, duration?: number) { diff --git a/src/extension.ts b/src/extension.ts index 721e332a..f90da301 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -55,7 +55,7 @@ function initializeExtension(_operationId: string, context: vscode.ExtensionCont // tslint:disable-next-line return javaProcess ? String(javaProcess.pid) : "${command:PickJavaProcess}"; })); - const hcrStatusBar: NotificationBar = new NotificationBar(); + const hcrStatusBar: NotificationBar = new NotificationBar("java.hcrStatusBar", "Java HotCodeReplace"); context.subscriptions.push(hcrStatusBar); context.subscriptions.push(instrumentOperationAsVsCodeCommand("java.debug.hotCodeReplace", async () => { await applyHCR(hcrStatusBar); diff --git a/src/progressImpl.ts b/src/progressImpl.ts index 9e7c83af..aefa141c 100644 --- a/src/progressImpl.ts +++ b/src/progressImpl.ts @@ -33,7 +33,8 @@ class ProgressReporter implements IProgressReporter { } if (this._progressLocation === ProgressLocation.Window) { - this._statusBarItem = window.createStatusBarItem(StatusBarAlignment.Left, 1); + this._statusBarItem = window.createStatusBarItem(this._id, StatusBarAlignment.Left, 1); + this._statusBarItem.name = "Progress Message for " + this._jobName; this._statusBarItem.text = `$(sync~spin) ${this._jobName}...`; this._statusBarItem.command = { title: "Check Java Build Status",