提交 52e8de79 编写于 作者: A Alex Ross

More task ID fixing

上级 200da727
......@@ -2080,12 +2080,13 @@ class ConfigurationParser {
}
let uuidMaps: Map<TaskConfigSource, Map<string, UUIDMap>> = new Map();
let recentUuidMaps: Map<string, UUIDMap> = new Map();
let recentUuidMaps: Map<TaskConfigSource, Map<string, UUIDMap>> = new Map();
export function parse(workspaceFolder: IWorkspaceFolder, workspace: IWorkspace | undefined, platform: Platform, configuration: ExternalTaskRunnerConfiguration, logger: IProblemReporter, source: TaskConfigSource, isRecents: boolean = false): ParseResult {
let selectedUuidMaps = isRecents ? recentUuidMaps : uuidMaps.get(source);
let recentOrOtherMaps = isRecents ? recentUuidMaps : uuidMaps;
let selectedUuidMaps = recentOrOtherMaps.get(source);
if (!selectedUuidMaps) {
uuidMaps.set(source, new Map());
selectedUuidMaps = uuidMaps.get(source)!;
recentOrOtherMaps.set(source, new Map());
selectedUuidMaps = recentOrOtherMaps.get(source)!;
}
let uuidMap = selectedUuidMaps.get(workspaceFolder.uri.toString());
if (!uuidMap) {
......
......@@ -725,7 +725,7 @@ export class CustomTask extends CommonTask {
public getMapKey(): string {
let workspaceFolder = this._source.config.workspaceFolder;
return workspaceFolder ? `${workspaceFolder.uri.toString()}|${this._id}` : this._id;
return workspaceFolder ? `${workspaceFolder.uri.toString()}|${this._id}|${this.instance}` : `${this._id}|${this.instance}`;
}
public getRecentlyUsedKey(): string | undefined {
......@@ -843,8 +843,8 @@ export class ContributedTask extends CommonTask {
public getMapKey(): string {
let workspaceFolder = this._source.workspaceFolder;
return workspaceFolder
? `${this._source.scope.toString()}|${workspaceFolder.uri.toString()}|${this._id}`
: `${this._source.scope.toString()}|${this._id}`;
? `${this._source.scope.toString()}|${workspaceFolder.uri.toString()}|${this._id}|${this.instance}`
: `${this._source.scope.toString()}|${this._id}|${this.instance}`;
}
public getRecentlyUsedKey(): string | undefined {
......@@ -899,6 +899,10 @@ export class InMemoryTask extends CommonTask {
return 'composite';
}
public getMapKey(): string {
return `${this._id}|${this.instance}`;
}
protected fromObject(object: InMemoryTask): InMemoryTask {
return new InMemoryTask(object._id, object._source, object._label, object.type, object.runOptions, object.configurationProperties);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册