Explicitly set heap size on vscode cf editor language server.

This commit is contained in:
Kris De Volder
2017-01-31 16:10:43 -08:00
parent 039c954df1
commit c91f64c38d
2 changed files with 6 additions and 1 deletions

View File

@@ -25,11 +25,12 @@ export interface ActivatorOptions {
extensionId: string;
clientOptions: LanguageClientOptions;
fatJarFile: string;
jvmHeap?: string;
}
export function activate(options: ActivatorOptions, context: VSCode.ExtensionContext) {
let DEBUG = options.DEBUG;
let jvmHeap = options.jvmHeap;
if (options.CONNECT_TO_LS) {
connectToLS(context, options);
} else {
@@ -87,6 +88,9 @@ export function activate(options: ActivatorOptions, context: VSCode.ExtensionCon
'-jar',
fatJarFile,
];
if (jvmHeap) {
args.unshift("-Xmx"+jvmHeap);
}
if (DEBUG) {
args.unshift(DEBUG_ARG);
}

View File

@@ -32,6 +32,7 @@ export function activate(context: VSCode.ExtensionContext) {
CONNECT_TO_LS: false,
extensionId: 'vscode-manifest-yaml',
fatJarFile: 'target/vscode-manifest-yaml-0.0.2-SNAPSHOT.jar',
jvmHeap: '48m',
clientOptions: {
// HACK!!! documentSelector only takes string|string[] where string is language id, but DocumentFilter object is passed instead
// Reasons: