File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -288,6 +288,9 @@ class CustomEditorExtensionOutline implements IOutline<CustomEditorOutlineEntry>
288288 getContextKeyOverlay : ( entry : CustomEditorOutlineEntry ) => {
289289 return [ [ 'customEditorOutlineItem' , entry . contextValue ?? '' ] ] ;
290290 } ,
291+ getActionsContext : ( entry : CustomEditorOutlineEntry ) => {
292+ return { id : entry . id } ;
293+ } ,
291294 } ;
292295
293296 // Listen for outline data changes from the extension provider
Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ export class OutlinePane extends ViewPane implements IOutlinePane {
293293 menuActionOptions : { shouldForwardArgs : true } ,
294294 contextKeyService,
295295 getAnchor : ( ) => e . anchor ,
296- getActionsContext : ( ) => e . element ,
296+ getActionsContext : ( ) => newOutline . config . getActionsContext ?. ( e . element ) ?? e . element ,
297297 } ) ;
298298 } ) ) ;
299299 }
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { FuzzyScore } from '../../../../base/common/filters.js';
1111import { IDisposable } from '../../../../base/common/lifecycle.js' ;
1212import { URI } from '../../../../base/common/uri.js' ;
1313import { MenuId } from '../../../../platform/actions/common/actions.js' ;
14+ import { ContextKeyValue } from '../../../../platform/contextkey/common/contextkey.js' ;
1415import { IEditorOptions } from '../../../../platform/editor/common/editor.js' ;
1516import { createDecorator } from '../../../../platform/instantiation/common/instantiation.js' ;
1617import { IWorkbenchDataTreeOptions } from '../../../../platform/list/browser/listService.js' ;
@@ -73,7 +74,8 @@ export interface IOutlineListConfig<E> {
7374 readonly options : IWorkbenchDataTreeOptions < E , FuzzyScore > ;
7475 readonly quickPickDataSource : IQuickPickDataSource < E > ;
7576 readonly contextMenuId ?: MenuId ;
76- readonly getContextKeyOverlay ?: ( element : E ) => [ string , unknown ] [ ] ;
77+ readonly getContextKeyOverlay ?: ( element : E ) => [ string , ContextKeyValue ] [ ] ;
78+ readonly getActionsContext ?: ( element : E ) => unknown ;
7779}
7880
7981export interface OutlineChangeEvent {
You can’t perform that action at this time.
0 commit comments