[format]
This commit is contained in:
@@ -3,27 +3,27 @@ import type { BranFlakesCommand } from './BranFlakesCommand';
|
|||||||
import { VSCodePromptInputStrategy } from '../input/VSCodePromptInputStrategy';
|
import { VSCodePromptInputStrategy } from '../input/VSCodePromptInputStrategy';
|
||||||
|
|
||||||
export class CompileBranFlakesCommand implements BranFlakesCommand {
|
export class CompileBranFlakesCommand implements BranFlakesCommand {
|
||||||
getCommandName() {
|
getCommandName() {
|
||||||
return 'bf.execute';
|
return 'bf.execute';
|
||||||
}
|
}
|
||||||
getCommandHandler() {
|
getCommandHandler() {
|
||||||
return async () => {
|
return async () => {
|
||||||
const text = window.activeTextEditor.document.getText();
|
const text = window.activeTextEditor.document.getText();
|
||||||
const fn = window.activeTextEditor.document.fileName;
|
const fn = window.activeTextEditor.document.fileName;
|
||||||
const inputStrategy = new VSCodePromptInputStrategy(
|
const inputStrategy = new VSCodePromptInputStrategy(
|
||||||
window.showInputBox
|
window.showInputBox
|
||||||
);
|
);
|
||||||
const { BranFlakesExecutorVisitor } = await import(
|
const { BranFlakesExecutorVisitor } = await import(
|
||||||
'../BranFlakesExecutorVisitor'
|
'../BranFlakesExecutorVisitor'
|
||||||
);
|
);
|
||||||
|
|
||||||
const output = await BranFlakesExecutorVisitor.run(
|
const output = await BranFlakesExecutorVisitor.run(
|
||||||
text,
|
text,
|
||||||
fn,
|
fn,
|
||||||
inputStrategy,
|
inputStrategy,
|
||||||
window.showInformationMessage
|
window.showInformationMessage
|
||||||
);
|
);
|
||||||
await window.showInformationMessage(`Output: ${output}`);
|
await window.showInformationMessage(`Output: ${output}`);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user