未验证 提交 69936d59 编写于 作者: A Alex Ross

Properly duplicate TaskGroup

上级 369c6efa
......@@ -8,7 +8,6 @@ import { asPromise } from 'vs/base/common/async';
import { Event, Emitter } from 'vs/base/common/event';
import { MainContext, MainThreadTaskShape, ExtHostTaskShape } from 'vs/workbench/api/common/extHost.protocol';
import * as Objects from 'vs/base/common/objects';
import * as types from 'vs/workbench/api/common/extHostTypes';
import { IExtHostWorkspaceProvider, IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace';
import type * as vscode from 'vscode';
......@@ -320,7 +319,7 @@ export namespace TaskDTO {
if (value.group !== undefined) {
result.group = types.TaskGroup.from(value.group._id);
if (result.group) {
result.group = Objects.deepClone(result.group);
result.group = new types.TaskGroup(result.group.id, result.group.label);
if (value.group.isDefault) {
result.group.isDefault = value.group.isDefault;
}
......
......@@ -1795,11 +1795,11 @@ export class TaskGroup implements vscode.TaskGroup {
}
}
constructor(id: string, _label: string) {
constructor(id: string, public readonly label: string) {
if (typeof id !== 'string') {
throw illegalArgument('name');
}
if (typeof _label !== 'string') {
if (typeof label !== 'string') {
throw illegalArgument('name');
}
this._id = id;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册