@@ -7,15 +7,15 @@ import { Event } from 'vs/base/common/event';
7
7
import { Disposable } from 'vs/base/common/lifecycle' ;
8
8
import { IContextKeyService , IContextKey } from 'vs/platform/contextkey/common/contextkey' ;
9
9
import { InputFocusedContext , IsMacContext , IsLinuxContext , IsWindowsContext , IsWebContext , IsMacNativeContext , IsDevelopmentContext , IsIOSContext } from 'vs/platform/contextkey/common/contextkeys' ;
10
- import { SplitEditorsVertically , InEditorZenModeContext , ActiveEditorCanRevertContext , ActiveEditorGroupLockedContext , ActiveEditorCanSplitInGroupContext , SideBySideEditorActiveContext , AuxiliaryBarVisibleContext , SideBarVisibleContext , PanelAlignmentContext , PanelMaximizedContext , PanelVisibleContext , ActiveEditorContext , EditorsVisibleContext , TextCompareEditorVisibleContext , TextCompareEditorActiveContext , ActiveEditorGroupEmptyContext , MultipleEditorGroupsContext , EditorTabsVisibleContext , IsCenteredLayoutContext , ActiveEditorGroupIndexContext , ActiveEditorGroupLastContext , ActiveEditorReadonlyContext , EditorAreaVisibleContext , ActiveEditorAvailableEditorIdsContext , DirtyWorkingCopiesContext , EmptyWorkspaceSupportContext , EnterMultiRootWorkspaceSupportContext , HasWebFileSystemAccess , IsFullscreenContext , OpenFolderWorkspaceSupportContext , RemoteNameContext , VirtualWorkspaceContext , WorkbenchStateContext , WorkspaceFolderCountContext } from 'vs/workbench/common/contextkeys' ;
10
+ import { SplitEditorsVertically , InEditorZenModeContext , ActiveEditorCanRevertContext , ActiveEditorGroupLockedContext , ActiveEditorCanSplitInGroupContext , SideBySideEditorActiveContext , AuxiliaryBarVisibleContext , SideBarVisibleContext , PanelAlignmentContext , PanelMaximizedContext , PanelVisibleContext , ActiveEditorContext , EditorsVisibleContext , TextCompareEditorVisibleContext , TextCompareEditorActiveContext , ActiveEditorGroupEmptyContext , MultipleEditorGroupsContext , EditorTabsVisibleContext , IsCenteredLayoutContext , ActiveEditorGroupIndexContext , ActiveEditorGroupLastContext , ActiveEditorReadonlyContext , EditorAreaVisibleContext , ActiveEditorAvailableEditorIdsContext , DirtyWorkingCopiesContext , EmptyWorkspaceSupportContext , EnterMultiRootWorkspaceSupportContext , HasWebFileSystemAccess , IsFullscreenContext , OpenFolderWorkspaceSupportContext , RemoteNameContext , VirtualWorkspaceContext , WorkbenchStateContext , WorkspaceFolderCountContext , PanelPositionContext } from 'vs/workbench/common/contextkeys' ;
11
11
import { TEXT_DIFF_EDITOR_ID , EditorInputCapabilities , SIDE_BY_SIDE_EDITOR_ID , DEFAULT_EDITOR_ASSOCIATION } from 'vs/workbench/common/editor' ;
12
12
import { trackFocus , addDisposableListener , EventType , WebFileSystemAccess } from 'vs/base/browser/dom' ;
13
13
import { preferredSideBySideGroupDirection , GroupDirection , IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService' ;
14
14
import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
15
15
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService' ;
16
16
import { IEditorService } from 'vs/workbench/services/editor/common/editorService' ;
17
17
import { WorkbenchState , IWorkspaceContextService } from 'vs/platform/workspace/common/workspace' ;
18
- import { IWorkbenchLayoutService , Parts } from 'vs/workbench/services/layout/browser/layoutService' ;
18
+ import { IWorkbenchLayoutService , Parts , positionToString } from 'vs/workbench/services/layout/browser/layoutService' ;
19
19
import { getRemoteName } from 'vs/platform/remote/common/remoteHosts' ;
20
20
import { getVirtualWorkspaceScheme } from 'vs/platform/workspace/common/virtualWorkspace' ;
21
21
import { IWorkingCopyService } from 'vs/workbench/services/workingCopy/common/workingCopyService' ;
@@ -63,6 +63,7 @@ export class WorkbenchContextKeysHandler extends Disposable {
63
63
private isCenteredLayoutContext : IContextKey < boolean > ;
64
64
private sideBarVisibleContext : IContextKey < boolean > ;
65
65
private editorAreaVisibleContext : IContextKey < boolean > ;
66
+ private panelPositionContext : IContextKey < string > ;
66
67
private panelVisibleContext : IContextKey < boolean > ;
67
68
private panelAlignmentContext : IContextKey < string > ;
68
69
private panelMaximizedContext : IContextKey < boolean > ;
@@ -179,6 +180,8 @@ export class WorkbenchContextKeysHandler extends Disposable {
179
180
this . sideBarVisibleContext = SideBarVisibleContext . bindTo ( this . contextKeyService ) ;
180
181
181
182
// Panel
183
+ this . panelPositionContext = PanelPositionContext . bindTo ( this . contextKeyService ) ;
184
+ this . panelPositionContext . set ( positionToString ( this . layoutService . getPanelPosition ( ) ) ) ;
182
185
this . panelVisibleContext = PanelVisibleContext . bindTo ( this . contextKeyService ) ;
183
186
this . panelVisibleContext . set ( this . layoutService . isVisible ( Parts . PANEL_PART ) ) ;
184
187
this . panelMaximizedContext = PanelMaximizedContext . bindTo ( this . contextKeyService ) ;
@@ -228,6 +231,7 @@ export class WorkbenchContextKeysHandler extends Disposable {
228
231
this . _register ( this . layoutService . onDidChangeZenMode ( enabled => this . inZenModeContext . set ( enabled ) ) ) ;
229
232
this . _register ( this . layoutService . onDidChangeFullscreen ( fullscreen => this . isFullscreenContext . set ( fullscreen ) ) ) ;
230
233
this . _register ( this . layoutService . onDidChangeCenteredLayout ( centered => this . isCenteredLayoutContext . set ( centered ) ) ) ;
234
+ this . _register ( this . layoutService . onDidChangePanelPosition ( position => this . panelPositionContext . set ( position ) ) ) ;
231
235
232
236
this . _register ( this . layoutService . onDidChangePanelAlignment ( alignment => this . panelAlignmentContext . set ( alignment ) ) ) ;
233
237
0 commit comments