mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 18:22:34 -05:00
Merge from vscode ad407028575a77ea387eb7cc219b323dc017b686
This commit is contained in:
committed by
Anthony Dresser
parent
404260b8a0
commit
4ad73d381c
@@ -179,7 +179,7 @@ class ToggleScreencastModeAction extends Action2 {
|
||||
|| length > 20
|
||||
|| event.keyCode === KeyCode.Backspace || event.keyCode === KeyCode.Escape
|
||||
) {
|
||||
keyboardMarker.innerHTML = '';
|
||||
keyboardMarker.innerText = '';
|
||||
length = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -560,7 +560,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
// List
|
||||
if (focused instanceof List || focused instanceof PagedList) {
|
||||
const list = focused;
|
||||
list.setSelection(range(list.length));
|
||||
const fakeKeyboardEvent = new KeyboardEvent('keydown');
|
||||
list.setSelection(range(list.length), fakeKeyboardEvent);
|
||||
}
|
||||
|
||||
// Trees
|
||||
|
||||
@@ -21,8 +21,6 @@ import { PanelPositionContext } from 'vs/workbench/common/panel';
|
||||
import { getRemoteName } from 'vs/platform/remote/common/remoteHosts';
|
||||
import { IWorkingCopyService } from 'vs/workbench/services/workingCopy/common/workingCopyService';
|
||||
|
||||
export const Deprecated_RemoteAuthorityContext = new RawContextKey<string>('remoteAuthority', '');
|
||||
|
||||
export const RemoteNameContext = new RawContextKey<string>('remoteName', '');
|
||||
export const RemoteConnectionState = new RawContextKey<'' | 'initializing' | 'disconnected' | 'connected'>('remoteConnectionState', '');
|
||||
|
||||
|
||||
@@ -1065,9 +1065,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
return !this.state.activityBar.hidden;
|
||||
case Parts.EDITOR_PART:
|
||||
return !this.state.editor.hidden;
|
||||
default:
|
||||
return true; // any other part cannot be hidden
|
||||
}
|
||||
|
||||
return true; // any other part cannot be hidden
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
|
||||
@@ -65,6 +65,10 @@ export class PaneComposite extends Composite implements IPaneComposite {
|
||||
return this.viewPaneContainer;
|
||||
}
|
||||
|
||||
getActionsContext(): unknown {
|
||||
return this.getViewPaneContainer().getActionsContext();
|
||||
}
|
||||
|
||||
getContextMenuActions(): ReadonlyArray<IAction> {
|
||||
const result = [];
|
||||
result.push(...this.menuActions.getContextMenuActions());
|
||||
|
||||
@@ -28,12 +28,13 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { createAndFillInActionBarActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { Codicon } from 'vs/base/common/codicons';
|
||||
import { isMacintosh } from 'vs/base/common/platform';
|
||||
import { IAuthenticationService } from 'vs/workbench/services/authentication/browser/authenticationService';
|
||||
import { getCurrentAuthenticationSessionInfo, IAuthenticationService } from 'vs/workbench/services/authentication/browser/authenticationService';
|
||||
import { AuthenticationSession } from 'vs/editor/common/modes';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { ActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IProductService } from 'vs/platform/product/common/productService';
|
||||
|
||||
export class ViewContainerActivityAction extends ActivityAction {
|
||||
|
||||
@@ -125,7 +126,8 @@ export class AccountsActionViewItem extends ActivityActionViewItem {
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||
@IAuthenticationService private readonly authenticationService: IAuthenticationService,
|
||||
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService,
|
||||
@IStorageService private readonly storageService: IStorageService
|
||||
@IStorageService private readonly storageService: IStorageService,
|
||||
@IProductService private readonly productService: IProductService,
|
||||
) {
|
||||
super(action, { draggable: false, colors, icon: true }, themeService);
|
||||
}
|
||||
@@ -178,10 +180,11 @@ export class AccountsActionViewItem extends ActivityActionViewItem {
|
||||
|
||||
const result = await Promise.all(allSessions);
|
||||
let menus: IAction[] = [];
|
||||
const authenticationSession = this.environmentService.options?.credentialsProvider ? await getCurrentAuthenticationSessionInfo(this.environmentService, this.productService) : undefined;
|
||||
result.forEach(sessionInfo => {
|
||||
const providerDisplayName = this.authenticationService.getLabel(sessionInfo.providerId);
|
||||
Object.keys(sessionInfo.sessions).forEach(accountName => {
|
||||
const hasEmbedderAccountSession = sessionInfo.sessions[accountName].some(session => session.id === this.environmentService.options?.authenticationSessionId);
|
||||
const hasEmbedderAccountSession = sessionInfo.sessions[accountName].some(session => session.id === (authenticationSession?.id || this.environmentService.options?.authenticationSessionId));
|
||||
const manageExtensionsAction = new Action(`configureSessions${accountName}`, nls.localize('manageTrustedExtensions', "Manage Trusted Extensions"), '', true, _ => {
|
||||
return this.authenticationService.manageTrustedExtensionsForAccount(sessionInfo.providerId, accountName);
|
||||
});
|
||||
|
||||
@@ -170,13 +170,12 @@ export class ActivitybarPart extends Part implements IActivityBarService {
|
||||
|
||||
const toggleAccountsVisibilityAction = new Action(
|
||||
'toggleAccountsVisibility',
|
||||
nls.localize('accounts', "Accounts"),
|
||||
this.accountsVisibilityPreference ? nls.localize('hideAccounts', "Hide Accounts") : nls.localize('showAccounts', "Show Accounts"),
|
||||
undefined,
|
||||
true,
|
||||
async () => { this.accountsVisibilityPreference = !this.accountsVisibilityPreference; }
|
||||
);
|
||||
|
||||
toggleAccountsVisibilityAction.checked = !!this.accountsActivityAction;
|
||||
actions.push(toggleAccountsVisibilityAction);
|
||||
actions.push(new Separator());
|
||||
|
||||
@@ -323,21 +322,22 @@ export class ActivitybarPart extends Part implements IActivityBarService {
|
||||
}
|
||||
|
||||
if (viewContainerOrActionId === GLOBAL_ACTIVITY_ID) {
|
||||
return this.showGlobalActivity(this.globalActivity, this.globalActivityAction, badge, clazz, priority);
|
||||
return this.showGlobalActivity(GLOBAL_ACTIVITY_ID, badge, clazz, priority);
|
||||
}
|
||||
|
||||
if (viewContainerOrActionId === ACCOUNTS_ACTIIVTY_ID) {
|
||||
return this.showGlobalActivity(this.accountsActivity, this.accountsActivityAction, badge, clazz, priority);
|
||||
return this.showGlobalActivity(ACCOUNTS_ACTIIVTY_ID, badge, clazz, priority);
|
||||
}
|
||||
|
||||
return Disposable.None;
|
||||
}
|
||||
|
||||
private showGlobalActivity(activityCache: ICompositeActivity[], activityAction: ActivityAction | undefined, badge: IBadge, clazz?: string, priority?: number): IDisposable {
|
||||
private showGlobalActivity(activityId: string, badge: IBadge, clazz?: string, priority?: number): IDisposable {
|
||||
if (typeof priority !== 'number') {
|
||||
priority = 0;
|
||||
}
|
||||
const activity: ICompositeActivity = { badge, clazz, priority };
|
||||
const activityCache = activityId === GLOBAL_ACTIVITY_ID ? this.globalActivity : this.accountsActivity;
|
||||
|
||||
for (let i = 0; i <= activityCache.length; i++) {
|
||||
if (i === activityCache.length) {
|
||||
@@ -348,24 +348,27 @@ export class ActivitybarPart extends Part implements IActivityBarService {
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.updateGlobalActivity(activityCache, activityAction);
|
||||
this.updateGlobalActivity(activityId);
|
||||
|
||||
return toDisposable(() => this.removeGlobalActivity(activityCache, activityAction, activity));
|
||||
return toDisposable(() => this.removeGlobalActivity(activityId, activity));
|
||||
}
|
||||
|
||||
private removeGlobalActivity(activityCache: ICompositeActivity[], activityAction: ActivityAction | undefined, activity: ICompositeActivity): void {
|
||||
private removeGlobalActivity(activityId: string, activity: ICompositeActivity): void {
|
||||
const activityCache = activityId === GLOBAL_ACTIVITY_ID ? this.globalActivity : this.accountsActivity;
|
||||
const index = activityCache.indexOf(activity);
|
||||
if (index !== -1) {
|
||||
activityCache.splice(index, 1);
|
||||
this.updateGlobalActivity(activityCache, activityAction);
|
||||
this.updateGlobalActivity(activityId);
|
||||
}
|
||||
}
|
||||
|
||||
private updateGlobalActivity(activityCache: ICompositeActivity[], activityAction: ActivityAction | undefined): void {
|
||||
private updateGlobalActivity(activityId: string): void {
|
||||
const activityAction = activityId === GLOBAL_ACTIVITY_ID ? this.globalActivityAction : this.accountsActivityAction;
|
||||
if (!activityAction) {
|
||||
return;
|
||||
}
|
||||
|
||||
const activityCache = activityId === GLOBAL_ACTIVITY_ID ? this.globalActivity : this.accountsActivity;
|
||||
if (activityCache.length) {
|
||||
const [{ badge, clazz, priority }] = activityCache;
|
||||
if (badge instanceof NumberBadge && activityCache.length > 1) {
|
||||
@@ -630,7 +633,7 @@ export class ActivitybarPart extends Part implements IActivityBarService {
|
||||
}
|
||||
}
|
||||
|
||||
this.updateGlobalActivity(this.accountsActivity, this.accountsActivityAction);
|
||||
this.updateGlobalActivity(ACCOUNTS_ACTIIVTY_ID);
|
||||
}
|
||||
|
||||
private getCompositeActions(compositeId: string): { activityAction: ViewContainerActivityAction, pinnedAction: ToggleCompositePinnedAction } {
|
||||
|
||||
@@ -98,7 +98,7 @@ class Item extends BreadcrumbsItem {
|
||||
} else if (this.element instanceof OutlineModel) {
|
||||
// has outline element but not in one
|
||||
let label = document.createElement('div');
|
||||
label.innerHTML = '…';
|
||||
label.innerText = '\u2026';
|
||||
label.className = 'hint-more';
|
||||
container.appendChild(label);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import { Event } from 'vs/base/common/event';
|
||||
import { IConfigurationChangeEvent, IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { ISerializableView } from 'vs/base/browser/ui/grid/grid';
|
||||
import { getCodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { getIEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { IEditorOptions } from 'vs/platform/editor/common/editor';
|
||||
import { IEditorService, IResourceEditorInputType } from 'vs/workbench/services/editor/common/editorService';
|
||||
|
||||
@@ -132,7 +132,7 @@ export interface IEditorGroupView extends IDisposable, ISerializableView, IEdito
|
||||
}
|
||||
|
||||
export function getActiveTextEditorOptions(group: IEditorGroup, expectedActiveEditor?: IEditorInput, presetOptions?: EditorOptions): EditorOptions {
|
||||
const activeGroupCodeEditor = group.activeEditorPane ? getCodeEditor(group.activeEditorPane.getControl()) : undefined;
|
||||
const activeGroupCodeEditor = group.activeEditorPane ? getIEditor(group.activeEditorPane.getControl()) : undefined;
|
||||
if (activeGroupCodeEditor) {
|
||||
if (!expectedActiveEditor || expectedActiveEditor.matches(group.activeEditor)) {
|
||||
return TextEditorOptions.fromEditor(activeGroupCodeEditor, presetOptions);
|
||||
|
||||
@@ -13,7 +13,7 @@ import { IThemeService, Themable } from 'vs/platform/theme/common/themeService';
|
||||
import { activeContrastBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { IEditorIdentifier, EditorInput, EditorOptions } from 'vs/workbench/common/editor';
|
||||
import { isMacintosh, isWeb } from 'vs/base/common/platform';
|
||||
import { GroupDirection, MergeGroupMode } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import { GroupDirection, MergeGroupMode, OpenEditorContext } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import { toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
@@ -282,13 +282,13 @@ class DropOverlay extends Themable {
|
||||
pinned: true, // always pin dropped editor
|
||||
sticky: sourceGroup.isSticky(draggedEditor.editor) // preserve sticky state
|
||||
}));
|
||||
targetGroup.openEditor(draggedEditor.editor, options);
|
||||
const copyEditor = this.isCopyOperation(event, draggedEditor);
|
||||
targetGroup.openEditor(draggedEditor.editor, options, copyEditor ? OpenEditorContext.COPY_EDITOR : OpenEditorContext.MOVE_EDITOR);
|
||||
|
||||
// Ensure target has focus
|
||||
targetGroup.focus();
|
||||
|
||||
// Close in source group unless we copy
|
||||
const copyEditor = this.isCopyOperation(event, draggedEditor);
|
||||
if (!copyEditor) {
|
||||
sourceGroup.closeEditor(draggedEditor.editor);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class GridWidgetView<T extends IView> implements IView {
|
||||
}
|
||||
|
||||
set gridWidget(grid: Grid<T> | undefined) {
|
||||
this.element.innerHTML = '';
|
||||
this.element.innerText = '';
|
||||
|
||||
if (grid) {
|
||||
this.element.appendChild(grid.element);
|
||||
|
||||
@@ -10,7 +10,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
|
||||
import { IRange } from 'vs/editor/common/core/range';
|
||||
import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents';
|
||||
import { ModelDecorationOptions } from 'vs/editor/common/model/textModel';
|
||||
import { ICodeEditor, isCodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { ICodeEditor, isCodeEditor, isCompositeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { TrackedRangeStickiness, IModelDecorationsChangeAccessor } from 'vs/editor/common/model';
|
||||
|
||||
export interface IRangeHighlightDecoration {
|
||||
@@ -44,9 +44,11 @@ export class RangeHighlightDecorations extends Disposable {
|
||||
}
|
||||
|
||||
highlightRange(range: IRangeHighlightDecoration, editor?: any) {
|
||||
editor = editor ? editor : this.getEditor(range);
|
||||
editor = editor ?? this.getEditor(range);
|
||||
if (isCodeEditor(editor)) {
|
||||
this.doHighlightRange(editor, range);
|
||||
} else if (isCompositeEditor(editor) && isCodeEditor(editor.activeCodeEditor)) {
|
||||
this.doHighlightRange(editor.activeCodeEditor, range);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -115,6 +115,10 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-text-button {
|
||||
display: inline-block; /* to enable ellipsis in text overflow */
|
||||
}
|
||||
|
||||
/** Notification: Progress */
|
||||
|
||||
.monaco-workbench .notifications-list-container .progress-bit {
|
||||
|
||||
@@ -293,6 +293,7 @@ export abstract class ViewPane extends Pane implements IView {
|
||||
actionViewItemProvider: action => this.getActionViewItem(action),
|
||||
ariaLabel: nls.localize('viewToolbarAriaLabel', "{0} actions", this.title),
|
||||
getKeyBinding: action => this.keybindingService.lookupKeybinding(action.id),
|
||||
renderDropdownAsChildElement: true
|
||||
});
|
||||
|
||||
this._register(this.toolbar);
|
||||
@@ -506,7 +507,7 @@ export abstract class ViewPane extends Pane implements IView {
|
||||
|
||||
if (!this.shouldShowWelcome()) {
|
||||
removeClass(this.bodyContainer, 'welcome');
|
||||
this.viewWelcomeContainer.innerHTML = '';
|
||||
this.viewWelcomeContainer.innerText = '';
|
||||
this.scrollableElement.scanDomNode();
|
||||
return;
|
||||
}
|
||||
@@ -515,14 +516,14 @@ export abstract class ViewPane extends Pane implements IView {
|
||||
|
||||
if (contents.length === 0) {
|
||||
removeClass(this.bodyContainer, 'welcome');
|
||||
this.viewWelcomeContainer.innerHTML = '';
|
||||
this.viewWelcomeContainer.innerText = '';
|
||||
this.scrollableElement.scanDomNode();
|
||||
return;
|
||||
}
|
||||
|
||||
const disposables = new DisposableStore();
|
||||
addClass(this.bodyContainer, 'welcome');
|
||||
this.viewWelcomeContainer.innerHTML = '';
|
||||
this.viewWelcomeContainer.innerText = '';
|
||||
|
||||
let buttonIndex = 0;
|
||||
|
||||
@@ -606,6 +607,8 @@ const enum DropDirection {
|
||||
RIGHT
|
||||
}
|
||||
|
||||
type BoundingRect = { top: number, left: number, bottom: number, right: number };
|
||||
|
||||
class ViewPaneDropOverlay extends Themable {
|
||||
|
||||
private static readonly OVERLAY_ID = 'monaco-workbench-pane-drop-overlay';
|
||||
@@ -627,6 +630,7 @@ class ViewPaneDropOverlay extends Themable {
|
||||
constructor(
|
||||
private paneElement: HTMLElement,
|
||||
private orientation: Orientation | undefined,
|
||||
private bounds: BoundingRect | undefined,
|
||||
protected location: ViewContainerLocation,
|
||||
protected themeService: IThemeService,
|
||||
) {
|
||||
@@ -758,7 +762,22 @@ class ViewPaneDropOverlay extends Themable {
|
||||
this.doPositionOverlay({ top: '0', right: '0', width: '50%', height: '100%' });
|
||||
break;
|
||||
default:
|
||||
this.doPositionOverlay({ top: '0', left: '0', width: '100%', height: '100%' });
|
||||
// const top = this.bounds?.top || 0;
|
||||
// const left = this.bounds?.bottom || 0;
|
||||
|
||||
let top = '0';
|
||||
let left = '0';
|
||||
let width = '100%';
|
||||
let height = '100%';
|
||||
if (this.bounds) {
|
||||
const boundingRect = this.container.getBoundingClientRect();
|
||||
top = `${this.bounds.top - boundingRect.top}px`;
|
||||
left = `${this.bounds.left - boundingRect.left}px`;
|
||||
height = `${this.bounds.bottom - this.bounds.top}px`;
|
||||
width = `${this.bounds.right - this.bounds.left}px`;
|
||||
}
|
||||
|
||||
this.doPositionOverlay({ top, left, width, height });
|
||||
}
|
||||
|
||||
if ((this.orientation === Orientation.VERTICAL && paneHeight <= 25) ||
|
||||
@@ -899,9 +918,35 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
|
||||
this._register(addDisposableListener(parent, EventType.CONTEXT_MENU, (e: MouseEvent) => this.showContextMenu(new StandardMouseEvent(e))));
|
||||
|
||||
let overlay: ViewPaneDropOverlay | undefined;
|
||||
const getOverlayBounds: () => BoundingRect = () => {
|
||||
const fullSize = parent.getBoundingClientRect();
|
||||
const lastPane = this.panes[this.panes.length - 1].element.getBoundingClientRect();
|
||||
const top = this.orientation === Orientation.VERTICAL ? lastPane.bottom : fullSize.top;
|
||||
const left = this.orientation === Orientation.HORIZONTAL ? lastPane.right : fullSize.left;
|
||||
|
||||
return {
|
||||
top,
|
||||
bottom: fullSize.bottom,
|
||||
left,
|
||||
right: fullSize.right,
|
||||
};
|
||||
};
|
||||
|
||||
const inBounds = (bounds: BoundingRect, pos: { x: number, y: number }) => {
|
||||
return pos.x >= bounds.left && pos.x <= bounds.right && pos.y >= bounds.top && pos.y <= bounds.bottom;
|
||||
};
|
||||
|
||||
|
||||
let bounds: BoundingRect;
|
||||
|
||||
this._register(CompositeDragAndDropObserver.INSTANCE.registerTarget(parent, {
|
||||
onDragEnter: (e) => {
|
||||
if (!overlay && this.panes.length === 0) {
|
||||
bounds = getOverlayBounds();
|
||||
if (overlay && overlay.disposed) {
|
||||
overlay = undefined;
|
||||
}
|
||||
|
||||
if (!overlay && inBounds(bounds, e.eventData)) {
|
||||
const dropData = e.dragAndDropData.getData();
|
||||
if (dropData.type === 'view') {
|
||||
|
||||
@@ -912,7 +957,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
|
||||
return;
|
||||
}
|
||||
|
||||
overlay = new ViewPaneDropOverlay(parent, undefined, this.viewDescriptorService.getViewContainerLocation(this.viewContainer)!, this.themeService);
|
||||
overlay = new ViewPaneDropOverlay(parent, undefined, bounds, this.viewDescriptorService.getViewContainerLocation(this.viewContainer)!, this.themeService);
|
||||
}
|
||||
|
||||
if (dropData.type === 'composite' && dropData.id !== this.viewContainer.id) {
|
||||
@@ -920,14 +965,22 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
|
||||
const viewsToMove = this.viewDescriptorService.getViewContainerModel(container).allViewDescriptors;
|
||||
|
||||
if (!viewsToMove.some(v => !v.canMoveView) && viewsToMove.length > 0) {
|
||||
overlay = new ViewPaneDropOverlay(parent, undefined, this.viewDescriptorService.getViewContainerLocation(this.viewContainer)!, this.themeService);
|
||||
overlay = new ViewPaneDropOverlay(parent, undefined, bounds, this.viewDescriptorService.getViewContainerLocation(this.viewContainer)!, this.themeService);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
onDragOver: (e) => {
|
||||
if (this.panes.length === 0) {
|
||||
if (overlay && overlay.disposed) {
|
||||
overlay = undefined;
|
||||
}
|
||||
|
||||
if (overlay && !inBounds(bounds, e.eventData)) {
|
||||
overlay.dispose();
|
||||
overlay = undefined;
|
||||
}
|
||||
|
||||
if (inBounds(bounds, e.eventData)) {
|
||||
toggleDropEffect(e.eventData.dataTransfer, 'move', overlay !== undefined);
|
||||
}
|
||||
},
|
||||
@@ -954,9 +1007,20 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
|
||||
}
|
||||
}
|
||||
|
||||
const paneCount = this.panes.length;
|
||||
|
||||
if (viewsToMove.length > 0) {
|
||||
this.viewDescriptorService.moveViewsToContainer(viewsToMove, this.viewContainer);
|
||||
}
|
||||
|
||||
if (paneCount > 0) {
|
||||
for (const view of viewsToMove) {
|
||||
const paneToMove = this.panes.find(p => p.id === view.id);
|
||||
if (paneToMove) {
|
||||
this.movePane(paneToMove, this.panes[this.panes.length - 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
overlay?.dispose();
|
||||
@@ -1070,6 +1134,10 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
|
||||
return [];
|
||||
}
|
||||
|
||||
getActionsContext(): unknown {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
getViewsVisibilityActions(): IAction[] {
|
||||
return this.viewContainerModel.activeViewDescriptors.map(viewDescriptor => (<IAction>{
|
||||
id: `${viewDescriptor.id}.toggleVisibility`,
|
||||
@@ -1362,7 +1430,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
|
||||
return;
|
||||
}
|
||||
|
||||
overlay = new ViewPaneDropOverlay(pane.dropTargetElement, this.orientation ?? Orientation.VERTICAL, this.viewDescriptorService.getViewContainerLocation(this.viewContainer)!, this.themeService);
|
||||
overlay = new ViewPaneDropOverlay(pane.dropTargetElement, this.orientation ?? Orientation.VERTICAL, undefined, this.viewDescriptorService.getViewContainerLocation(this.viewContainer)!, this.themeService);
|
||||
}
|
||||
|
||||
if (dropData.type === 'composite' && dropData.id !== this.viewContainer.id && !this.viewContainer.rejectAddedViews) {
|
||||
@@ -1370,7 +1438,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
|
||||
const viewsToMove = this.viewDescriptorService.getViewContainerModel(container).allViewDescriptors;
|
||||
|
||||
if (!viewsToMove.some(v => !v.canMoveView) && viewsToMove.length > 0) {
|
||||
overlay = new ViewPaneDropOverlay(pane.dropTargetElement, this.orientation ?? Orientation.VERTICAL, this.viewDescriptorService.getViewContainerLocation(this.viewContainer)!, this.themeService);
|
||||
overlay = new ViewPaneDropOverlay(pane.dropTargetElement, this.orientation ?? Orientation.VERTICAL, undefined, this.viewDescriptorService.getViewContainerLocation(this.viewContainer)!, this.themeService);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,9 @@ import { InMemoryFileSystemProvider } from 'vs/platform/files/common/inMemoryFil
|
||||
import { WebResourceIdentityService, IResourceIdentityService } from 'vs/platform/resource/common/resourceIdentityService';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IndexedDB, INDEXEDDB_LOGS_OBJECT_STORE, INDEXEDDB_USERDATA_OBJECT_STORE } from 'vs/platform/files/browser/indexedDBFileSystemProvider';
|
||||
import { BrowserRequestService } from 'vs/workbench/services/request/browser/requestService';
|
||||
import { IRequestService } from 'vs/platform/request/common/request';
|
||||
import { IUserDataInitializationService, UserDataInitializationService } from 'vs/workbench/services/userData/browser/userDataInit';
|
||||
|
||||
class BrowserMain extends Disposable {
|
||||
|
||||
@@ -180,7 +183,7 @@ class BrowserMain extends Disposable {
|
||||
await this.registerFileSystemProviders(environmentService, fileService, remoteAgentService, logService, logsPath);
|
||||
|
||||
// Long running services (workspace, config, storage)
|
||||
const services = await Promise.all([
|
||||
const [configurationService, storageService] = await Promise.all([
|
||||
this.createWorkspaceService(payload, environmentService, fileService, remoteAgentService, logService).then(service => {
|
||||
|
||||
// Workspace
|
||||
@@ -201,7 +204,16 @@ class BrowserMain extends Disposable {
|
||||
})
|
||||
]);
|
||||
|
||||
return { serviceCollection, logService, storageService: services[1] };
|
||||
// Request Service
|
||||
const requestService = new BrowserRequestService(remoteAgentService, configurationService, logService);
|
||||
serviceCollection.set(IRequestService, requestService);
|
||||
|
||||
// initialize user data
|
||||
const userDataInitializationService = new UserDataInitializationService(environmentService, fileService, storageService, productService, requestService, logService);
|
||||
serviceCollection.set(IUserDataInitializationService, userDataInitializationService);
|
||||
await userDataInitializationService.initializeRequiredResources();
|
||||
|
||||
return { serviceCollection, logService, storageService };
|
||||
}
|
||||
|
||||
private async registerFileSystemProviders(environmentService: IWorkbenchEnvironmentService, fileService: IFileService, remoteAgentService: IRemoteAgentService, logService: BufferLogService, logsPath: URI): Promise<void> {
|
||||
|
||||
@@ -309,7 +309,7 @@ import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuratio
|
||||
|
||||
const base = '${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}';
|
||||
if (isWeb) {
|
||||
return base + '${separator}${remoteName}'; // Web: always show remote indicator
|
||||
return base + '${separator}${remoteName}'; // Web: always show remote name
|
||||
}
|
||||
|
||||
return base;
|
||||
@@ -412,7 +412,7 @@ import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuratio
|
||||
'zenMode.hideActivityBar': {
|
||||
'type': 'boolean',
|
||||
'default': true,
|
||||
'description': nls.localize('zenMode.hideActivityBar', "Controls whether turning on Zen Mode also hides the activity bar at the left of the workbench.")
|
||||
'description': nls.localize('zenMode.hideActivityBar', "Controls whether turning on Zen Mode also hides the activity bar either at the left or right of the workbench.")
|
||||
},
|
||||
'zenMode.hideLineNumbers': {
|
||||
'type': 'boolean',
|
||||
|
||||
Reference in New Issue
Block a user