vscode-languageclient/node#Executable TypeScript Examples

The following examples show how to use vscode-languageclient/node#Executable. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: javaServerStarter.ts    From vscode-microprofile with Apache License 2.0 6 votes vote down vote up
export function prepareExecutable(requirements: RequirementsData, microprofileJavaExtensions: string[]): Executable {
  const executable: Executable = Object.create(null);
  const options: ExecutableOptions = Object.create(null);
  options.env = process.env;
  executable.options = options;
  executable.command = path.resolve(requirements.tooling_jre + '/bin/java');
  executable.args = prepareParams(microprofileJavaExtensions);
  return executable;
}
Example #2
Source File: javaServerStarter.ts    From vscode-stripe with MIT License 6 votes vote down vote up
export function prepareExecutable(
  jdkInfo: JDKInfo,
  workspacePath: string,
  context: ExtensionContext,
  isSyntaxServer: boolean,
  outputChannel: OutputChannel,
  telemetry: Telemetry,
): Executable {
  try {
    const executable: Executable = Object.create(null);
    const options: ExecutableOptions = Object.create(null);
    options.env = Object.assign({syntaxserver: isSyntaxServer}, process.env);
    executable.options = options;
    executable.command = path.resolve(jdkInfo.javaHome + '/bin/java');
    executable.args = prepareParams(jdkInfo, workspacePath, context, isSyntaxServer, outputChannel, telemetry);
    console.log(`Starting Java server with: ${executable.command} ${executable.args.join(' ')}`);
    return executable;
  } catch (e) {
    const serverType = isSyntaxServer ? 'Syntax' : 'Standard';
    throw new Error(`Failed to start Java ${serverType} server. ${e}`);
  }
}
Example #3
Source File: vscode.ts    From vscode-stripe with MIT License 6 votes vote down vote up
export function getMockJavaServerOptions(): Executable {
  const executable: Executable = Object.create(null);
  const options: ExecutableOptions = Object.create(null);
  options.env = Object.assign({syntaxserver: false}, process.env);
  executable.options = options;
  executable.command = '/path/to/java/home/bin/java';
  executable.args = [];
  return executable;
}