Merge from vscode 1eb87b0e9ce9886afeaecec22b31abd0d9b7939f (#7282)

* Merge from vscode 1eb87b0e9ce9886afeaecec22b31abd0d9b7939f

* fix various icon issues

* fix preview features
This commit is contained in:
Anthony Dresser
2019-09-19 21:50:52 -07:00
committed by GitHub
parent 9d3d64eef3
commit db498db0a8
459 changed files with 10195 additions and 7528 deletions

View File

@@ -20,8 +20,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
import { writeTransientState } from 'vs/workbench/contrib/codeEditor/browser/toggleWordWrap';
import { mergeSort } from 'vs/base/common/arrays';
import product from 'vs/platform/product/node/product';
import pkg from 'vs/platform/product/node/package';
import product from 'vs/platform/product/common/product';
export class PerfviewContrib {
@@ -127,7 +126,7 @@ class PerfModelContentProvider implements ITextModelContentProvider {
private _addSummary(md: MarkdownBuilder, metrics: IStartupMetrics): void {
md.heading(2, 'System Info');
md.li(`${product.nameShort}: ${pkg.version} (${product.commit || '0000000'})`);
md.li(`${product.nameShort}: ${product.version} (${product.commit || '0000000'})`);
md.li(`OS: ${metrics.platform}(${metrics.release})`);
if (metrics.cpus) {
md.li(`CPUs: ${metrics.cpus.model}(${metrics.cpus.count} x ${metrics.cpus.speed})`);

View File

@@ -10,7 +10,7 @@ import { localize } from 'vs/nls';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import product from 'vs/platform/product/node/product';
import product from 'vs/platform/product/common/product';
import { IWindowsService } from 'vs/platform/windows/common/windows';
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
import { PerfviewInput } from 'vs/workbench/contrib/performance/electron-browser/perfviewEditor';
@@ -18,6 +18,7 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { URI } from 'vs/base/common/uri';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { IElectronService } from 'vs/platform/electron/node/electron';
export class StartupProfiler implements IWorkbenchContribution {
@@ -29,7 +30,8 @@ export class StartupProfiler implements IWorkbenchContribution {
@IClipboardService private readonly _clipboardService: IClipboardService,
@ILifecycleService lifecycleService: ILifecycleService,
@IExtensionService extensionService: IExtensionService,
@IOpenerService private readonly _openerService: IOpenerService
@IOpenerService private readonly _openerService: IOpenerService,
@IElectronService private readonly _electronService: IElectronService
) {
// wait for everything to be ready
Promise.all([
@@ -81,7 +83,7 @@ export class StartupProfiler implements IWorkbenchContribution {
}).then(res => {
if (res.confirmed) {
Promise.all<any>([
this._windowsService.showItemInFolder(URI.file(join(dir, files[0]))),
this._electronService.showItemInFolder(URI.file(join(dir, files[0])).fsPath),
this._createPerfIssue(files)
]).then(() => {
// keep window stable until restart is selected

View File

@@ -10,7 +10,7 @@ import { onUnexpectedError } from 'vs/base/common/errors';
import { isCodeEditor } from 'vs/editor/browser/editorBrowser';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { ILifecycleService, StartupKind } from 'vs/platform/lifecycle/common/lifecycle';
import product from 'vs/platform/product/node/product';
import product from 'vs/platform/product/common/product';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IUpdateService } from 'vs/platform/update/common/update';
import { IWindowsService } from 'vs/platform/windows/common/windows';
@@ -21,6 +21,7 @@ import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
import { didUseCachedData, ITimerService } from 'vs/workbench/services/timer/electron-browser/timerService';
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { getEntries } from 'vs/base/common/performance';
import { IHostService } from 'vs/workbench/services/host/browser/host';
export class StartupTimings implements IWorkbenchContribution {
@@ -34,6 +35,7 @@ export class StartupTimings implements IWorkbenchContribution {
@ILifecycleService private readonly _lifecycleService: ILifecycleService,
@IUpdateService private readonly _updateService: IUpdateService,
@IEnvironmentService private readonly _envService: IEnvironmentService,
@IHostService private readonly _hostService: IHostService
) {
//
this._report().catch(onUnexpectedError);
@@ -91,7 +93,7 @@ export class StartupTimings implements IWorkbenchContribution {
if (this._lifecycleService.startupKind !== StartupKind.NewWindow) {
return false;
}
if (await this._windowsService.getWindowCount() !== 1) {
if (await this._hostService.windowCount !== 1) {
return false;
}
const activeViewlet = this._viewletService.getActiveViewlet();