提交 bfc9b536 编写于 作者: B Benjamin Pasero

align more stuff

上级 dffbeac1
......@@ -90,21 +90,20 @@ export interface IPath {
export interface IWindowConfiguration extends ICommandLineArguments {
version: string;
appName: string;
applicationName: string;
appSettingsHome: string;
appSettingsPath: string;
appKeybindingsPath: string;
userExtensionsHome: string;
appRoot: string;
isBuilt: boolean;
// Used to configure the workbench when opening
workspacePath?: string;
recentFiles: string[];
recentFolders: string[];
workspacePath?: string;
filesToOpen?: IPath[];
filesToCreate?: IPath[];
filesToDiff?: IPath[];
extensionsToInstall: string[];
// Used to send the main process environment over to the renderer
userEnv: IProcessEnvironment;
}
......@@ -359,7 +358,7 @@ export class VSCodeWindow {
this._win.loadURL(this.getUrl(config));
// Make window visible if it did not open in N seconds because this indicates an error
if (!config.isBuilt) {
if (!this.envService.isBuilt) {
this.showTimeoutHandle = setTimeout(() => {
if (this._win && !this._win.isVisible() && !this._win.isMinimized()) {
this._win.show();
......
......@@ -732,15 +732,10 @@ export class WindowsManager implements IWindowsService {
configuration.filesToCreate = filesToCreate;
configuration.filesToDiff = filesToDiff;
configuration.extensionsToInstall = extensionsToInstall;
configuration.appName = this.envService.product.nameLong;
configuration.applicationName = this.envService.product.applicationName;
configuration.appRoot = this.envService.appRoot;
configuration.version = pkg.version;
configuration.appSettingsHome = this.envService.appSettingsHome;
configuration.appSettingsPath = this.envService.appSettingsPath;
configuration.appKeybindingsPath = this.envService.appKeybindingsPath;
configuration.userExtensionsHome = this.envService.userExtensionsHome;
configuration.isBuilt = this.envService.isBuilt;
configuration.userEnv = userEnv;
const recents = this.getRecentlyOpenedPaths(workspacePath, filesToOpen);
......
......@@ -85,17 +85,11 @@ export interface IConfiguration {
}
export interface IEnvironment {
appName: string;
appRoot: string;
isBuilt: boolean;
applicationName: string;
version: string;
appSettingsHome: string;
appSettingsPath: string;
appKeybindingsPath: string;
disableExtensions: boolean;
......
......@@ -104,7 +104,7 @@ function main() {
const webFrame = require('electron').webFrame;
const args = parseURLQueryArgs();
const configuration = JSON.parse(args['config'] || '{}') || {};
const enableDeveloperTools = !configuration.isBuilt || !!configuration.extensionDevelopmentPath;
const enableDeveloperTools = process.env['VSCODE_DEV'] || !!configuration.extensionDevelopmentPath;
// Correctly inherit the parent's environment
assign(process.env, configuration.userEnv);
......@@ -167,7 +167,7 @@ function main() {
}
window.MonacoEnvironment = {};
const timers = window.MonacoEnvironment.timers = {
start: new Date()
};
......
......@@ -68,6 +68,7 @@ import {IStatusbarService} from 'vs/platform/statusbar/common/statusbar';
import {IMenuService} from 'vs/platform/actions/common/actions';
import {MenuService} from 'vs/platform/actions/common/menuService';
import {IContextMenuService} from 'vs/platform/contextview/browser/contextView';
import {IEnvironmentService} from 'vs/platform/environment/common/environment';
export const MessagesVisibleContext = new RawContextKey<boolean>('globalMessageVisible', false);
export const EditorsVisibleContext = new RawContextKey<boolean>('editorIsOpen', false);
......@@ -140,7 +141,8 @@ export class Workbench implements IPartService {
@IStorageService private storageService: IStorageService,
@ILifecycleService private lifecycleService: ILifecycleService,
@IMessageService private messageService: IMessageService,
@IThreadService private threadService: IThreadService
@IThreadService private threadService: IThreadService,
@IEnvironmentService private environmentService: IEnvironmentService
) {
// Validate params
......@@ -229,7 +231,7 @@ export class Workbench implements IPartService {
// Load Viewlet
const viewletRegistry = (<ViewletRegistry>Registry.as(ViewletExtensions.Viewlets));
let viewletId = viewletRegistry.getDefaultViewletId();
if (!this.workbenchParams.configuration.env.isBuilt) {
if (!this.environmentService.isBuilt) {
viewletId = this.storageService.get(SidebarPart.activeViewletSettingsKey, StorageScope.WORKSPACE, viewletRegistry.getDefaultViewletId()); // help developers and restore last view
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册