Skip to content

Added support for multiple executors per language#83

Open
callamaris wants to merge 2 commits intoformulahendry:masterfrom
callamaris:multiple-executor-maps
Open

Added support for multiple executors per language#83
callamaris wants to merge 2 commits intoformulahendry:masterfrom
callamaris:multiple-executor-maps

Conversation

@callamaris
Copy link
Copy Markdown

Hi,

i have added some basic support for multiple executor maps per language.

The pre-selection of previously used commands needs some more investigation.

#48

Comment thread src/codeManager.ts
private getExecutor(languageId: string, fileExtension: string): string {
private async getSubExecutor(executor: any): Promise<string> {
let subExecutorId = await vscode.window.showQuickPick(Object.keys(executor), { placeHolder: "Type or select command to run" });
if (subExecutorId !== undefined) {
Copy link
Copy Markdown
Owner

@formulahendry formulahendry Feb 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to handle the case when subExecutorId is undefined (user does not select command to run)

Comment thread src/codeManager.ts Outdated
let fileExtension = this.getFileExtension(editor);
let executor = this.getExecutor(languageId, fileExtension);

//multiple commands per executor
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add space --> // multiple ...

Comment thread src/codeManager.ts
if (subExecutorId !== undefined) {
executor = executor[subExecutorId];
} else {
executor = null;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just return null is not good experience for users. It will lead to vscode.window.showInformationMessage('Code language not supported or defined.'); be called.

Copy link
Copy Markdown
Owner

@formulahendry formulahendry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exit run function if subExecutorId is undefined. Avoid calling vscode.window.showInformationMessage('Code language not supported or defined.');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants