Commit 251235a 1 parent 30d166e commit 251235a Copy full SHA for 251235a
File tree 3 files changed +45
-15
lines changed
3 files changed +45
-15
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,6 @@ import {
161
161
TerminalLocation ,
162
162
TerminalExitReason ,
163
163
TerminalProfile ,
164
- TerminalQuickFixType ,
165
164
InlayHint ,
166
165
InlayHintKind ,
167
166
InlayHintLabelPart ,
@@ -199,7 +198,9 @@ import {
199
198
DocumentPasteEdit ,
200
199
ExternalUriOpenerPriority ,
201
200
EditSessionIdentityMatch ,
202
- TerminalOutputAnchor
201
+ TerminalOutputAnchor ,
202
+ TerminalQuickFixExecuteTerminalCommand ,
203
+ TerminalQuickFixOpener
203
204
} from './types-impl' ;
204
205
import { AuthenticationExtImpl } from './authentication-ext' ;
205
206
import { SymbolKind } from '../common/plugin-api-rpc-model' ;
@@ -1391,7 +1392,8 @@ export function createAPIFactory(
1391
1392
TerminalExitReason,
1392
1393
DocumentPasteEdit,
1393
1394
ExternalUriOpenerPriority,
1394
- TerminalQuickFixType,
1395
+ TerminalQuickFixExecuteTerminalCommand,
1396
+ TerminalQuickFixOpener,
1395
1397
EditSessionIdentityMatch
1396
1398
} ;
1397
1399
} ;
Original file line number Diff line number Diff line change @@ -2183,11 +2183,6 @@ export enum TerminalExitReason {
2183
2183
Extension = 4 ,
2184
2184
}
2185
2185
2186
- export enum TerminalQuickFixType {
2187
- command = 'command' ,
2188
- opener = 'opener'
2189
- }
2190
-
2191
2186
@es5ClassCompat
2192
2187
export class FileDecoration {
2193
2188
@@ -3630,3 +3625,27 @@ export enum EditSessionIdentityMatch {
3630
3625
None = 0
3631
3626
}
3632
3627
// #endregion
3628
+
3629
+ // #region terminalQuickFixProvider
3630
+ export class TerminalQuickFixExecuteTerminalCommand {
3631
+ /**
3632
+ * The terminal command to run
3633
+ */
3634
+ terminalCommand : string ;
3635
+ /**
3636
+ * @stubbed
3637
+ */
3638
+ constructor ( terminalCommand : string ) { }
3639
+ }
3640
+ export class TerminalQuickFixOpener {
3641
+ /**
3642
+ * The uri to open
3643
+ */
3644
+ uri : theia . Uri ;
3645
+ /**
3646
+ * @stubbed
3647
+ */
3648
+ constructor ( uri : theia . Uri ) { }
3649
+ }
3650
+
3651
+ // #endregion
Original file line number Diff line number Diff line change 22
22
23
23
export module '@theia/plugin' {
24
24
25
+ export type SingleOrMany < T > = T [ ] | T ;
26
+
25
27
export namespace window {
26
28
/**
27
29
* @param provider A terminal quick fix provider
@@ -37,7 +39,8 @@ export module '@theia/plugin' {
37
39
* @param token A cancellation token indicating the result is no longer needed
38
40
* @return Terminal quick fix(es) if any
39
41
*/
40
- provideTerminalQuickFixes ( commandMatchResult : TerminalCommandMatchResult , token : CancellationToken ) : TerminalQuickFix [ ] | TerminalQuickFix | undefined ;
42
+ provideTerminalQuickFixes ( commandMatchResult : TerminalCommandMatchResult , token : CancellationToken ) :
43
+ ProviderResult < SingleOrMany < TerminalQuickFixExecuteTerminalCommand | TerminalQuickFixOpener | Command > > ;
41
44
}
42
45
43
46
export interface TerminalCommandMatchResult {
@@ -49,13 +52,19 @@ export module '@theia/plugin' {
49
52
} ;
50
53
}
51
54
52
- interface TerminalQuickFix {
53
- type : TerminalQuickFixType ;
55
+ export class TerminalQuickFixExecuteTerminalCommand {
56
+ /**
57
+ * The terminal command to run
58
+ */
59
+ terminalCommand : string ;
60
+ constructor ( terminalCommand : string ) ;
54
61
}
55
-
56
- enum TerminalQuickFixType {
57
- command = 'command' ,
58
- opener = 'opener'
62
+ export class TerminalQuickFixOpener {
63
+ /**
64
+ * The uri to open
65
+ */
66
+ uri : Uri ;
67
+ constructor ( uri : Uri ) ;
59
68
}
60
69
61
70
/**
You can’t perform that action at this time.
0 commit comments