mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Rename to "IWorkbenchIssueService" and IRawIssueService->IIssueService
This commit is contained in:
parent
2beb91bdca
commit
2184ffef54
|
@ -54,9 +54,9 @@ import { getMachineId } from 'vs/base/node/id';
|
|||
import { Win32UpdateService } from 'vs/platform/update/electron-main/updateService.win32';
|
||||
import { LinuxUpdateService } from 'vs/platform/update/electron-main/updateService.linux';
|
||||
import { DarwinUpdateService } from 'vs/platform/update/electron-main/updateService.darwin';
|
||||
import { IRawIssueService } from 'vs/platform/issue/common/issue';
|
||||
import { IIssueService } from 'vs/platform/issue/common/issue';
|
||||
import { IssueChannel } from 'vs/platform/issue/common/issueIpc';
|
||||
import { RawIssueService } from 'vs/platform/issue/electron-main/rawIssueService';
|
||||
import { IssueService } from 'vs/platform/issue/electron-main/issueService';
|
||||
import { LogLevelSetterChannel } from 'vs/platform/log/common/logIpc';
|
||||
|
||||
export class CodeApplication {
|
||||
|
@ -321,7 +321,7 @@ export class CodeApplication {
|
|||
services.set(IWindowsMainService, new SyncDescriptor(WindowsManager, machineId));
|
||||
services.set(IWindowsService, new SyncDescriptor(WindowsService, this.sharedProcess));
|
||||
services.set(ILaunchService, new SyncDescriptor(LaunchService));
|
||||
services.set(IRawIssueService, new SyncDescriptor(RawIssueService, machineId));
|
||||
services.set(IIssueService, new SyncDescriptor(IssueService, machineId));
|
||||
|
||||
// Telemtry
|
||||
if (this.environmentService.isBuilt && !this.environmentService.isExtensionDevelopment && !this.environmentService.args['disable-telemetry'] && !!product.enableTelemetry) {
|
||||
|
@ -366,7 +366,7 @@ export class CodeApplication {
|
|||
const urlChannel = appInstantiationService.createInstance(URLChannel, urlService);
|
||||
this.electronIpcServer.registerChannel('url', urlChannel);
|
||||
|
||||
const issueService = accessor.get(IRawIssueService);
|
||||
const issueService = accessor.get(IIssueService);
|
||||
const issueChannel = new IssueChannel(issueService);
|
||||
this.electronIpcServer.registerChannel('issue', issueChannel);
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
|
|||
import { ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
|
||||
export const IIssueService = createDecorator<IIssueService>('issueService');
|
||||
export const IRawIssueService = createDecorator<IRawIssueService>('rawIssueService');
|
||||
|
||||
export enum IssueType {
|
||||
Bug,
|
||||
|
@ -57,11 +56,6 @@ export interface ISettingsSearchIssueReporterData extends IssueReporterData {
|
|||
}
|
||||
|
||||
export interface IIssueService {
|
||||
_serviceBrand: any;
|
||||
openReporter(dataOverrides?: Partial<IssueReporterData>): TPromise<void>;
|
||||
}
|
||||
|
||||
export interface IRawIssueService {
|
||||
_serviceBrand: any;
|
||||
openReporter(data: IssueReporterData): TPromise<void>;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { IRawIssueService, IssueReporterData } from './issue';
|
||||
import { IIssueService, IssueReporterData } from './issue';
|
||||
|
||||
export interface IIssueChannel extends IChannel {
|
||||
call(command: 'openIssueReporter', arg: IssueReporterData): TPromise<void>;
|
||||
|
@ -17,7 +17,7 @@ export interface IIssueChannel extends IChannel {
|
|||
|
||||
export class IssueChannel implements IIssueChannel {
|
||||
|
||||
constructor(private service: IRawIssueService) { }
|
||||
constructor(private service: IIssueService) { }
|
||||
|
||||
call(command: string, arg?: any): TPromise<any> {
|
||||
switch (command) {
|
||||
|
@ -28,7 +28,7 @@ export class IssueChannel implements IIssueChannel {
|
|||
}
|
||||
}
|
||||
|
||||
export class IssueChannelClient implements IRawIssueService {
|
||||
export class IssueChannelClient implements IIssueService {
|
||||
|
||||
_serviceBrand: any;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { TPromise, Promise } from 'vs/base/common/winjs.base';
|
|||
import { localize } from 'vs/nls';
|
||||
import * as objects from 'vs/base/common/objects';
|
||||
import { parseArgs } from 'vs/platform/environment/node/argv';
|
||||
import { IRawIssueService, IssueReporterData } from 'vs/platform/issue/common/issue';
|
||||
import { IIssueService, IssueReporterData } from 'vs/platform/issue/common/issue';
|
||||
import { BrowserWindow, ipcMain, screen } from 'electron';
|
||||
import { ILaunchService } from 'vs/code/electron-main/launch';
|
||||
import { getPerformanceInfo, PerformanceInfo, getSystemInfo, SystemInfo } from 'vs/code/electron-main/diagnostics';
|
||||
|
@ -18,7 +18,7 @@ import { isMacintosh } from 'vs/base/common/platform';
|
|||
|
||||
const DEFAULT_BACKGROUND_COLOR = '#1E1E1E';
|
||||
|
||||
export class RawIssueService implements IRawIssueService {
|
||||
export class IssueService implements IIssueService {
|
||||
_serviceBrand: any;
|
||||
_issueWindow: BrowserWindow;
|
||||
_parentWindow: BrowserWindow;
|
|
@ -43,13 +43,14 @@ import { FileKind } from 'vs/platform/files/common/files';
|
|||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IExtensionService, ActivationTimes } from 'vs/platform/extensions/common/extensions';
|
||||
import { getEntries } from 'vs/base/common/performance';
|
||||
import { IssueType, IIssueService } from 'vs/platform/issue/common/issue';
|
||||
import { IssueType } from 'vs/platform/issue/common/issue';
|
||||
import { domEvent } from 'vs/base/browser/event';
|
||||
import { once } from 'vs/base/common/event';
|
||||
import { IDisposable, toDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { getDomNodePagePosition, createStyleSheet, createCSSRule } from 'vs/base/browser/dom';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { Context } from 'vs/platform/contextkey/browser/contextKeyService';
|
||||
import { IWorkbenchIssueService } from 'vs/workbench/services/issue/common/issue';
|
||||
|
||||
// --- actions
|
||||
|
||||
|
@ -871,7 +872,7 @@ export class OpenIssueReporterAction extends Action {
|
|||
constructor(
|
||||
id: string,
|
||||
label: string,
|
||||
@IIssueService private issueService: IIssueService
|
||||
@IWorkbenchIssueService private issueService: IWorkbenchIssueService
|
||||
) {
|
||||
super(id, label);
|
||||
}
|
||||
|
@ -889,7 +890,7 @@ export class ReportPerformanceIssueUsingReporterAction extends Action {
|
|||
constructor(
|
||||
id: string,
|
||||
label: string,
|
||||
@IIssueService private issueService: IIssueService
|
||||
@IWorkbenchIssueService private issueService: IWorkbenchIssueService
|
||||
) {
|
||||
super(id, label);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ import { createSpdLogService } from 'vs/platform/log/node/spdlogService';
|
|||
import fs = require('fs');
|
||||
import { ConsoleLogService, MultiplexLogService, ILogService } from 'vs/platform/log/common/log';
|
||||
import { IssueChannelClient } from 'vs/platform/issue/common/issueIpc';
|
||||
import { IRawIssueService } from 'vs/platform/issue/common/issue';
|
||||
import { IIssueService } from 'vs/platform/issue/common/issue';
|
||||
import { LogLevelSetterChannelClient, FollowerLogService } from 'vs/platform/log/common/logIpc';
|
||||
gracefulFs.gracefulify(fs); // enable gracefulFs
|
||||
|
||||
|
@ -219,7 +219,7 @@ function createMainProcessServices(mainProcessClient: ElectronIPCClient, configu
|
|||
serviceCollection.set(IURLService, new SyncDescriptor(URLChannelClient, urlChannel, configuration.windowId));
|
||||
|
||||
const issueChannel = mainProcessClient.getChannel('issue');
|
||||
serviceCollection.set(IRawIssueService, new SyncDescriptor(IssueChannelClient, issueChannel));
|
||||
serviceCollection.set(IIssueService, new SyncDescriptor(IssueChannelClient, issueChannel));
|
||||
|
||||
const workspacesChannel = mainProcessClient.getChannel('workspaces');
|
||||
serviceCollection.set(IWorkspacesService, new WorkspacesChannelClient(workspacesChannel));
|
||||
|
|
|
@ -92,8 +92,8 @@ import { stat } from 'fs';
|
|||
import { join } from 'path';
|
||||
import { ILocalizationsChannel, LocalizationsChannelClient } from 'vs/platform/localizations/common/localizationsIpc';
|
||||
import { ILocalizationsService } from 'vs/platform/localizations/common/localizations';
|
||||
import { IIssueService } from 'vs/platform/issue/common/issue';
|
||||
import { IssueService } from 'vs/platform/issue/electron-browser/issueService';
|
||||
import { IWorkbenchIssueService } from 'vs/workbench/services/issue/common/issue';
|
||||
import { WorkbenchIssueService } from 'vs/workbench/services/issue/electron-browser/workbenchIssueService';
|
||||
|
||||
/**
|
||||
* Services that we require for the Shell
|
||||
|
@ -447,7 +447,7 @@ export class WorkbenchShell {
|
|||
|
||||
serviceCollection.set(ISearchService, new SyncDescriptor(SearchService));
|
||||
|
||||
serviceCollection.set(IIssueService, new SyncDescriptor(IssueService));
|
||||
serviceCollection.set(IWorkbenchIssueService, new SyncDescriptor(WorkbenchIssueService));
|
||||
|
||||
serviceCollection.set(ICodeEditorService, new SyncDescriptor(CodeEditorServiceImpl));
|
||||
|
||||
|
|
|
@ -36,8 +36,9 @@ import { ITextModel, IModelDeltaDecoration, TrackedRangeStickiness } from 'vs/ed
|
|||
import { CodeLensProviderRegistry, CodeLensProvider, ICodeLensSymbol } from 'vs/editor/common/modes';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { getDomNodePagePosition } from 'vs/base/browser/dom';
|
||||
import { IssueType, ISettingsSearchIssueReporterData, ISettingSearchResult, IIssueService } from 'vs/platform/issue/common/issue';
|
||||
import { IssueType, ISettingsSearchIssueReporterData, ISettingSearchResult } from 'vs/platform/issue/common/issue';
|
||||
import { IExtensionManagementService, IExtensionEnablementService, LocalExtensionType, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { IWorkbenchIssueService } from 'vs/workbench/services/issue/common/issue';
|
||||
|
||||
export interface IPreferencesRenderer<T> extends IDisposable {
|
||||
readonly preferencesModel: IPreferencesEditorModel<T>;
|
||||
|
@ -577,7 +578,7 @@ export class FeedbackWidgetRenderer extends Disposable {
|
|||
|
||||
constructor(private editor: ICodeEditor,
|
||||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@IIssueService private issueService: IIssueService,
|
||||
@IWorkbenchIssueService private issueService: IWorkbenchIssueService,
|
||||
@IConfigurationService private configurationService: IConfigurationService,
|
||||
@IExtensionManagementService private extensionManagementService: IExtensionManagementService,
|
||||
@IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService
|
||||
|
|
17
src/vs/workbench/services/issue/common/issue.ts
Normal file
17
src/vs/workbench/services/issue/common/issue.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IssueReporterData } from 'vs/platform/issue/common/issue';
|
||||
|
||||
export const IWorkbenchIssueService = createDecorator<IWorkbenchIssueService>('workbenchIssueService');
|
||||
|
||||
export interface IWorkbenchIssueService {
|
||||
_serviceBrand: any;
|
||||
openReporter(dataOverrides?: Partial<IssueReporterData>): TPromise<void>;
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import { IIssueService, IssueReporterStyles, IRawIssueService, IssueReporterData } from 'vs/platform/issue/common/issue';
|
||||
import { IssueReporterStyles, IIssueService, IssueReporterData } from 'vs/platform/issue/common/issue';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { textLinkForeground, inputBackground, inputBorder, inputForeground, buttonBackground, buttonHoverBackground, buttonForeground, inputValidationErrorBorder, foreground, inputActiveOptionBorder, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground } from 'vs/platform/theme/common/colorRegistry';
|
||||
|
@ -14,12 +14,13 @@ import { IExtensionManagementService, IExtensionEnablementService, LocalExtensio
|
|||
import { getGalleryExtensionIdFromLocal } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import { webFrame } from 'electron';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { IWorkbenchIssueService } from 'vs/workbench/services/issue/common/issue';
|
||||
|
||||
export class IssueService implements IIssueService {
|
||||
export class WorkbenchIssueService implements IWorkbenchIssueService {
|
||||
_serviceBrand: any;
|
||||
|
||||
constructor(
|
||||
@IRawIssueService private issueService: IRawIssueService,
|
||||
@IIssueService private issueService: IIssueService,
|
||||
@IThemeService private themeService: IThemeService,
|
||||
@IExtensionManagementService private extensionManagementService: IExtensionManagementService,
|
||||
@IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService
|
Loading…
Reference in a new issue