parent
59eac5771b
commit
84a8a567e8
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { commands, ConfigurationTarget, CustomExecution, Disposable, env, Event, EventEmitter, Pseudoterminal, ShellExecution, Task, Task2, TaskDefinition, TaskExecution, TaskProcessStartEvent, tasks, TaskScope, Terminal, UIKind, window, workspace } from 'vscode';
|
||||
import { commands, ConfigurationTarget, CustomExecution, Disposable, env, Event, EventEmitter, Pseudoterminal, ShellExecution, Task, TaskDefinition, TaskExecution, TaskProcessStartEvent, tasks, TaskScope, Terminal, UIKind, window, workspace } from 'vscode';
|
||||
import { assertNoRpc } from '../utils';
|
||||
|
||||
// Disable tasks tests:
|
||||
|
@ -350,7 +350,7 @@ import { assertNoRpc } from '../utils';
|
|||
}
|
||||
], ConfigurationTarget.Workspace);
|
||||
|
||||
const task = <Task2[]>(await tasks.fetchTasks());
|
||||
const task = <Task[]>(await tasks.fetchTasks());
|
||||
|
||||
if (task && task.length > 0) {
|
||||
const grp = task[0].group;
|
||||
|
|
11
src/vs/vscode.d.ts
vendored
11
src/vs/vscode.d.ts
vendored
|
@ -6420,6 +6420,17 @@ declare module 'vscode' {
|
|||
*/
|
||||
static Test: TaskGroup;
|
||||
|
||||
/**
|
||||
* Whether the task that is part of this group is the default for the group.
|
||||
* This property cannot be set through API, and is controlled by a user's task configurations.
|
||||
*/
|
||||
readonly isDefault?: boolean;
|
||||
|
||||
/**
|
||||
* The ID of the task group. Is one of TaskGroup.Clean.id, TaskGroup.Build.id, TaskGroup.Rebuild.id, or TaskGroup.Test.id.
|
||||
*/
|
||||
readonly id: string;
|
||||
|
||||
private constructor(id: string, label: string);
|
||||
}
|
||||
|
||||
|
|
14
src/vs/vscode.proposed.d.ts
vendored
14
src/vs/vscode.proposed.d.ts
vendored
|
@ -1037,20 +1037,6 @@ declare module 'vscode' {
|
|||
}
|
||||
//#endregion
|
||||
|
||||
export class TaskGroup2 {
|
||||
static Clean: TaskGroup2;
|
||||
static Build: TaskGroup2;
|
||||
static Rebuild: TaskGroup2;
|
||||
static Test: TaskGroup2;
|
||||
readonly isDefault?: boolean;
|
||||
readonly id: string;
|
||||
private constructor(id: string, label: string);
|
||||
}
|
||||
|
||||
export class Task2 extends Task {
|
||||
group?: TaskGroup2;
|
||||
}
|
||||
|
||||
//#region Custom editor move https://github.com/microsoft/vscode/issues/86146
|
||||
|
||||
// TODO: Also for custom editor
|
||||
|
|
|
@ -1229,9 +1229,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
|||
SymbolKind: extHostTypes.SymbolKind,
|
||||
SymbolTag: extHostTypes.SymbolTag,
|
||||
Task: extHostTypes.Task,
|
||||
Task2: extHostTypes.Task,
|
||||
TaskGroup: extHostTypes.TaskGroup,
|
||||
TaskGroup2: extHostTypes.TaskGroup,
|
||||
TaskPanelKind: extHostTypes.TaskPanelKind,
|
||||
TaskRevealKind: extHostTypes.TaskRevealKind,
|
||||
TaskScope: extHostTypes.TaskScope,
|
||||
|
|
|
@ -214,7 +214,7 @@ export namespace TaskHandleDTO {
|
|||
}
|
||||
}
|
||||
export namespace TaskGroupDTO {
|
||||
export function from(value: vscode.TaskGroup2): tasks.TaskGroupDTO | undefined {
|
||||
export function from(value: vscode.TaskGroup): tasks.TaskGroupDTO | undefined {
|
||||
if (value === undefined || value === null) {
|
||||
return undefined;
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ export namespace TaskDTO {
|
|||
},
|
||||
execution: execution!,
|
||||
isBackground: value.isBackground,
|
||||
group: TaskGroupDTO.from(value.group as vscode.TaskGroup2),
|
||||
group: TaskGroupDTO.from(value.group as vscode.TaskGroup),
|
||||
presentationOptions: TaskPresentationOptionsDTO.from(value.presentationOptions),
|
||||
problemMatchers: value.problemMatchers,
|
||||
hasDefinedMatchers: (value as types.Task).hasDefinedMatchers,
|
||||
|
|
|
@ -1762,7 +1762,7 @@ export enum TaskPanelKind {
|
|||
}
|
||||
|
||||
@es5ClassCompat
|
||||
export class TaskGroup implements vscode.TaskGroup2 {
|
||||
export class TaskGroup implements vscode.TaskGroup {
|
||||
|
||||
isDefault?: boolean;
|
||||
private _id: string;
|
||||
|
|
Loading…
Reference in a new issue