@@ -7,6 +7,8 @@ import * as DOM from '../../../../base/browser/dom.js';
7
7
import { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js' ;
8
8
import { ActionBar , ActionsOrientation } from '../../../../base/browser/ui/actionbar/actionbar.js' ;
9
9
import { BaseActionViewItem , IActionViewItemOptions } from '../../../../base/browser/ui/actionbar/actionViewItems.js' ;
10
+ import type { IManagedHover } from '../../../../base/browser/ui/hover/hover.js' ;
11
+ import { getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js' ;
10
12
import { HistoryInputBox , IHistoryInputOptions } from '../../../../base/browser/ui/inputbox/inputBox.js' ;
11
13
import { Widget } from '../../../../base/browser/ui/widget.js' ;
12
14
import { Action , IAction } from '../../../../base/common/actions.js' ;
@@ -16,28 +18,26 @@ import { KeyCode } from '../../../../base/common/keyCodes.js';
16
18
import { Disposable } from '../../../../base/common/lifecycle.js' ;
17
19
import { Schemas } from '../../../../base/common/network.js' ;
18
20
import { isEqual } from '../../../../base/common/resources.js' ;
21
+ import { ThemeIcon } from '../../../../base/common/themables.js' ;
19
22
import { URI } from '../../../../base/common/uri.js' ;
20
23
import { ICodeEditor , IEditorMouseEvent , MouseTargetType } from '../../../../editor/browser/editorBrowser.js' ;
24
+ import { IEditorDecorationsCollection } from '../../../../editor/common/editorCommon.js' ;
25
+ import { ILanguageService } from '../../../../editor/common/languages/language.js' ;
21
26
import { IModelDeltaDecoration , TrackedRangeStickiness } from '../../../../editor/common/model.js' ;
22
27
import { localize } from '../../../../nls.js' ;
23
- import { ContextScopedHistoryInputBox } from '../../../../platform/history/browser/contextScopedHistoryWidget.js' ;
24
- import { showHistoryKeybindingHint } from '../../../../platform/history/browser/historyWidgetKeybindingHint.js' ;
25
28
import { ConfigurationTarget } from '../../../../platform/configuration/common/configuration.js' ;
26
29
import { IContextKey , IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js' ;
27
30
import { IContextMenuService , IContextViewService } from '../../../../platform/contextview/browser/contextView.js' ;
31
+ import { ContextScopedHistoryInputBox } from '../../../../platform/history/browser/contextScopedHistoryWidget.js' ;
32
+ import { showHistoryKeybindingHint } from '../../../../platform/history/browser/historyWidgetKeybindingHint.js' ;
33
+ import { IHoverService } from '../../../../platform/hover/browser/hover.js' ;
28
34
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js' ;
29
35
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js' ;
30
36
import { ILabelService } from '../../../../platform/label/common/label.js' ;
31
37
import { asCssVariable , badgeBackground , badgeForeground , contrastBorder } from '../../../../platform/theme/common/colorRegistry.js' ;
32
- import { ThemeIcon } from '../../../../base/common/themables.js' ;
33
38
import { isWorkspaceFolder , IWorkspaceContextService , IWorkspaceFolder , WorkbenchState } from '../../../../platform/workspace/common/workspace.js' ;
34
- import { settingsEditIcon , settingsScopeDropDownIcon } from './preferencesIcons.js' ;
35
39
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js' ;
36
- import { ILanguageService } from '../../../../editor/common/languages/language.js' ;
37
- import { getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js' ;
38
- import type { IManagedHover } from '../../../../base/browser/ui/hover/hover.js' ;
39
- import { IHoverService } from '../../../../platform/hover/browser/hover.js' ;
40
- import { IEditorDecorationsCollection } from '../../../../editor/common/editorCommon.js' ;
40
+ import { settingsEditIcon , settingsScopeDropDownIcon } from './preferencesIcons.js' ;
41
41
42
42
export class FolderSettingsActionViewItem extends BaseActionViewItem {
43
43
@@ -266,20 +266,20 @@ export class SettingsTargetsWidget extends Widget {
266
266
actionViewItemProvider : ( action : IAction , options : IActionViewItemOptions ) => action . id === 'folderSettings' ? this . folderSettings : undefined
267
267
} ) ) ;
268
268
269
- this . userLocalSettings = new Action ( 'userSettings' , '' , '.settings-tab' , true , ( ) => this . updateTarget ( ConfigurationTarget . USER_LOCAL ) ) ;
269
+ this . userLocalSettings = this . _register ( new Action ( 'userSettings' , '' , '.settings-tab' , true , ( ) => this . updateTarget ( ConfigurationTarget . USER_LOCAL ) ) ) ;
270
270
this . userLocalSettings . tooltip = localize ( 'userSettings' , "User" ) ;
271
271
272
- this . userRemoteSettings = new Action ( 'userSettingsRemote' , '' , '.settings-tab' , true , ( ) => this . updateTarget ( ConfigurationTarget . USER_REMOTE ) ) ;
272
+ this . userRemoteSettings = this . _register ( new Action ( 'userSettingsRemote' , '' , '.settings-tab' , true , ( ) => this . updateTarget ( ConfigurationTarget . USER_REMOTE ) ) ) ;
273
273
const remoteAuthority = this . environmentService . remoteAuthority ;
274
274
const hostLabel = remoteAuthority && this . labelService . getHostLabel ( Schemas . vscodeRemote , remoteAuthority ) ;
275
275
this . userRemoteSettings . tooltip = localize ( 'userSettingsRemote' , "Remote" ) + ( hostLabel ? ` [${ hostLabel } ]` : '' ) ;
276
276
277
- this . workspaceSettings = new Action ( 'workspaceSettings' , '' , '.settings-tab' , false , ( ) => this . updateTarget ( ConfigurationTarget . WORKSPACE ) ) ;
277
+ this . workspaceSettings = this . _register ( new Action ( 'workspaceSettings' , '' , '.settings-tab' , false , ( ) => this . updateTarget ( ConfigurationTarget . WORKSPACE ) ) ) ;
278
278
279
- this . folderSettingsAction = new Action ( 'folderSettings' , '' , '.settings-tab' , false , async folder => {
279
+ this . folderSettingsAction = this . _register ( new Action ( 'folderSettings' , '' , '.settings-tab' , false , async folder => {
280
280
this . updateTarget ( isWorkspaceFolder ( folder ) ? folder . uri : ConfigurationTarget . USER_LOCAL ) ;
281
- } ) ;
282
- this . folderSettings = this . instantiationService . createInstance ( FolderSettingsActionViewItem , this . folderSettingsAction ) ;
281
+ } ) ) ;
282
+ this . folderSettings = this . _register ( this . instantiationService . createInstance ( FolderSettingsActionViewItem , this . folderSettingsAction ) ) ;
283
283
284
284
this . resetLabels ( ) ;
285
285
this . update ( ) ;
0 commit comments