import { CancellationToken , commands } from "vscode" ; import { Commands , executeJavaLanguageServerCommand } from "../commands" ; import { IClasspath } from "../exportJarSteps/IStepMetadata" ; import { IMainClassInfo } from "../exportJarSteps/ResolveMainClassExecutor" ; import { INodeData } from "./nodeData" ; export namespace Jdtls { export async function getProjects ( params ) { return await commands . executeCommand ( Commands . EXECUTE_WORKSPACE_COMMAND , Commands . JAVA_PROJECT_LIST , params ) || [ ] ; } export async function refreshLibraries ( params ) { return commands . executeCommand ( Commands . EXECUTE_WORKSPACE_COMMAND , Commands . JAVA_PROJECT_REFRESH_LIB_SERVER , params ) ; } export async function getPackageData ( params ) { return await commands . executeCommand ( Commands . EXECUTE_WORKSPACE_COMMAND , Commands . JAVA_GETPACKAGEDATA , params ) || [ ] ; } export async function resolvePath ( params ) { return await commands . executeCommand ( Commands . EXECUTE_WORKSPACE_COMMAND , Commands . JAVA_RESOLVEPATH , params ) || [ ] ; } export async function getMainClasses ( params ) { return await commands . executeCommand ( Commands . EXECUTE_WORKSPACE_COMMAND , Commands . JAVA_PROJECT_GETMAINCLASSES , params ) || [ ] ; } export async function exportJar ( mainClass , classpaths , destination , terminalId , token ) { return commands . executeCommand ( Commands . EXECUTE_WORKSPACE_COMMAND , Commands . JAVA_PROJECT_GENERATEJAR , mainClass , classpaths , destination , terminalId , token ) ; } export enum CompileWorkspaceStatus { Failed = 0 , Succeed = 1 , Witherror = 2 , Cancelled = 3 } export function resolveBuildFiles ( ) { return < Promise < string [ ] > > executeJavaLanguageServerCommand ( Commands . JAVA_RESOLVE_BUILD_FILES ) ; } }