Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix-vscode-inconsis…
Browse files Browse the repository at this point in the history
…tency
  • Loading branch information
ofekby committed Dec 6, 2023
2 parents d6c304c + a4715f4 commit 0eb1028
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .chatversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.29.0
v2.30.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"publisher": "TabNine",
"name": "tabnine-vscode",
"version": "3.46.0",
"version": "3.49.0",
"displayName": "Tabnine: AI Autocomplete & Chat for Javascript, Python, Typescript, PHP, Go, Java & more",
"description": "AI coding assistant with AI code completions and AI code chat right in the IDE, helping developers by generating code, writing unit tests and documentation, explaining legacy code, and much more. Tabnine supports all major languages including JavaScript, Python, Java, Typescript c/c++ and more.",
"icon": "small_logo.png",
Expand Down
7 changes: 0 additions & 7 deletions src/enterprise/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ export const SELF_HOSTED_IGNORE_PROXY_CONFIGURATION =
export const SELF_HOSTED_IGNORE_CERTIFICATE_ERRORS_CONFIGURATION =
"tabnineSelfHostedUpdater.ignoreCertificateErrors";

export const USE_PROXY_CONFIGURATION = "tabnine.useProxySupport";

export const CA_CERTS_CONFIGURATION = "tabnine.caCerts";

export const IGNORE_CERTIFICATE_ERRORS_CONFIGURATION =
"tabnine.ignoreCertificateErrors";

export const TABNINE_HOST_CONFIGURATION = `tabnine.cloudHost`;

export const INSTALL_COMMAND = "workbench.extensions.installExtension";
Expand Down
6 changes: 3 additions & 3 deletions src/enterprise/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import serverUrl from "./update/serverUrl";
import tabnineExtensionProperties from "../globals/tabnineExtensionProperties";
import { host } from "../utils/utils";
import {
IGNORE_CERTIFICATE_ERRORS_CONFIGURATION,
USE_PROXY_CONFIGURATION,
RELOAD_COMMAND,
SELF_HOSTED_IGNORE_CERTIFICATE_ERRORS_CONFIGURATION,
SELF_HOSTED_IGNORE_PROXY_CONFIGURATION,
Expand All @@ -38,6 +36,8 @@ import {
BRAND_NAME,
CONFIG_COMMAND,
ENTERPRISE_BRAND_NAME,
IGNORE_CERTIFICATE_ERRORS_CONFIGURATION,
USE_PROXY_CONFIGURATION,
} from "../globals/consts";
import { StatusBar } from "./statusBar";
import { isHealthyServer } from "./update/isHealthyServer";
Expand Down Expand Up @@ -71,7 +71,7 @@ export async function activate(
commands.registerCommand(CONFIG_COMMAND, () => {
void commands.executeCommand(
OPEN_SETTINGS_COMMAND,
`@ext:${EXTENSION_ID}`
`@ext:tabnine.${EXTENSION_ID}`
);
})
);
Expand Down
4 changes: 4 additions & 0 deletions src/globals/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,7 @@ export enum SuggestionTrigger {
export const TLS_CONFIG_MIN_SUPPORTED_VERSION = "4.22.0";
export const CONFIG_COMMAND = "TabNine::config";
export const EXTENSION_ID = "TabNine.tabnine-vscode";
export const USE_PROXY_CONFIGURATION = "tabnine.useProxySupport";
export const IGNORE_CERTIFICATE_ERRORS_CONFIGURATION =
"tabnine.ignoreCertificateErrors";
export const CA_CERTS_CONFIGURATION = "tabnine.caCerts";
2 changes: 1 addition & 1 deletion src/globals/tabnineExtensionProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
CA_CERTS_CONFIGURATION,
IGNORE_CERTIFICATE_ERRORS_CONFIGURATION,
USE_PROXY_CONFIGURATION,
} from "../enterprise/consts";
} from "./consts";

const TELEMETRY_CONFIG_ID = "telemetry";
const TELEMETRY_CONFIG_ENABLED_ID = "enableTelemetry";
Expand Down
16 changes: 12 additions & 4 deletions src/languages/java/JavaHome.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { extensions } from "vscode";
import { Logger } from "../../utils/logger";

interface RequirementsData {
tooling_jre: string;
Expand All @@ -11,9 +12,16 @@ interface JavaExtensionAPI {
}

export function getJavaHomePath(): string | undefined {
const javaExension = extensions.getExtension<JavaExtensionAPI>("redhat.java");
if (javaExension?.isActive) {
return javaExension.exports.javaRequirement.java_home;
try {
const javaExension = extensions.getExtension<JavaExtensionAPI>(
"redhat.java"
);
if (javaExension?.isActive) {
return javaExension.exports.javaRequirement.java_home;
}
return undefined;
} catch (e) {
Logger.error(`Failde to get java sdk information: ${e}`);
return undefined;
}
return undefined;
}

0 comments on commit 0eb1028

Please sign in to comment.