-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing gauge install instruction on welcome page when gauge is not i…
…nstalled (#157) * Showing gauge install instruction on welcome page when gauge is not installed #115 * Removing the info msg when gauge is not installed and UI changes on the welcome page #159 * refactoring and UI changes #115 * Changing the command name
- Loading branch information
1 parent
349ab6a
commit da16eb1
Showing
5 changed files
with
197 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Disposable, window, ExtensionContext, commands, Terminal } from "vscode"; | ||
import { GaugeVSCodeCommands } from "../constants"; | ||
|
||
let terminalStack: Terminal[] = []; | ||
|
||
export class TerminalProvider extends Disposable { | ||
private readonly _context: ExtensionContext; | ||
private readonly _disposable: Disposable; | ||
constructor(context: ExtensionContext) { | ||
super(() => this.dispose()); | ||
this._context = context; | ||
this._disposable = Disposable.from( | ||
commands.registerCommand(GaugeVSCodeCommands.ExecuteInTerminal, (text: string) => { | ||
terminalStack.push(window.createTerminal('gauge install')); | ||
getLatestTerminal().show(); | ||
getLatestTerminal().sendText(text); | ||
} | ||
)); | ||
} | ||
} | ||
|
||
function getLatestTerminal() { | ||
return terminalStack[terminalStack.length - 1]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters