本文整理汇总了TypeScript中vs/platform/workspaces/common/workspaces.reviveWorkspaceIdentifier函数的典型用法代码示例。如果您正苦于以下问题:TypeScript reviveWorkspaceIdentifier函数的具体用法?TypeScript reviveWorkspaceIdentifier怎么用?TypeScript reviveWorkspaceIdentifier使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了reviveWorkspaceIdentifier函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: reviveUris
private reviveUris() {
if (this.configuration.folderUri) {
this.configuration.folderUri = URI.revive(this.configuration.folderUri);
}
if (this.configuration.workspace) {
this.configuration.workspace = reviveWorkspaceIdentifier(this.configuration.workspace);
}
const filesToWait = this.configuration.filesToWait;
const filesToWaitPaths = filesToWait && filesToWait.paths;
[filesToWaitPaths, this.configuration.filesToOpenOrCreate, this.configuration.filesToDiff].forEach(paths => {
if (Array.isArray(paths)) {
paths.forEach(path => {
if (path.fileUri) {
path.fileUri = URI.revive(path.fileUri);
}
});
}
});
if (filesToWait) {
filesToWait.waitMarkerFileUri = URI.revive(filesToWait.waitMarkerFileUri);
}
}
示例2: if
case 'addRecentlyOpened': return this.service.addRecentlyOpened(arg.map((recent: IRecent) => {
if (isRecentFile(recent)) {
recent.fileUri = URI.revive(recent.fileUri);
} else if (isRecentFolder(recent)) {
recent.folderUri = URI.revive(recent.folderUri);
} else {
recent.workspace = reviveWorkspaceIdentifier(recent.workspace);
}
return recent;
}));