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

align more stuff

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