vscode#InputBoxOptions TypeScript Examples
The following examples show how to use
vscode#InputBoxOptions.
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: createProject.ts From sourcepawn-vscode with MIT License | 6 votes |
export async function run(args: any) {
// get workspace folder
let workspaceFolders = Workspace.workspaceFolders;
if (!workspaceFolders) {
window.showErrorMessage("No workspace are opened.");
return;
}
const inputOptions: InputBoxOptions = {
prompt:
"Relative path for the root of the project. Leave empty for the root ",
};
const input = await window.showInputBox(inputOptions);
//Select the rootpath
let rootpath = join(workspaceFolders?.[0].uri.fsPath, input);
if (!existsSync(rootpath)) {
mkdirSync(rootpath);
}
// Create the plugins folder
let pluginsFolderPath = join(rootpath, "plugins");
if (!existsSync(pluginsFolderPath)) {
mkdirSync(pluginsFolderPath);
}
// Running the other commands
createTaskCommand(rootpath);
createScriptCommand(rootpath);
createREADMECommand(rootpath);
createMasterCommand(rootpath);
createChangelogCommand(rootpath);
}
Example #2
Source File: driveView.ts From google-drive-vscode with MIT License | 5 votes |
showInputBox(message: string, value?: string): Thenable<string | undefined> {
const params: InputBoxOptions = {
placeHolder: message,
value: value
}
return window.showInputBox(params);
}
Example #3
Source File: user-prompts.ts From Json-to-Dart-Model with MIT License | 5 votes |
promptForBaseClassName = (): Thenable<string | undefined> => {
const classNamePromptOptions: InputBoxOptions = {
prompt: 'Base Class Name',
placeHolder: 'User',
};
return window.showInputBox(classNamePromptOptions);
}
Example #4
Source File: user-prompts.ts From Json-to-Dart-Model with MIT License | 5 votes |
promptForFromAndToSuffix = (): Thenable<string | undefined> => {
const options: InputBoxOptions = {
prompt: 'Suffix for methods from/to',
placeHolder: 'Json (Default)',
};
return window.showInputBox(options);
}
Example #5
Source File: new-trongate-module-dropdown-options.ts From trongate-vscode with MIT License | 5 votes |
inputPrompOptionForModuleName: InputBoxOptions = {
prompt: "Trongate Module Name",
placeHolder: "For example: store items",
}
Example #6
Source File: new-trongate-module-dropdown-options.ts From trongate-vscode with MIT License | 5 votes |
inputPrompOptionForViewName: InputBoxOptions = {
prompt: "View file name",
placeHolder: "For example: display",
}