Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"publisher": "vscjava",
"preview": true,
"engines": {
"vscode": "^1.32.0"
"vscode": "^1.52.0"
},
"aiKey": "b4a8a622-6ac7-4cf8-83aa-f325e1890795",
"icon": "logo.png",
Expand Down Expand Up @@ -128,7 +128,7 @@
"@types/request": "^2.48.5",
"@types/request-promise-native": "^1.0.17",
"@types/semver": "^5.5.0",
"@types/vscode": "1.32.0",
"@types/vscode": "1.52.0",
"@types/winreg": "^1.2.30",
"arch": "^2.1.2",
"autoprefixer": "^8.5.1",
Expand Down
7 changes: 6 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import { initialize as initCommands } from "./commands";
import { initialize as initRecommendations } from "./recommendation";
import { initialize as initMisc, showReleaseNotesOnStart, HelpViewType } from "./misc";
import { initialize as initExp, getExpService } from "./exp";
import { showOverviewPageOnActivation } from "./overview";
import { KEY_SHOW_WHEN_USING_JAVA, showOverviewPageOnActivation } from "./overview";
import { validateJavaRuntime } from "./java-runtime";
// import { JavaGettingStartedViewSerializer } from "./getting-started";
import { scheduleAction } from "./utils/scheduler";

export async function activate(context: vscode.ExtensionContext) {
syncState(context);
initializeTelemetry(context);
await instrumentOperation("activation", initializeExtension)(context);
}
Expand Down Expand Up @@ -90,6 +91,10 @@ async function showGettingStartedView(context: vscode.ExtensionContext, _isForce
context.globalState.update("isGettingStartedPresented", true);
}

function syncState(_context: vscode.ExtensionContext): void {
_context.globalState.setKeysForSync([KEY_SHOW_WHEN_USING_JAVA]);
}

function initializeTelemetry(_context: vscode.ExtensionContext) {
const ext = vscode.extensions.getExtension("vscjava.vscode-java-pack");
const packageInfo = ext ? ext.packageJSON : undefined;
Expand Down
4 changes: 2 additions & 2 deletions src/overview/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { getExtensionContext } from "../utils";
import { loadTextFromFile } from "../utils";

let overviewView: vscode.WebviewPanel | undefined;
const KEY_SHOW_WHEN_USING_JAVA = "showWhenUsingJava";
export const KEY_SHOW_WHEN_USING_JAVA = "showWhenUsingJava";
const KEY_OVERVIEW_LAST_SHOW_TIME = "overviewLastShowTime";

const toggleOverviewVisibilityOperation = instrumentOperation("toggleOverviewVisibility", (operationId: string, context: vscode.ExtensionContext, visibility: boolean) => {
Expand Down Expand Up @@ -94,7 +94,7 @@ async function initializeOverviewView(context: vscode.ExtensionContext, webviewP
export async function showOverviewPageOnActivation(context: vscode.ExtensionContext) {
let showWhenUsingJava = context.globalState.get(KEY_SHOW_WHEN_USING_JAVA);
if (showWhenUsingJava === undefined) {
showWhenUsingJava = true;
showWhenUsingJava = vscode.env.uiKind === vscode.UIKind.Desktop;
}

if (showWhenUsingJava) {
Expand Down