提交 ba324c4f 编写于 作者: M Martin Aeschlimann

Improve profiling animation, open editor when done

上级 800b0217
......@@ -68,6 +68,8 @@
.vs-dark .monaco-action-bar .extension-host-profile-stop,
.hc-black .monaco-action-bar .extension-host-profile-stop {
background: url('profile-stop-inverse.svg') center center no-repeat;
animation:fade 1000ms infinite;
-webkit-animation:fade 1000ms infinite;
}
.runtime-extensions-editor .monaco-action-bar {
......@@ -88,20 +90,22 @@
background: url('profile-stop.svg') no-repeat;
display: inline-block;
padding-right: 2px;
padding-bottom: 2px;
width: 16px;
height: 16px;
vertical-align: middle;
animation: blink 1s step-start 0s infinite;
-webkit-animation: blink 1s step-start 0s infinite;
animation:fade 1000ms infinite;
-webkit-animation:fade 1000ms infinite;
}
@keyframes blink {
50% {
opacity: 0.0;
}
@keyframes fade {
from { opacity: 1.0; }
50% { opacity: 0.5; }
to { opacity: 1.0; }
}
@-webkit-keyframes blink {
50% {
opacity: 0.0;
}
@-webkit-keyframes fade {
from { opacity: 1.0; }
50% { opacity: 0.5; }
to { opacity: 1.0; }
}
\ No newline at end of file
......@@ -86,6 +86,7 @@ export class RuntimeExtensionsEditor extends BaseEditor {
@IContextMenuService private readonly _contextMenuService: IContextMenuService,
@IWindowService private readonly _windowService: IWindowService,
@IEnvironmentService private readonly _environmentService: IEnvironmentService,
@IInstantiationService private readonly _instantiationService: IInstantiationService,
) {
super(RuntimeExtensionsEditor.ID, telemetryService, themeService);
......@@ -419,7 +420,7 @@ export class RuntimeExtensionsEditor extends BaseEditor {
@memoize
private get extensionHostProfileAction(): IAction {
return new ExtensionHostProfileAction(ExtensionHostProfileAction.LABEL_START, ExtensionHostProfileAction.ID, this, this._extensionService);
return this._instantiationService.createInstance(ExtensionHostProfileAction, ExtensionHostProfileAction.LABEL_START, ExtensionHostProfileAction.ID, this);
}
public layout(dimension: Dimension): void {
......@@ -538,6 +539,8 @@ class ExtensionHostProfileAction extends Action {
id: string = ExtensionHostProfileAction.ID, label: string = ExtensionHostProfileAction.LABEL_START,
private readonly _parentEditor: RuntimeExtensionsEditor,
@IExtensionService private readonly _extensionService: IExtensionService,
@IWorkbenchEditorService private readonly _editorService: IWorkbenchEditorService,
@IInstantiationService private readonly _instantiationService: IInstantiationService,
) {
super(id, label, ExtensionHostProfileAction.START_CSS_CLASS);
this._profileSession = null;
......@@ -550,6 +553,7 @@ class ExtensionHostProfileAction extends Action {
this.label = ExtensionHostProfileAction.LABEL_STOP;
ProfileExtHostStatusbarItem.instance.show(() => {
this.run();
this._editorService.openEditor(this._instantiationService.createInstance(RuntimeExtensionsInput));
});
} else {
this.class = ExtensionHostProfileAction.START_CSS_CLASS;
......@@ -603,7 +607,6 @@ export class ProfileExtHostStatusbarItem implements IStatusbarItem {
public static instance: ProfileExtHostStatusbarItem;
private toDispose: IDisposable[];
private container: HTMLElement;
private statusBarItem: HTMLElement;
private label: HTMLElement;
private timeStarted: number;
......@@ -635,9 +638,8 @@ export class ProfileExtHostStatusbarItem implements IStatusbarItem {
}
public render(container: HTMLElement): IDisposable {
this.container = container;
if (!this.statusBarItem && this.container) {
this.statusBarItem = append(this.container, $('.profileExtHost-statusbar-item'));
if (!this.statusBarItem && container) {
this.statusBarItem = append(container, $('.profileExtHost-statusbar-item'));
this.toDispose.push(addDisposableListener(this.statusBarItem, 'click', () => {
if (this.clickHandler) {
this.clickHandler();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册