-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* DEV2-2933 use java home * remove last * rename * rename
- Loading branch information
1 parent
fb321cf
commit 4f352a5
Showing
4 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { getJavaHomePath } from "./java/JavaHome"; | ||
|
||
export function getSDKPath(languageId: string): string | undefined { | ||
if (languageId === "java") { | ||
return getJavaHomePath(); | ||
} | ||
return undefined; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { extensions } from "vscode"; | ||
|
||
interface RequirementsData { | ||
tooling_jre: string; | ||
tooling_jre_version: number; | ||
java_home: string; | ||
java_version: number; | ||
} | ||
interface JavaExtensionAPI { | ||
readonly javaRequirement: RequirementsData; | ||
} | ||
|
||
export function getJavaHomePath(): string | undefined { | ||
const javaExension = extensions.getExtension<JavaExtensionAPI>("redhat.java"); | ||
if (javaExension?.isActive) { | ||
return javaExension.exports.javaRequirement.java_home; | ||
} | ||
return undefined; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters