IUriLabelService -> ILabelService

This commit is contained in:
isidor
2018-08-23 12:57:22 +02:00
parent de38bb2ea3
commit 9a57f2e00b
46 changed files with 190 additions and 190 deletions

View File

@@ -63,7 +63,7 @@ import { serve as serveDriver } from 'vs/platform/driver/electron-main/driver';
import { IMenubarService } from 'vs/platform/menubar/common/menubar';
import { MenubarService } from 'vs/platform/menubar/electron-main/menubarService';
import { MenubarChannel } from 'vs/platform/menubar/node/menubarIpc';
import { IUriLabelService } from 'vs/platform/uriLabel/common/uriLabel';
import { ILabelService } from 'vs/platform/label/common/label';
import { CodeMenu } from 'vs/code/electron-main/menus';
import { hasArgs } from 'vs/platform/environment/node/argv';
import { RunOnceScheduler } from 'vs/base/common/async';
@@ -90,7 +90,7 @@ export class CodeApplication {
@IConfigurationService private configurationService: ConfigurationService,
@IStateService private stateService: IStateService,
@IHistoryMainService private historyMainService: IHistoryMainService,
@IUriLabelService private uriLabelService: IUriLabelService
@ILabelService private labelService: ILabelService
) {
this.toDispose = [mainIpcServer, configurationService];
@@ -228,8 +228,8 @@ export class CodeApplication {
}
});
ipc.on('vscode:uriLabelRegisterFormater', (event: any, { scheme, formater }) => {
this.uriLabelService.registerFormater(scheme, formater);
ipc.on('vscode:labelRegisterFormater', (event: any, { scheme, formater }) => {
this.labelService.registerFormater(scheme, formater);
});
// Keyboard layout changes

View File

@@ -50,7 +50,7 @@ import { uploadLogs } from 'vs/code/electron-main/logUploader';
import { setUnexpectedErrorHandler } from 'vs/base/common/errors';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { CommandLineDialogService } from 'vs/platform/dialogs/node/dialogService';
import { IUriLabelService, UriLabelService } from 'vs/platform/uriLabel/common/uriLabel';
import { ILabelService, LabelService } from 'vs/platform/label/common/label';
function createServices(args: ParsedArgs, bufferLogService: BufferLogService): IInstantiationService {
const services = new ServiceCollection();
@@ -58,7 +58,7 @@ function createServices(args: ParsedArgs, bufferLogService: BufferLogService): I
const environmentService = new EnvironmentService(args, process.execPath);
const consoleLogService = new ConsoleLogMainService(getLogLevel(environmentService));
const logService = new MultiplexLogService([consoleLogService, bufferLogService]);
const uriLabelService = new UriLabelService(environmentService, undefined);
const labelService = new LabelService(environmentService, undefined);
process.once('exit', () => logService.dispose());
@@ -66,7 +66,7 @@ function createServices(args: ParsedArgs, bufferLogService: BufferLogService): I
setTimeout(() => cleanupOlderLogs(environmentService).then(null, err => console.error(err)), 10000);
services.set(IEnvironmentService, environmentService);
services.set(IUriLabelService, uriLabelService);
services.set(ILabelService, labelService);
services.set(ILogService, logService);
services.set(IWorkspacesMainService, new SyncDescriptor(WorkspacesMainService));
services.set(IHistoryMainService, new SyncDescriptor(HistoryMainService));

View File

@@ -22,7 +22,7 @@ import { IHistoryMainService } from 'vs/platform/history/common/history';
import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier, isWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
import { IMenubarData, IMenubarKeybinding, MenubarMenuItem, isMenubarMenuItemSeparator, isMenubarMenuItemSubmenu, isMenubarMenuItemAction } from 'vs/platform/menubar/common/menubar';
import URI from 'vs/base/common/uri';
import { IUriLabelService } from 'vs/platform/uriLabel/common/uriLabel';
import { ILabelService } from 'vs/platform/label/common/label';
const telemetryFrom = 'menu';
@@ -49,7 +49,7 @@ export class Menubar {
@IEnvironmentService private environmentService: IEnvironmentService,
@ITelemetryService private telemetryService: ITelemetryService,
@IHistoryMainService private historyMainService: IHistoryMainService,
@IUriLabelService private uriLabelService: IUriLabelService
@ILabelService private labelService: ILabelService
) {
this.menuUpdater = new RunOnceScheduler(() => this.doUpdateMenu(), 0);
@@ -563,13 +563,13 @@ export class Menubar {
let label: string;
let uri: URI;
if (isSingleFolderWorkspaceIdentifier(workspaceOrFile) && !isFile) {
label = unmnemonicLabel(this.uriLabelService.getWorkspaceLabel(workspaceOrFile, { verbose: true }));
label = unmnemonicLabel(this.labelService.getWorkspaceLabel(workspaceOrFile, { verbose: true }));
uri = workspaceOrFile;
} else if (isWorkspaceIdentifier(workspaceOrFile)) {
label = this.uriLabelService.getWorkspaceLabel(workspaceOrFile, { verbose: true });
label = this.labelService.getWorkspaceLabel(workspaceOrFile, { verbose: true });
uri = URI.file(workspaceOrFile.configPath);
} else {
label = unmnemonicLabel(this.uriLabelService.getLabel(workspaceOrFile));
label = unmnemonicLabel(this.labelService.getUriLabel(workspaceOrFile));
uri = workspaceOrFile;
}

View File

@@ -24,7 +24,7 @@ import { IWindowsMainService, IWindowsCountChangedEvent } from 'vs/platform/wind
import { IHistoryMainService } from 'vs/platform/history/common/history';
import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier, isWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
import URI from 'vs/base/common/uri';
import { IUriLabelService } from 'vs/platform/uriLabel/common/uriLabel';
import { ILabelService } from 'vs/platform/label/common/label';
interface IMenuItemClickHandler {
inDevTools: (contents: Electron.WebContents) => void;
@@ -68,7 +68,7 @@ export class CodeMenu {
@IEnvironmentService private environmentService: IEnvironmentService,
@ITelemetryService private telemetryService: ITelemetryService,
@IHistoryMainService private historyMainService: IHistoryMainService,
@IUriLabelService private uriLabelService: IUriLabelService
@ILabelService private labelService: ILabelService
) {
this.nativeTabMenuItems = [];
@@ -491,14 +491,14 @@ export class CodeMenu {
let label: string;
let uri: URI;
if (isSingleFolderWorkspaceIdentifier(workspace)) {
label = unmnemonicLabel(this.uriLabelService.getWorkspaceLabel(workspace, { verbose: true }));
label = unmnemonicLabel(this.labelService.getWorkspaceLabel(workspace, { verbose: true }));
uri = workspace;
} else if (isWorkspaceIdentifier(workspace)) {
label = this.uriLabelService.getWorkspaceLabel(workspace, { verbose: true });
label = this.labelService.getWorkspaceLabel(workspace, { verbose: true });
uri = URI.file(workspace.configPath);
} else {
uri = URI.file(workspace);
label = unmnemonicLabel(this.uriLabelService.getLabel(uri));
label = unmnemonicLabel(this.labelService.getUriLabel(uri));
}
return new MenuItem(this.likeAction(commandId, {