From fff6f7414f0a18f70ad92fcdd683029182cb44ad Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 11 Dec 2020 15:03:53 +0100 Subject: [PATCH] :lipstick: remove commented code --- .../contrib/outline/browser/outlinePane.ts | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/vs/workbench/contrib/outline/browser/outlinePane.ts b/src/vs/workbench/contrib/outline/browser/outlinePane.ts index a8abcbbe804..1bc3e714c6f 100644 --- a/src/vs/workbench/contrib/outline/browser/outlinePane.ts +++ b/src/vs/workbench/contrib/outline/browser/outlinePane.ts @@ -399,28 +399,9 @@ export class OutlinePane extends ViewPane { return this._outlineViewState; } - // getSecondaryActions(): IAction[] { - // const group = this._register(new RadioGroup([ - // new SimpleToggleAction(this._outlineViewState, localize('sortByPosition', "Sort By: Position"), () => this._outlineViewState.sortBy === OutlineSortOrder.ByPosition, _ => this._outlineViewState.sortBy = OutlineSortOrder.ByPosition), - // new SimpleToggleAction(this._outlineViewState, localize('sortByName', "Sort By: Name"), () => this._outlineViewState.sortBy === OutlineSortOrder.ByName, _ => this._outlineViewState.sortBy = OutlineSortOrder.ByName), - // new SimpleToggleAction(this._outlineViewState, localize('sortByKind', "Sort By: Category"), () => this._outlineViewState.sortBy === OutlineSortOrder.ByKind, _ => this._outlineViewState.sortBy = OutlineSortOrder.ByKind), - // ])); - // const result = [ - // new Separator(), - // ...group.actions, - // ]; - // for (const r of result) { - // this._register(r); - // } - - // return result; - // } - private _onDidChangeUserState(e: { followCursor?: boolean, sortBy?: boolean, filterOnType?: boolean }) { this._outlineViewState.persist(this._storageService); - if (e.followCursor) { - // todo@jrieken update immediately - } + if (e.sortBy) { this._treeComparator.type = this._outlineViewState.sortBy; this._tree.resort(); -- GitLab