@@ -18,13 +18,12 @@ import { IAction } from 'vs/base/common/actions';
1818import { Part , IPartOptions } from 'vs/workbench/browser/part' ;
1919import { Composite , CompositeRegistry } from 'vs/workbench/browser/composite' ;
2020import { IComposite } from 'vs/workbench/common/composite' ;
21- import { ScopedProgressService } from 'vs/workbench/services/progress/browser/localProgressService ' ;
21+ import { CompositeProgressIndicator } from 'vs/workbench/services/progress/browser/progressIndicator ' ;
2222import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService' ;
2323import { IStorageService , StorageScope } from 'vs/platform/storage/common/storage' ;
2424import { IContextMenuService } from 'vs/platform/contextview/browser/contextView' ;
2525import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
26- import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection' ;
27- import { ILocalProgressService } from 'vs/platform/progress/common/progress' ;
26+ import { IProgressIndicator } from 'vs/platform/progress/common/progress' ;
2827import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry' ;
2928import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding' ;
3029import { IThemeService } from 'vs/platform/theme/common/themeService' ;
@@ -50,7 +49,7 @@ export interface ICompositeTitleLabel {
5049interface CompositeItem {
5150 composite : Composite ;
5251 disposable : IDisposable ;
53- localProgressService : ILocalProgressService ;
52+ progress : IProgressIndicator ;
5453}
5554
5655export abstract class CompositePart < T extends Composite > extends Part {
@@ -169,17 +168,18 @@ export abstract class CompositePart<T extends Composite> extends Part {
169168 // Instantiate composite from registry otherwise
170169 const compositeDescriptor = this . registry . getComposite ( id ) ;
171170 if ( compositeDescriptor ) {
172- const localProgressService = this . instantiationService . createInstance ( ScopedProgressService , this . progressBar , compositeDescriptor . id , isActive ) ;
173- const compositeInstantiationService = this . instantiationService . createChild ( new ServiceCollection ( [ ILocalProgressService , localProgressService ] ) ) ;
174-
175- const composite = compositeDescriptor . instantiate ( compositeInstantiationService ) ;
176- const disposables = new DisposableStore ( ) ;
171+ const composite = compositeDescriptor . instantiate ( this . instantiationService ) ;
172+ const disposable = new DisposableStore ( ) ;
177173
178174 // Remember as Instantiated
179- this . instantiatedCompositeItems . set ( id , { composite, disposable : disposables , localProgressService } ) ;
175+ this . instantiatedCompositeItems . set ( id , {
176+ composite,
177+ disposable,
178+ progress : this . _register ( this . instantiationService . createInstance ( CompositeProgressIndicator , this . progressBar , compositeDescriptor . id , isActive ) )
179+ } ) ;
180180
181181 // Register to title area update events from the composite
182- disposables . add ( composite . onTitleAreaUpdate ( ( ) => this . onTitleAreaUpdate ( composite . getId ( ) ) , this ) ) ;
182+ disposable . add ( composite . onTitleAreaUpdate ( ( ) => this . onTitleAreaUpdate ( composite . getId ( ) ) , this ) ) ;
183183
184184 return composite ;
185185 }
@@ -451,10 +451,10 @@ export abstract class CompositePart<T extends Composite> extends Part {
451451 return contentContainer ;
452452 }
453453
454- getProgressIndicator ( id : string ) : ILocalProgressService | null {
454+ getProgressIndicator ( id : string ) : IProgressIndicator | null {
455455 const compositeItem = this . instantiatedCompositeItems . get ( id ) ;
456456
457- return compositeItem ? compositeItem . localProgressService : null ;
457+ return compositeItem ? compositeItem . progress : null ;
458458 }
459459
460460 protected getActions ( ) : ReadonlyArray < IAction > {
0 commit comments