forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
34 lines (26 loc) · 1.12 KB
/
types.ts
File metadata and controls
34 lines (26 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { Event, TextEditor, Uri } from 'vscode';
import { IDisposable } from '../common/types';
export const ICodeExecutionService = Symbol('ICodeExecutionService');
export interface ICodeExecutionService {
execute(code: string, resource?: Uri): Promise<void>;
executeFile(file: Uri): Promise<void>;
initializeRepl(resource?: Uri): Promise<void>;
}
export const ICodeExecutionHelper = Symbol('ICodeExecutionHelper');
export interface ICodeExecutionHelper {
normalizeLines(code: string): Promise<string>;
getFileToExecute(): Promise<Uri | undefined>;
saveFileIfDirty(file: Uri): Promise<void>;
getSelectedTextToExecute(textEditor: TextEditor): Promise<string | undefined>;
}
export const ICodeExecutionManager = Symbol('ICodeExecutionManager');
export interface ICodeExecutionManager {
onExecutedCode: Event<string>;
registerCommands(): void;
}
export const ITerminalAutoActivation = Symbol('ITerminalAutoActivation');
export interface ITerminalAutoActivation extends IDisposable {
register(): void;
}