Skip to content

Commit 0668b0d

Browse files
committed
vscode-extension: starts up language server if no framework SDK is configured
Displaying some kind of error for a missing SDK is now handled by the language server.
1 parent 541b9b8 commit 0668b0d

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

vscode-extension/src/main/ts/extension.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ import normalizeUri from "./utils/normalizeUri";
3535
import findQuickCompileWorkspaceFolders from "./commands/findQuickCompileWorkspaceFolders";
3636

3737
const INVALID_SDK_ERROR = "as3mxml.sdk.editor in settings does not point to a valid SDK. Requires Apache Royale 0.9.6 or newer.";
38-
const MISSING_FRAMEWORK_SDK_ERROR = "You must configure an SDK to enable all ActionScript & MXML features.";
3938
const INVALID_JAVA_ERROR = "as3mxml.java.path in settings does not point to a valid executable. It cannot be a directory, and Java 1.8 or newer is required.";
4039
const MISSING_JAVA_ERROR = "Could not locate valid Java executable. To configure Java manually, use the as3mxml.java.path setting.";
4140
const INITIALIZING_MESSAGE = "Initializing ActionScript & MXML language server...";
4241
const RELOAD_WINDOW_MESSAGE = "To apply new settings for ActionScript & MXML, please reload the window.";
4342
const RELOAD_WINDOW_BUTTON_LABEL = "Reload Window";
44-
const CONFIGURE_SDK_LABEL = "Configure SDK";
4543
const STARTUP_ERROR = "The ActionScript & MXML extension failed to start.";
4644
const QUICK_COMPILE_AND_DEBUG_INIT_MESSAGE = "Quick Compile & Debug is waiting for initialization...";
4745
const QUICK_COMPILE_AND_RUN_INIT_MESSAGE = "Quick Compile & Run is waiting for initialization...";
@@ -272,7 +270,7 @@ export function activate(context: vscode.ExtensionContext)
272270

273271
sdkStatusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right);
274272
updateSDKStatusBarItem();
275-
sdkStatusBarItem.tooltip = "Select ActionScript SDK";
273+
sdkStatusBarItem.tooltip = "Select ActionScript & MXML SDK";
276274
sdkStatusBarItem.command = "as3mxml.selectWorkspaceSDK";
277275
sdkStatusBarItem.show();
278276

@@ -329,17 +327,6 @@ function hasInvalidEditorSDK(): boolean
329327
return !editorSDKHome && sdkPath != null;
330328
}
331329

332-
function showMissingFrameworkSDKError()
333-
{
334-
vscode.window.showErrorMessage(MISSING_FRAMEWORK_SDK_ERROR, CONFIGURE_SDK_LABEL).then((value: string) =>
335-
{
336-
if(value === CONFIGURE_SDK_LABEL)
337-
{
338-
selectWorkspaceSDK();
339-
}
340-
});
341-
}
342-
343330
function startClient()
344331
{
345332
if(!savedContext)
@@ -362,11 +349,6 @@ function startClient()
362349
vscode.window.showErrorMessage(INVALID_SDK_ERROR);
363350
return;
364351
}
365-
if(!frameworkSDKHome)
366-
{
367-
showMissingFrameworkSDKError();
368-
return;
369-
}
370352

371353
vscode.window.withProgress({location: vscode.ProgressLocation.Window}, (progress) =>
372354
{

0 commit comments

Comments
 (0)