fix last use of getConfiguration()
This commit is contained in:
parent
d1491f4ac5
commit
e7a371a1dc
|
@ -89,20 +89,21 @@ export interface IPath {
|
|||
}
|
||||
|
||||
export interface IWindowConfiguration extends ICommandLineArguments {
|
||||
appRoot: string;
|
||||
execPath: string;
|
||||
|
||||
userEnv: IProcessEnvironment;
|
||||
|
||||
// Used to configure the workbench when opening
|
||||
workspacePath?: string;
|
||||
|
||||
recentFiles: string[];
|
||||
recentFolders: string[];
|
||||
|
||||
filesToOpen?: IPath[];
|
||||
filesToCreate?: IPath[];
|
||||
filesToDiff?: IPath[];
|
||||
extensionsToInstall: string[];
|
||||
|
||||
// Used to send the main process environment over to the renderer
|
||||
appRoot: string;
|
||||
execPath: string;
|
||||
userEnv: IProcessEnvironment;
|
||||
extensionsToInstall: string[];
|
||||
}
|
||||
|
||||
export class VSCodeWindow {
|
||||
|
|
|
@ -46,6 +46,12 @@ export interface IOptions {
|
|||
*/
|
||||
editor?: IEditorOptions;
|
||||
|
||||
/**
|
||||
* Recent files and folders
|
||||
*/
|
||||
recentFiles?: string[];
|
||||
recentFolders?: string[];
|
||||
|
||||
/**
|
||||
* The global application settings if any.
|
||||
*/
|
||||
|
|
|
@ -382,8 +382,8 @@ export class OpenRecentAction extends Action {
|
|||
}
|
||||
|
||||
public run(): TPromise<boolean> {
|
||||
const recentFolders = this.contextService.getConfiguration().env.recentFolders;
|
||||
const recentFiles = this.contextService.getConfiguration().env.recentFiles;
|
||||
const recentFolders = this.contextService.getOptions().recentFolders;
|
||||
const recentFiles = this.contextService.getOptions().recentFiles;
|
||||
|
||||
const folderPicks: IPickOpenEntry[] = recentFolders.map((p, index) => {
|
||||
return {
|
||||
|
|
|
@ -19,6 +19,7 @@ import {EventService} from 'vs/platform/event/common/eventService';
|
|||
import {WorkspaceContextService} from 'vs/workbench/services/workspace/common/contextService';
|
||||
import {IWorkspace} from 'vs/platform/workspace/common/workspace';
|
||||
import {ConfigurationService} from 'vs/workbench/services/configuration/node/configurationService';
|
||||
import {IProcessEnvironment} from 'vs/code/electron-main/env';
|
||||
import {EnvironmentService, IEnvironment} from 'vs/platform/environment/node/environmentService';
|
||||
import path = require('path');
|
||||
import fs = require('fs');
|
||||
|
@ -45,15 +46,25 @@ export interface IPath {
|
|||
columnNumber?: number;
|
||||
}
|
||||
|
||||
export interface IConfiguration extends IEnvironment {
|
||||
export interface IWindowConfiguration extends IEnvironment {
|
||||
appRoot: string;
|
||||
execPath: string;
|
||||
|
||||
userEnv: IProcessEnvironment;
|
||||
|
||||
workspacePath?: string;
|
||||
|
||||
recentFiles?: string[];
|
||||
recentFolders?: string[];
|
||||
|
||||
filesToOpen?: IPath[];
|
||||
filesToCreate?: IPath[];
|
||||
filesToDiff?: IPath[];
|
||||
|
||||
extensionsToInstall?: string[];
|
||||
}
|
||||
|
||||
export function startup(configuration: IConfiguration, globalSettings: IGlobalSettings): winjs.TPromise<void> {
|
||||
export function startup(configuration: IWindowConfiguration, globalSettings: IGlobalSettings): winjs.TPromise<void> {
|
||||
|
||||
// Shell Options
|
||||
const filesToOpen = configuration.filesToOpen && configuration.filesToOpen.length ? toInputs(configuration.filesToOpen) : null;
|
||||
|
@ -61,11 +72,13 @@ export function startup(configuration: IConfiguration, globalSettings: IGlobalSe
|
|||
const filesToDiff = configuration.filesToDiff && configuration.filesToDiff.length ? toInputs(configuration.filesToDiff) : null;
|
||||
const shellOptions: IOptions = {
|
||||
singleFileMode: !configuration.workspacePath,
|
||||
filesToOpen: filesToOpen,
|
||||
filesToCreate: filesToCreate,
|
||||
filesToDiff: filesToDiff,
|
||||
filesToOpen,
|
||||
filesToCreate,
|
||||
filesToDiff,
|
||||
recentFiles: configuration.recentFiles,
|
||||
recentFolders: configuration.recentFolders,
|
||||
extensionsToInstall: configuration.extensionsToInstall,
|
||||
globalSettings: globalSettings
|
||||
globalSettings
|
||||
};
|
||||
|
||||
if (configuration.performance) {
|
||||
|
|
Loading…
Reference in a new issue