vscode#Terminal TypeScript Examples
The following examples show how to use
vscode#Terminal.
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: extension.ts From vscode-cadence with Apache License 2.0 | 6 votes |
constructor (
config: Config,
ctx: ExtensionContext,
api: LanguageServerAPI,
terminal: Terminal,
emulatorStatusBarItem: StatusBarItem,
activeAccountStatusBarItem: StatusBarItem
) {
this.config = config
this.ctx = ctx
this.api = api
this.terminal = terminal
this.emulatorStatusBarItem = emulatorStatusBarItem
this.activeAccountStatusBarItem = activeAccountStatusBarItem
}
Example #2
Source File: extension.ts From vscode-cadence with Apache License 2.0 | 6 votes |
// Called when the extension starts up. Reads config, starts the language
// server, and registers command handlers.
export async function activate (ctx: ExtensionContext): Promise<void> {
let config: Config
let terminal: Terminal
let api: LanguageServerAPI
try {
config = getConfig()
if (!await config.readLocalConfig()) {
if (!await promptInitializeConfig()) { return }
await config.readLocalConfig()
}
terminal = createTerminal(ctx)
api = new LanguageServerAPI(ctx, config, EmulatorState.Stopped, null)
} catch (err) {
window.showErrorMessage('Failed to activate extension: ', err)
.then(() => {}, () => {})
return
}
handleConfigChanges()
const ext = new Extension(
config,
ctx,
api,
terminal,
createEmulatorStatusBarItem(),
createActiveAccountStatusBarItem()
)
registerCommands(ext)
renderExtension(ext)
}
Example #3
Source File: terminal.ts From vscode-cadence with Apache License 2.0 | 6 votes |
// Creates a terminal within VS Code.
export function createTerminal (ctx: ExtensionContext): Terminal {
const storagePath = getStoragePath(ctx)
if (storagePath === undefined) {
throw new Error('Missing extension storage path')
}
// By default, reset all files on each load.
resetStorage(ctx)
return window.createTerminal({
name: 'Flow Emulator',
hideFromUser: true,
cwd: storagePath
})
}
Example #4
Source File: cmd-runner.ts From plugin-vscode with Apache License 2.0 | 5 votes |
terminal: Terminal
Example #5
Source File: dbtTerminal.ts From vscode-dbt-power-user with MIT License | 5 votes |
private terminal?: Terminal;
Example #6
Source File: extension.ts From vscode-cadence with Apache License 2.0 | 5 votes |
terminal: Terminal