diff options
author | Aleksei Sidorov <[email protected]> | 2019-06-24 11:02:20 +0100 |
---|---|---|
committer | Aleksei Sidorov <[email protected]> | 2019-06-24 11:02:20 +0100 |
commit | 4722e6d491a29bdb077fc01aa8c5bdc734282c69 (patch) | |
tree | 681b4fd62ce9b2166180713236254a8a25f2b60f /editors/code/src/commands/watch_status.ts | |
parent | 7d79be32801036c39507fe96f87ed316e3934662 (diff) |
Introduce cargo-watch.check-command
Diffstat (limited to 'editors/code/src/commands/watch_status.ts')
-rw-r--r-- | editors/code/src/commands/watch_status.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/editors/code/src/commands/watch_status.ts b/editors/code/src/commands/watch_status.ts index a3b0178f2..91bc7195b 100644 --- a/editors/code/src/commands/watch_status.ts +++ b/editors/code/src/commands/watch_status.ts | |||
@@ -7,13 +7,15 @@ export class StatusDisplay implements vscode.Disposable { | |||
7 | 7 | ||
8 | private i = 0; | 8 | private i = 0; |
9 | private statusBarItem: vscode.StatusBarItem; | 9 | private statusBarItem: vscode.StatusBarItem; |
10 | private command: string; | ||
10 | private timer?: NodeJS.Timeout; | 11 | private timer?: NodeJS.Timeout; |
11 | 12 | ||
12 | constructor() { | 13 | constructor(command: string) { |
13 | this.statusBarItem = vscode.window.createStatusBarItem( | 14 | this.statusBarItem = vscode.window.createStatusBarItem( |
14 | vscode.StatusBarAlignment.Left, | 15 | vscode.StatusBarAlignment.Left, |
15 | 10 | 16 | 10 |
16 | ); | 17 | ); |
18 | this.command = command; | ||
17 | this.statusBarItem.hide(); | 19 | this.statusBarItem.hide(); |
18 | } | 20 | } |
19 | 21 | ||
@@ -24,11 +26,11 @@ export class StatusDisplay implements vscode.Disposable { | |||
24 | this.timer || | 26 | this.timer || |
25 | setInterval(() => { | 27 | setInterval(() => { |
26 | if (this.packageName) { | 28 | if (this.packageName) { |
27 | this.statusBarItem!.text = `cargo check [${ | 29 | this.statusBarItem!.text = `cargo ${this.command} [${ |
28 | this.packageName | 30 | this.packageName |
29 | }] ${this.frame()}`; | 31 | }] ${this.frame()}`; |
30 | } else { | 32 | } else { |
31 | this.statusBarItem!.text = `cargo check ${this.frame()}`; | 33 | this.statusBarItem!.text = `cargo ${this.command} ${this.frame()}`; |
32 | } | 34 | } |
33 | }, 300); | 35 | }, 300); |
34 | 36 | ||