@@ -50,7 +50,7 @@ import { IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewl
5050import { CollapseAction } from 'vs/workbench/browser/viewlet' ;
5151import { IViewsService } from 'vs/workbench/common/views' ;
5252import { ACTIVE_GROUP , IEditorService , SIDE_GROUP } from 'vs/workbench/services/editor/common/editorService' ;
53- import { OutlineController , OutlineDataSource , OutlineItemComparator , OutlineItemCompareType , OutlineItemFilter , OutlineRenderer , OutlineTreeState } from '../../../.. /editor/contrib/documentSymbols/outlineTree' ;
53+ import { OutlineController , OutlineDataSource , OutlineItemComparator , OutlineItemCompareType , OutlineItemFilter , OutlineRenderer , OutlineTreeState } from 'vs /editor/contrib/documentSymbols/outlineTree' ;
5454import { OutlineConfigKeys , OutlineViewFiltered , OutlineViewFocused , OutlineViewId } from './outline' ;
5555
5656class RequestState {
@@ -372,6 +372,16 @@ export class OutlinePanel extends ViewletPanel {
372372 dom . toggleClass ( this . _domNode , 'no-icons' , ! this . _configurationService . getValue ( OutlineConfigKeys . icons ) ) ;
373373 }
374374 } ) ) ;
375+
376+ this . disposables . push ( this . onDidChangeBodyVisibility ( visible => {
377+ if ( visible && ! this . _requestOracle ) {
378+ this . _requestOracle = this . _instantiationService . createInstance ( RequestOracle , ( editor , event ) => this . _doUpdate ( editor , event ) , DocumentSymbolProviderRegistry ) ;
379+ } else if ( ! visible ) {
380+ dispose ( this . _requestOracle ) ;
381+ this . _requestOracle = undefined ;
382+ this . _doUpdate ( undefined , undefined ) ;
383+ }
384+ } ) ) ;
375385 }
376386
377387 protected layoutBody ( height : number ) : void {
@@ -382,25 +392,6 @@ export class OutlinePanel extends ViewletPanel {
382392 }
383393 }
384394
385- setVisible ( visible : boolean ) : void {
386- if ( visible && this . isExpanded ( ) && ! this . _requestOracle ) {
387- // workaround for https://github.com/Microsoft/vscode/issues/60011
388- this . setExpanded ( true ) ;
389- }
390- super . setVisible ( visible ) ;
391- }
392-
393- setExpanded ( expanded : boolean ) : boolean {
394- if ( expanded ) {
395- this . _requestOracle = this . _requestOracle || this . _instantiationService . createInstance ( RequestOracle , ( editor , event ) => this . _doUpdate ( editor , event ) . then ( undefined , onUnexpectedError ) , DocumentSymbolProviderRegistry ) ;
396- } else {
397- dispose ( this . _requestOracle ) ;
398- this . _requestOracle = undefined ;
399- this . _doUpdate ( undefined , undefined ) ;
400- }
401- return super . setExpanded ( expanded ) ;
402- }
403-
404395 getActions ( ) : IAction [ ] {
405396 return [
406397 new Action ( 'collapse' , localize ( 'collapse' , "Collapse All" ) , 'explorer-action collapse-explorer' , true , ( ) => {
0 commit comments