File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 548548 " ./vs/workbench/browser/parts/quickinput/quickInputBox.ts" ,
549549 " ./vs/workbench/browser/parts/quickinput/quickInputUtils.ts" ,
550550 " ./vs/workbench/browser/parts/quickopen/quickopen.ts" ,
551+ " ./vs/workbench/browser/parts/sidebar/sidebarPart.ts" ,
551552 " ./vs/workbench/browser/parts/statusbar/statusbar.ts" ,
552553 " ./vs/workbench/browser/parts/statusbar/statusbarPart.ts" ,
553554 " ./vs/workbench/browser/parts/views/panelViewlet.ts" ,
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ export class SidebarPart extends CompositePart<Viewlet> implements IViewletServi
175175 }
176176 }
177177
178- openViewlet ( id : string , focus ?: boolean ) : Promise < IViewlet > {
178+ openViewlet ( id : string , focus ?: boolean ) : Promise < IViewlet | null > {
179179 if ( this . getViewlet ( id ) ) {
180180 return Promise . resolve ( this . doOpenViewlet ( id , focus ) ) ;
181181 }
@@ -195,7 +195,7 @@ export class SidebarPart extends CompositePart<Viewlet> implements IViewletServi
195195
196196 getAllViewlets ( ) : ViewletDescriptor [ ] {
197197 return this . viewletRegistry . getViewlets ( )
198- . sort ( ( v1 , v2 ) => v1 . order - v2 . order ) ;
198+ . sort ( ( v1 , v2 ) => v1 . order ! - v2 . order ! ) ;
199199 }
200200
201201 getDefaultViewletId ( ) : string {
@@ -206,7 +206,7 @@ export class SidebarPart extends CompositePart<Viewlet> implements IViewletServi
206206 return this . getViewlets ( ) . filter ( viewlet => viewlet . id === id ) [ 0 ] ;
207207 }
208208
209- private doOpenViewlet ( id : string , focus ?: boolean ) : Viewlet {
209+ private doOpenViewlet ( id : string , focus ?: boolean ) : Viewlet | null {
210210 if ( this . blockOpeningViewlet ) {
211211 return null ; // Workaround against a potential race condition
212212 }
Original file line number Diff line number Diff line change @@ -768,7 +768,8 @@ export abstract class BaseNavigationAction extends Action {
768768
769769 const activeViewletId = this . viewletService . getActiveViewlet ( ) . getId ( ) ;
770770
771- return this . viewletService . openViewlet ( activeViewletId , true ) ;
771+ return this . viewletService . openViewlet ( activeViewletId , true )
772+ . then ( value => value === null ? false : value ) ;
772773 }
773774
774775 protected navigateAcrossEditorGroup ( direction : GroupDirection ) : boolean {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export interface IViewletService {
2222 /**
2323 * Opens a viewlet with the given identifier and pass keyboard focus to it if specified.
2424 */
25- openViewlet ( id : string , focus ?: boolean ) : Promise < IViewlet > ;
25+ openViewlet ( id : string , focus ?: boolean ) : Promise < IViewlet | null > ;
2626
2727 /**
2828 * Returns the current active viewlet or null if none.
You can’t perform that action at this time.
0 commit comments