提交 aa3b1fb3 编写于 作者: I isidor

viewsViewlet: openView is not async

上级 8f3f462c
......@@ -3,7 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { TPromise } from 'vs/base/common/winjs.base';
import * as DOM from 'vs/base/browser/dom';
import { dispose, IDisposable, combinedDisposable, toDisposable } from 'vs/base/common/lifecycle';
import { IAction } from 'vs/base/common/actions';
......@@ -194,7 +193,7 @@ export abstract class ViewContainerViewlet extends PanelViewlet implements IView
.map((view) => view.setVisible(visible));
}
openView(id: string, focus?: boolean): TPromise<IView> {
openView(id: string, focus?: boolean): IView {
if (focus) {
this.focus();
}
......@@ -207,7 +206,7 @@ export abstract class ViewContainerViewlet extends PanelViewlet implements IView
if (focus) {
view.focus();
}
return Promise.resolve(view);
return view;
}
movePanel(from: ViewletPanel, to: ViewletPanel): void {
......
......@@ -219,7 +219,7 @@ export interface IView {
export interface IViewsViewlet extends IViewlet {
openView(id: string, focus?: boolean): TPromise<IView>;
openView(id: string, focus?: boolean): IView;
}
......@@ -344,4 +344,4 @@ export interface ITreeViewDataProvider {
getChildren(element?: ITreeItem): TPromise<ITreeItem[]>;
}
\ No newline at end of file
}
......@@ -1477,7 +1477,7 @@ export class SCMViewlet extends PanelViewlet implements IViewModel, IViewsViewle
return super.isSingleView() && this.repositoryPanels.length + this.contributedViews.visibleViewDescriptors.length === 1;
}
openView(id: string, focus?: boolean): TPromise<IView> {
openView(id: string, focus?: boolean): IView {
if (focus) {
this.focus();
}
......@@ -1490,7 +1490,7 @@ export class SCMViewlet extends PanelViewlet implements IViewModel, IViewsViewle
if (focus) {
panel.focus();
}
return TPromise.as(panel);
return panel;
}
hide(repository: ISCMRepository): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册