From 86f3a07e2981a09e4ddf8e4ef73dec456e7e6600 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 26 Sep 2019 16:34:17 +0200 Subject: [PATCH] debt - rename platform/history => workspacesHistory --- src/vs/code/electron-main/app.ts | 4 +-- src/vs/code/electron-main/windows.ts | 12 ++++---- .../electron-main/electronMainService.ts | 18 +++++------ src/vs/platform/electron/node/electron.ts | 2 +- .../platform/menubar/electron-main/menubar.ts | 8 ++--- .../common/workspacesHistory.ts} | 0 .../common/workspacesHistoryStorage.ts} | 2 +- .../workspacesHistoryMainService.ts} | 30 +++++++++---------- .../workspacesHistoryStorage.test.ts} | 6 ++-- src/vs/workbench/api/common/apiCommands.ts | 2 +- .../browser/actions/windowActions.ts | 2 +- src/vs/workbench/browser/dnd.ts | 2 +- .../browser/parts/titlebar/menubarControl.ts | 2 +- .../welcome/page/browser/welcomePage.ts | 2 +- .../browser/workspacesHistoryService.ts | 4 +-- .../common/workspacesHistoryService.ts | 2 +- .../workspacesHistoryService.ts | 2 +- 17 files changed, 50 insertions(+), 50 deletions(-) rename src/vs/platform/{history/common/history.ts => workspaces/common/workspacesHistory.ts} (100%) rename src/vs/platform/{history/common/historyStorage.ts => workspaces/common/workspacesHistoryStorage.ts} (98%) rename src/vs/platform/{history/electron-main/historyMainService.ts => workspaces/electron-main/workspacesHistoryMainService.ts} (91%) rename src/vs/platform/{history/test/electron-main/historyStorage.test.ts => workspaces/test/electron-main/workspacesHistoryStorage.test.ts} (98%) diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 0bf36e8c20a..b967000c867 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -64,7 +64,7 @@ import { GlobalStorageDatabaseChannel } from 'vs/platform/storage/node/storageIp import { startsWith } from 'vs/base/common/strings'; import { BackupMainService } from 'vs/platform/backup/electron-main/backupMainService'; import { IBackupMainService } from 'vs/platform/backup/electron-main/backup'; -import { HistoryMainService, IHistoryMainService } from 'vs/platform/history/electron-main/historyMainService'; +import { WorkspacesHistoryMainService, IWorkspacesHistoryMainService } from 'vs/platform/workspaces/electron-main/workspacesHistoryMainService'; import { URLService } from 'vs/platform/url/node/urlService'; import { WorkspacesMainService, IWorkspacesMainService } from 'vs/platform/workspaces/electron-main/workspacesMainService'; import { statSync } from 'fs'; @@ -466,7 +466,7 @@ export class CodeApplication extends Disposable { const backupMainService = new BackupMainService(this.environmentService, this.configurationService, this.logService); services.set(IBackupMainService, backupMainService); - services.set(IHistoryMainService, new SyncDescriptor(HistoryMainService)); + services.set(IWorkspacesHistoryMainService, new SyncDescriptor(WorkspacesHistoryMainService)); services.set(IURLService, new SyncDescriptor(URLService)); services.set(IWorkspacesMainService, new SyncDescriptor(WorkspacesMainService)); diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index ded45e47860..7594f0e179c 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -24,8 +24,8 @@ import { Event as CommonEvent, Emitter } from 'vs/base/common/event'; import product from 'vs/platform/product/common/product'; import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { IWindowsMainService, IOpenConfiguration, IWindowsCountChangedEvent, ICodeWindow, IWindowState as ISingleWindowState, WindowMode } from 'vs/platform/windows/electron-main/windows'; -import { IRecent } from 'vs/platform/history/common/history'; -import { IHistoryMainService } from 'vs/platform/history/electron-main/historyMainService'; +import { IRecent } from 'vs/platform/workspaces/common/workspacesHistory'; +import { IWorkspacesHistoryMainService } from 'vs/platform/workspaces/electron-main/workspacesHistoryMainService'; import { IProcessEnvironment, isMacintosh, isWindows } from 'vs/base/common/platform'; import { IWorkspaceIdentifier, WORKSPACE_FILTER, isSingleFolderWorkspaceIdentifier, hasWorkspaceFileExtension, IEnterWorkspaceResult } from 'vs/platform/workspaces/common/workspaces'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -192,7 +192,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService { @IBackupMainService private readonly backupMainService: IBackupMainService, @ITelemetryService private readonly telemetryService: ITelemetryService, @IConfigurationService private readonly configurationService: IConfigurationService, - @IHistoryMainService private readonly historyMainService: IHistoryMainService, + @IWorkspacesHistoryMainService private readonly workspacesHistoryMainService: IWorkspacesHistoryMainService, @IWorkspacesMainService private readonly workspacesMainService: IWorkspacesMainService, @IInstantiationService private readonly instantiationService: IInstantiationService ) { @@ -508,7 +508,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService { recents.push({ label: pathToOpen.label, fileUri: pathToOpen.fileUri }); } } - this.historyMainService.addRecentlyOpened(recents); + this.workspacesHistoryMainService.addRecentlyOpened(recents); } // If we got started with --wait from the CLI, we need to signal to the outside when the window @@ -1128,7 +1128,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService { } } catch (error) { const fileUri = URI.file(candidate); - this.historyMainService.removeFromRecentlyOpened([fileUri]); // since file does not seem to exist anymore, remove from recent + this.workspacesHistoryMainService.removeFromRecentlyOpened([fileUri]); // since file does not seem to exist anymore, remove from recent // assume this is a file that does not yet exist if (options && options.ignoreFileNotFound) { @@ -1589,7 +1589,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService { private doEnterWorkspace(win: ICodeWindow, result: IEnterWorkspaceResult): IEnterWorkspaceResult { // Mark as recently opened - this.historyMainService.addRecentlyOpened([{ workspace: result.workspace }]); + this.workspacesHistoryMainService.addRecentlyOpened([{ workspace: result.workspace }]); // Trigger Eevent to indicate load of workspace into window this._onWindowReady.fire(win); diff --git a/src/vs/platform/electron/electron-main/electronMainService.ts b/src/vs/platform/electron/electron-main/electronMainService.ts index e41a9fec8f6..b1de1e67ce1 100644 --- a/src/vs/platform/electron/electron-main/electronMainService.ts +++ b/src/vs/platform/electron/electron-main/electronMainService.ts @@ -13,8 +13,8 @@ import { IElectronService } from 'vs/platform/electron/node/electron'; import { ISerializableCommandAction } from 'vs/platform/actions/common/actions'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; import { AddFirstParameterToFunctions } from 'vs/base/common/types'; -import { IHistoryMainService } from 'vs/platform/history/electron-main/historyMainService'; -import { IRecentlyOpened, IRecent } from 'vs/platform/history/common/history'; +import { IWorkspacesHistoryMainService } from 'vs/platform/workspaces/electron-main/workspacesHistoryMainService'; +import { IRecentlyOpened, IRecent } from 'vs/platform/workspaces/common/workspacesHistory'; import { URI } from 'vs/base/common/uri'; export class ElectronMainService implements AddFirstParameterToFunctions /* only methods, not events */, number /* window ID */> { @@ -25,7 +25,7 @@ export class ElectronMainService implements AddFirstParameterToFunctions { const window = this.windowsMainService.getWindowById(windowId); if (window) { - return this.historyMainService.getRecentlyOpened(window.config.workspace, window.config.folderUri, window.config.filesToOpenOrCreate); + return this.workspacesHistoryMainService.getRecentlyOpened(window.config.workspace, window.config.folderUri, window.config.filesToOpenOrCreate); } - return this.historyMainService.getRecentlyOpened(); + return this.workspacesHistoryMainService.getRecentlyOpened(); } async addRecentlyOpened(windowId: number, recents: IRecent[]): Promise { - return this.historyMainService.addRecentlyOpened(recents); + return this.workspacesHistoryMainService.addRecentlyOpened(recents); } async removeFromRecentlyOpened(windowId: number, paths: URI[]): Promise { - return this.historyMainService.removeFromRecentlyOpened(paths); + return this.workspacesHistoryMainService.removeFromRecentlyOpened(paths); } async clearRecentlyOpened(windowId: number): Promise { - return this.historyMainService.clearRecentlyOpened(); + return this.workspacesHistoryMainService.clearRecentlyOpened(); } //#endregion diff --git a/src/vs/platform/electron/node/electron.ts b/src/vs/platform/electron/node/electron.ts index bd022df1de7..ed08805fff3 100644 --- a/src/vs/platform/electron/node/electron.ts +++ b/src/vs/platform/electron/node/electron.ts @@ -8,7 +8,7 @@ import { MessageBoxOptions, MessageBoxReturnValue, OpenDevToolsOptions, SaveDial import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { INativeOpenDialogOptions, IWindowOpenable, IOpenInWindowOptions, IOpenedWindow, IOpenEmptyWindowOptions } from 'vs/platform/windows/common/windows'; import { ISerializableCommandAction } from 'vs/platform/actions/common/actions'; -import { IRecentlyOpened, IRecent } from 'vs/platform/history/common/history'; +import { IRecentlyOpened, IRecent } from 'vs/platform/workspaces/common/workspacesHistory'; import { URI } from 'vs/base/common/uri'; import { ParsedArgs } from 'vscode-minimist'; import { IProcessEnvironment } from 'vs/base/common/platform'; diff --git a/src/vs/platform/menubar/electron-main/menubar.ts b/src/vs/platform/menubar/electron-main/menubar.ts index d5e449cd854..972f59a0f50 100644 --- a/src/vs/platform/menubar/electron-main/menubar.ts +++ b/src/vs/platform/menubar/electron-main/menubar.ts @@ -16,7 +16,7 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import { ILogService } from 'vs/platform/log/common/log'; import { mnemonicMenuLabel as baseMnemonicLabel } from 'vs/base/common/labels'; import { IWindowsMainService, IWindowsCountChangedEvent } from 'vs/platform/windows/electron-main/windows'; -import { IHistoryMainService } from 'vs/platform/history/electron-main/historyMainService'; +import { IWorkspacesHistoryMainService } from 'vs/platform/workspaces/electron-main/workspacesHistoryMainService'; import { IMenubarData, IMenubarKeybinding, MenubarMenuItem, isMenubarMenuItemSeparator, isMenubarMenuItemSubmenu, isMenubarMenuItemAction, IMenubarMenu, isMenubarMenuItemUriAction } from 'vs/platform/menubar/node/menubar'; import { URI } from 'vs/base/common/uri'; import { IStateService } from 'vs/platform/state/common/state'; @@ -66,7 +66,7 @@ export class Menubar { @IWindowsMainService private readonly windowsMainService: IWindowsMainService, @IEnvironmentService private readonly environmentService: IEnvironmentService, @ITelemetryService private readonly telemetryService: ITelemetryService, - @IHistoryMainService private readonly historyMainService: IHistoryMainService, + @IWorkspacesHistoryMainService private readonly workspacesHistoryMainService: IWorkspacesHistoryMainService, @IStateService private readonly stateService: IStateService, @ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService, @ILogService private readonly logService: ILogService @@ -115,7 +115,7 @@ export class Menubar { this.fallbackMenuHandlers['workbench.action.openWorkspace'] = (menuItem, win, event) => this.windowsMainService.pickWorkspaceAndOpen({ forceNewWindow: this.isOptionClick(event), telemetryExtraData: { from: telemetryFrom } }); // Recent Menu Items - this.fallbackMenuHandlers['workbench.action.clearRecentFiles'] = () => this.historyMainService.clearRecentlyOpened(); + this.fallbackMenuHandlers['workbench.action.clearRecentFiles'] = () => this.workspacesHistoryMainService.clearRecentlyOpened(); // Help Menu Items const twitterUrl = product.twitterUrl; @@ -488,7 +488,7 @@ export class Menubar { }).length > 0; if (!success) { - this.historyMainService.removeFromRecentlyOpened([revivedUri]); + this.workspacesHistoryMainService.removeFromRecentlyOpened([revivedUri]); } } }, false)); diff --git a/src/vs/platform/history/common/history.ts b/src/vs/platform/workspaces/common/workspacesHistory.ts similarity index 100% rename from src/vs/platform/history/common/history.ts rename to src/vs/platform/workspaces/common/workspacesHistory.ts diff --git a/src/vs/platform/history/common/historyStorage.ts b/src/vs/platform/workspaces/common/workspacesHistoryStorage.ts similarity index 98% rename from src/vs/platform/history/common/historyStorage.ts rename to src/vs/platform/workspaces/common/workspacesHistoryStorage.ts index b026460963d..5cb8920e670 100644 --- a/src/vs/platform/history/common/historyStorage.ts +++ b/src/vs/platform/workspaces/common/workspacesHistoryStorage.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { UriComponents, URI } from 'vs/base/common/uri'; -import { IRecentlyOpened, isRecentFolder } from 'vs/platform/history/common/history'; +import { IRecentlyOpened, isRecentFolder } from 'vs/platform/workspaces/common/workspacesHistory'; import { ILogService } from 'vs/platform/log/common/log'; interface ISerializedRecentlyOpened { diff --git a/src/vs/platform/history/electron-main/historyMainService.ts b/src/vs/platform/workspaces/electron-main/workspacesHistoryMainService.ts similarity index 91% rename from src/vs/platform/history/electron-main/historyMainService.ts rename to src/vs/platform/workspaces/electron-main/workspacesHistoryMainService.ts index 54ca0d95c81..41adccf6ef8 100644 --- a/src/vs/platform/history/electron-main/historyMainService.ts +++ b/src/vs/platform/workspaces/electron-main/workspacesHistoryMainService.ts @@ -14,21 +14,21 @@ import { Event as CommonEvent, Emitter } from 'vs/base/common/event'; import { isWindows, isMacintosh } from 'vs/base/common/platform'; import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; import { IWorkspacesMainService } from 'vs/platform/workspaces/electron-main/workspacesMainService'; -import { IRecentlyOpened, isRecentWorkspace, isRecentFolder, IRecent, isRecentFile, IRecentFolder, IRecentWorkspace, IRecentFile } from 'vs/platform/history/common/history'; +import { IRecentlyOpened, isRecentWorkspace, isRecentFolder, IRecent, isRecentFile, IRecentFolder, IRecentWorkspace, IRecentFile } from 'vs/platform/workspaces/common/workspacesHistory'; import { ThrottledDelayer } from 'vs/base/common/async'; import { isEqual as areResourcesEqual, dirname, originalFSPath, basename } from 'vs/base/common/resources'; import { URI } from 'vs/base/common/uri'; import { Schemas } from 'vs/base/common/network'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { getSimpleWorkspaceLabel } from 'vs/platform/label/common/label'; -import { toStoreData, restoreRecentlyOpened, RecentlyOpenedStorageData } from 'vs/platform/history/common/historyStorage'; +import { toStoreData, restoreRecentlyOpened, RecentlyOpenedStorageData } from 'vs/platform/workspaces/common/workspacesHistoryStorage'; import { exists } from 'vs/base/node/pfs'; import { ILifecycleMainService, LifecycleMainPhase } from 'vs/platform/lifecycle/electron-main/lifecycleMainService'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -export const IHistoryMainService = createDecorator('historyMainService'); +export const IWorkspacesHistoryMainService = createDecorator('workspacesHistoryMainService'); -export interface IHistoryMainService { +export interface IWorkspacesHistoryMainService { _serviceBrand: undefined; @@ -42,7 +42,7 @@ export interface IHistoryMainService { updateWindowsJumpList(): void; } -export class HistoryMainService implements IHistoryMainService { +export class WorkspacesHistoryMainService implements IWorkspacesHistoryMainService { private static readonly MAX_TOTAL_RECENT_ENTRIES = 100; @@ -108,7 +108,7 @@ export class HistoryMainService implements IHistoryMainService { // File else { const alreadyExistsInHistory = indexOfFile(files, curr.fileUri) >= 0; - const shouldBeFiltered = curr.fileUri.scheme === Schemas.file && HistoryMainService.COMMON_FILES_FILTER.indexOf(basename(curr.fileUri)) >= 0; + const shouldBeFiltered = curr.fileUri.scheme === Schemas.file && WorkspacesHistoryMainService.COMMON_FILES_FILTER.indexOf(basename(curr.fileUri)) >= 0; if (!alreadyExistsInHistory && !shouldBeFiltered) { files.push(curr); @@ -123,12 +123,12 @@ export class HistoryMainService implements IHistoryMainService { this.addEntriesFromStorage(workspaces, files); - if (workspaces.length > HistoryMainService.MAX_TOTAL_RECENT_ENTRIES) { - workspaces.length = HistoryMainService.MAX_TOTAL_RECENT_ENTRIES; + if (workspaces.length > WorkspacesHistoryMainService.MAX_TOTAL_RECENT_ENTRIES) { + workspaces.length = WorkspacesHistoryMainService.MAX_TOTAL_RECENT_ENTRIES; } - if (files.length > HistoryMainService.MAX_TOTAL_RECENT_ENTRIES) { - files.length = HistoryMainService.MAX_TOTAL_RECENT_ENTRIES; + if (files.length > WorkspacesHistoryMainService.MAX_TOTAL_RECENT_ENTRIES) { + files.length = WorkspacesHistoryMainService.MAX_TOTAL_RECENT_ENTRIES; } this.saveRecentlyOpened({ workspaces, files }); @@ -180,7 +180,7 @@ export class HistoryMainService implements IHistoryMainService { // Collect max-N recent workspaces that are known to exist const workspaceEntries: string[] = []; let entries = 0; - for (let i = 0; i < mru.workspaces.length && entries < HistoryMainService.MAX_MACOS_DOCK_RECENT_WORKSPACES; i++) { + for (let i = 0; i < mru.workspaces.length && entries < WorkspacesHistoryMainService.MAX_MACOS_DOCK_RECENT_WORKSPACES; i++) { const loc = location(mru.workspaces[i]); if (loc.scheme === Schemas.file) { const workspacePath = originalFSPath(loc); @@ -193,12 +193,12 @@ export class HistoryMainService implements IHistoryMainService { // Collect max-N recent files that are known to exist const fileEntries: string[] = []; - for (let i = 0; i < mru.files.length && entries < HistoryMainService.MAX_MACOS_DOCK_RECENT_ENTRIES_TOTAL; i++) { + for (let i = 0; i < mru.files.length && entries < WorkspacesHistoryMainService.MAX_MACOS_DOCK_RECENT_ENTRIES_TOTAL; i++) { const loc = location(mru.files[i]); if (loc.scheme === Schemas.file) { const filePath = originalFSPath(loc); if ( - HistoryMainService.COMMON_FILES_FILTER.indexOf(basename(loc)) !== -1 || // skip some well known file entries + WorkspacesHistoryMainService.COMMON_FILES_FILTER.indexOf(basename(loc)) !== -1 || // skip some well known file entries workspaceEntries.indexOf(filePath) !== -1 // prefer a workspace entry over a file entry (e.g. for .code-workspace) ) { continue; @@ -285,7 +285,7 @@ export class HistoryMainService implements IHistoryMainService { } private getRecentlyOpenedFromStorage(): IRecentlyOpened { - const storedRecents = this.stateService.getItem(HistoryMainService.recentlyOpenedStorageKey); + const storedRecents = this.stateService.getItem(WorkspacesHistoryMainService.recentlyOpenedStorageKey); return restoreRecentlyOpened(storedRecents, this.logService); } @@ -293,7 +293,7 @@ export class HistoryMainService implements IHistoryMainService { private saveRecentlyOpened(recent: IRecentlyOpened): void { const serialized = toStoreData(recent); - this.stateService.setItem(HistoryMainService.recentlyOpenedStorageKey, serialized); + this.stateService.setItem(WorkspacesHistoryMainService.recentlyOpenedStorageKey, serialized); } updateWindowsJumpList(): void { diff --git a/src/vs/platform/history/test/electron-main/historyStorage.test.ts b/src/vs/platform/workspaces/test/electron-main/workspacesHistoryStorage.test.ts similarity index 98% rename from src/vs/platform/history/test/electron-main/historyStorage.test.ts rename to src/vs/platform/workspaces/test/electron-main/workspacesHistoryStorage.test.ts index 4a76b1515ea..c72e6c3af36 100644 --- a/src/vs/platform/history/test/electron-main/historyStorage.test.ts +++ b/src/vs/platform/workspaces/test/electron-main/workspacesHistoryStorage.test.ts @@ -8,8 +8,8 @@ import * as path from 'vs/base/common/path'; import { IWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; import { URI } from 'vs/base/common/uri'; -import { IRecentlyOpened, isRecentFolder, IRecentFolder, IRecentWorkspace } from 'vs/platform/history/common/history'; -import { toStoreData, restoreRecentlyOpened } from 'vs/platform/history/common/historyStorage'; +import { IRecentlyOpened, isRecentFolder, IRecentFolder, IRecentWorkspace } from 'vs/platform/workspaces/common/workspacesHistory'; +import { toStoreData, restoreRecentlyOpened } from 'vs/platform/workspaces/common/workspacesHistoryStorage'; import { NullLogService } from 'vs/platform/log/common/log'; function toWorkspace(uri: URI): IWorkspaceIdentifier { @@ -221,4 +221,4 @@ suite('History Storage', () => { }); -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/api/common/apiCommands.ts b/src/vs/workbench/api/common/apiCommands.ts index 514029c322b..f6f6262fd89 100644 --- a/src/vs/workbench/api/common/apiCommands.ts +++ b/src/vs/workbench/api/common/apiCommands.ts @@ -14,7 +14,7 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation import { IOpenInWindowOptions, IWindowOpenable } from 'vs/platform/windows/common/windows'; import { IWorkspacesHistoryService } from 'vs/workbench/services/workspace/common/workspacesHistoryService'; import { IWorkspacesService, hasWorkspaceFileExtension } from 'vs/platform/workspaces/common/workspaces'; -import { IRecent } from 'vs/platform/history/common/history'; +import { IRecent } from 'vs/platform/workspaces/common/workspacesHistory'; import { Schemas } from 'vs/base/common/network'; // ----------------------------------------------------------------- diff --git a/src/vs/workbench/browser/actions/windowActions.ts b/src/vs/workbench/browser/actions/windowActions.ts index fe81c4758f1..93c49e2338d 100644 --- a/src/vs/workbench/browser/actions/windowActions.ts +++ b/src/vs/workbench/browser/actions/windowActions.ts @@ -22,7 +22,7 @@ import { ILabelService } from 'vs/platform/label/common/label'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IModelService } from 'vs/editor/common/services/modelService'; import { IModeService } from 'vs/editor/common/services/modeService'; -import { IRecentWorkspace, IRecentFolder, IRecentFile, IRecent, isRecentFolder, isRecentWorkspace } from 'vs/platform/history/common/history'; +import { IRecentWorkspace, IRecentFolder, IRecentFile, IRecent, isRecentFolder, isRecentWorkspace } from 'vs/platform/workspaces/common/workspacesHistory'; import { URI } from 'vs/base/common/uri'; import { getIconClasses } from 'vs/editor/common/services/getIconClasses'; import { FileKind } from 'vs/platform/files/common/files'; diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts index 057c0523911..6d7633b28e1 100644 --- a/src/vs/workbench/browser/dnd.ts +++ b/src/vs/workbench/browser/dnd.ts @@ -29,7 +29,7 @@ import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/co import { Disposable } from 'vs/base/common/lifecycle'; import { addDisposableListener, EventType } from 'vs/base/browser/dom'; import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService'; -import { IRecentFile } from 'vs/platform/history/common/history'; +import { IRecentFile } from 'vs/platform/workspaces/common/workspacesHistory'; import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing'; import { withNullAsUndefined } from 'vs/base/common/types'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; diff --git a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts index bc3a6e89d5c..a137622ff0f 100644 --- a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts +++ b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts @@ -17,7 +17,7 @@ import { isMacintosh, isWeb } from 'vs/base/common/platform'; import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; import { Event, Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; -import { IRecentlyOpened, isRecentFolder, IRecent, isRecentWorkspace } from 'vs/platform/history/common/history'; +import { IRecentlyOpened, isRecentFolder, IRecent, isRecentWorkspace } from 'vs/platform/workspaces/common/workspacesHistory'; import { RunOnceScheduler } from 'vs/base/common/async'; import { MENUBAR_SELECTION_FOREGROUND, MENUBAR_SELECTION_BACKGROUND, MENUBAR_SELECTION_BORDER, TITLE_BAR_ACTIVE_FOREGROUND, TITLE_BAR_INACTIVE_FOREGROUND, ACTIVITY_BAR_FOREGROUND, ACTIVITY_BAR_INACTIVE_FOREGROUND } from 'vs/workbench/common/theme'; import { URI } from 'vs/base/common/uri'; diff --git a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts index 8ebf9c642b7..5ef09e54474 100644 --- a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts +++ b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts @@ -41,7 +41,7 @@ import { ILabelService } from 'vs/platform/label/common/label'; import { IFileService } from 'vs/platform/files/common/files'; import { ExtensionType } from 'vs/platform/extensions/common/extensions'; import { joinPath } from 'vs/base/common/resources'; -import { IRecentlyOpened, isRecentWorkspace, IRecentWorkspace, IRecentFolder, isRecentFolder } from 'vs/platform/history/common/history'; +import { IRecentlyOpened, isRecentWorkspace, IRecentWorkspace, IRecentFolder, isRecentFolder } from 'vs/platform/workspaces/common/workspacesHistory'; import { CancellationToken } from 'vs/base/common/cancellation'; import { IHostService } from 'vs/workbench/services/host/browser/host'; diff --git a/src/vs/workbench/services/workspace/browser/workspacesHistoryService.ts b/src/vs/workbench/services/workspace/browser/workspacesHistoryService.ts index af589cdb5a1..d92d1eafec2 100644 --- a/src/vs/workbench/services/workspace/browser/workspacesHistoryService.ts +++ b/src/vs/workbench/services/workspace/browser/workspacesHistoryService.ts @@ -5,9 +5,9 @@ import { Event, Emitter } from 'vs/base/common/event'; import { URI } from 'vs/base/common/uri'; -import { IRecent, IRecentlyOpened, isRecentFolder, isRecentFile } from 'vs/platform/history/common/history'; +import { IRecent, IRecentlyOpened, isRecentFolder, isRecentFile } from 'vs/platform/workspaces/common/workspacesHistory'; import { IWorkspacesHistoryService } from 'vs/workbench/services/workspace/common/workspacesHistoryService'; -import { restoreRecentlyOpened, toStoreData } from 'vs/platform/history/common/historyStorage'; +import { restoreRecentlyOpened, toStoreData } from 'vs/platform/workspaces/common/workspacesHistoryStorage'; import { StorageScope, IStorageService } from 'vs/platform/storage/common/storage'; import { WorkbenchState, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ILogService } from 'vs/platform/log/common/log'; diff --git a/src/vs/workbench/services/workspace/common/workspacesHistoryService.ts b/src/vs/workbench/services/workspace/common/workspacesHistoryService.ts index b67c8859d0b..2d07184a4ae 100644 --- a/src/vs/workbench/services/workspace/common/workspacesHistoryService.ts +++ b/src/vs/workbench/services/workspace/common/workspacesHistoryService.ts @@ -6,7 +6,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Event } from 'vs/base/common/event'; import { URI } from 'vs/base/common/uri'; -import { IRecent, IRecentlyOpened } from 'vs/platform/history/common/history'; +import { IRecent, IRecentlyOpened } from 'vs/platform/workspaces/common/workspacesHistory'; export const IWorkspacesHistoryService = createDecorator('workspacesHistoryService'); diff --git a/src/vs/workbench/services/workspace/electron-browser/workspacesHistoryService.ts b/src/vs/workbench/services/workspace/electron-browser/workspacesHistoryService.ts index b8a8211be2a..ccc758eacd1 100644 --- a/src/vs/workbench/services/workspace/electron-browser/workspacesHistoryService.ts +++ b/src/vs/workbench/services/workspace/electron-browser/workspacesHistoryService.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { URI } from 'vs/base/common/uri'; -import { IRecent, IRecentlyOpened } from 'vs/platform/history/common/history'; +import { IRecent, IRecentlyOpened } from 'vs/platform/workspaces/common/workspacesHistory'; import { IWorkspacesHistoryService } from 'vs/workbench/services/workspace/common/workspacesHistoryService'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { IElectronService } from 'vs/platform/electron/node/electron';