mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 966b87dd4013be1a9c06e2b8334522ec61905cc2 (#4696)
This commit is contained in:
@@ -9,7 +9,7 @@ import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/c
|
||||
import { InputFocusedContext } from 'vs/platform/contextkey/common/contextkeys';
|
||||
import { IWindowConfiguration, IWindowService } from 'vs/platform/windows/common/windows';
|
||||
import { ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, TEXT_DIFF_EDITOR_ID, SplitEditorsVertically, InEditorZenModeContext } from 'vs/workbench/common/editor';
|
||||
import { IsMacContext, IsLinuxContext, IsWindowsContext, HasMacNativeTabsContext, IsDevelopmentContext, SupportsWorkspacesContext, SupportsOpenFileFolderContext, WorkbenchStateContext, WorkspaceFolderCountContext } from 'vs/workbench/common/contextkeys';
|
||||
import { IsMacContext, IsLinuxContext, IsWindowsContext, HasMacNativeTabsContext, IsDevelopmentContext, SupportsWorkspacesContext, SupportsOpenFileFolderContext, WorkbenchStateContext, WorkspaceFolderCountContext, IsRemoteContext } from 'vs/workbench/common/contextkeys';
|
||||
import { trackFocus, addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
@@ -90,6 +90,8 @@ export class WorkbenchContextKeysHandler extends Disposable {
|
||||
IsLinuxContext.bindTo(this.contextKeyService);
|
||||
IsWindowsContext.bindTo(this.contextKeyService);
|
||||
|
||||
IsRemoteContext.bindTo(this.contextKeyService).set(!!this.windowService.getConfiguration().remoteAuthority);
|
||||
|
||||
// macOS Native Tabs
|
||||
const windowConfig = this.configurationService.getValue<IWindowConfiguration>();
|
||||
HasMacNativeTabsContext.bindTo(this.contextKeyService).set(windowConfig && windowConfig.window && windowConfig.window.nativeTabs);
|
||||
|
||||
@@ -175,7 +175,7 @@ class EditorRegistry implements IEditorRegistry {
|
||||
getEditorInputs(): SyncDescriptor<EditorInput>[] {
|
||||
const inputClasses: SyncDescriptor<EditorInput>[] = [];
|
||||
for (const editor of this.editors) {
|
||||
const editorInputDescriptors = editor[INPUT_DESCRIPTORS_PROPERTY];
|
||||
const editorInputDescriptors: SyncDescriptor<EditorInput>[] = editor[INPUT_DESCRIPTORS_PROPERTY];
|
||||
inputClasses.push(...editorInputDescriptors.map(descriptor => descriptor.ctor));
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IBackupFileService } from 'vs/workbench/services/backup/common/backup';
|
||||
import { ITextSnapshot, IFileStat, IContent, IFileService, IResourceEncodings, IResolveFileOptions, IResolveFileResult, IResolveContentOptions, IStreamContent, IUpdateContentOptions, snapshotToString, ICreateFileOptions, IResourceEncoding, IFileStatWithMetadata } from 'vs/platform/files/common/files';
|
||||
import { ITextSnapshot, IFileStat, IContent, IFileService, IResourceEncodings, IResolveFileOptions, IResolveFileResult, IResolveContentOptions, IStreamContent, IUpdateContentOptions, snapshotToString, ICreateFileOptions, IResourceEncoding, IFileStatWithMetadata, FileSystemProviderCapabilities } from 'vs/platform/files/common/files';
|
||||
import { ITextBufferFactory } from 'vs/editor/common/model';
|
||||
import { createTextBufferFactoryFromSnapshot } from 'vs/editor/common/model/textModel';
|
||||
import { keys, ResourceMap } from 'vs/base/common/map';
|
||||
@@ -14,8 +14,7 @@ import { Event } from 'vs/base/common/event';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
// tslint:disable-next-line: import-patterns no-standalone-editor
|
||||
import { SimpleConfigurationService as StandaloneEditorConfigurationService, SimpleDialogService as StandaloneEditorDialogService, StandaloneKeybindingService, SimpleResourcePropertiesService } from 'vs/editor/standalone/browser/simpleServices';
|
||||
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { SimpleConfigurationService as StandaloneEditorConfigurationService, StandaloneKeybindingService, SimpleResourcePropertiesService } from 'vs/editor/standalone/browser/simpleServices';
|
||||
import { IDownloadService } from 'vs/platform/download/common/download';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { IEnvironmentService, IExtensionHostDebugParams, IDebugParams } from 'vs/platform/environment/common/environment';
|
||||
@@ -48,7 +47,7 @@ import { InMemoryStorageService, IStorageService } from 'vs/platform/storage/com
|
||||
import { ITextMateService, IGrammar as ITextMategrammar } from 'vs/workbench/services/textMate/common/textMateService';
|
||||
import { LanguageId, TokenizationRegistry } from 'vs/editor/common/modes';
|
||||
import { IUpdateService, State } from 'vs/platform/update/common/update';
|
||||
import { IWindowConfiguration, IPath, IPathsToWaitFor, IWindowService, INativeOpenDialogOptions, IEnterWorkspaceResult, IURIToOpen, IMessageBoxResult, IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { IWindowConfiguration, IPath, IPathsToWaitFor, IWindowService, INativeOpenDialogOptions, IEnterWorkspaceResult, IURIToOpen, IMessageBoxResult, IWindowsService, IOpenSettings } from 'vs/platform/windows/common/windows';
|
||||
import { IProcessEnvironment, isWindows } from 'vs/base/common/platform';
|
||||
import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, IWorkspaceFolderCreationData, isSingleFolderWorkspaceIdentifier, IWorkspacesService } from 'vs/platform/workspaces/common/workspaces';
|
||||
import { ExportData } from 'vs/base/common/performance';
|
||||
@@ -202,9 +201,9 @@ registerSingleton(IConfigurationService, SimpleConfigurationService);
|
||||
|
||||
//#region Dialog
|
||||
|
||||
export class SimpleDialogService extends StandaloneEditorDialogService { }
|
||||
// export class SimpleDialogService extends StandaloneEditorDialogService { }
|
||||
|
||||
registerSingleton(IDialogService, SimpleDialogService, true);
|
||||
// registerSingleton(IDialogService, SimpleDialogService, true);
|
||||
|
||||
//#endregion
|
||||
|
||||
@@ -655,6 +654,8 @@ export class SimpleRemoteAgentService implements IRemoteAgentService {
|
||||
}
|
||||
}
|
||||
|
||||
registerSingleton(IRemoteAgentService, SimpleRemoteAgentService);
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Remote Authority Resolver
|
||||
@@ -797,6 +798,8 @@ export class SimpleRemoteFileService implements IFileService {
|
||||
|
||||
canHandleResource(resource: URI): boolean { return resource.scheme === 'file'; }
|
||||
|
||||
hasCapability(resource: URI, capability: FileSystemProviderCapabilities): Promise<boolean> { return Promise.resolve(false); }
|
||||
|
||||
del(_resource: URI, _options?: { useTrash?: boolean, recursive?: boolean }): Promise<void> { return Promise.resolve(); }
|
||||
|
||||
watchFileChanges(_resource: URI): void { }
|
||||
@@ -1431,7 +1434,7 @@ export class SimpleWindowService implements IWindowService {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
openWindow(_uris: IURIToOpen[], _options?: { forceNewWindow?: boolean, forceReuseWindow?: boolean, forceOpenWorkspaceAsFile?: boolean }): Promise<void> {
|
||||
openWindow(_uris: IURIToOpen[], _options?: IOpenSettings): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
@@ -1447,10 +1450,6 @@ export class SimpleWindowService implements IWindowService {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
show(): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
showMessageBox(_options: Electron.MessageBoxOptions): Promise<IMessageBoxResult> {
|
||||
return Promise.resolve({ button: 0 });
|
||||
}
|
||||
@@ -1606,7 +1605,7 @@ export class SimpleWindowsService implements IWindowsService {
|
||||
}
|
||||
|
||||
// Global methods
|
||||
openWindow(_windowId: number, _uris: IURIToOpen[], _options?: { forceNewWindow?: boolean, forceReuseWindow?: boolean, forceOpenWorkspaceAsFile?: boolean }): Promise<void> {
|
||||
openWindow(_windowId: number, _uris: IURIToOpen[], _options: IOpenSettings): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
@@ -1614,10 +1613,6 @@ export class SimpleWindowsService implements IWindowsService {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
showWindow(_windowId: number): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
getWindows(): Promise<{ id: number; workspace?: IWorkspaceIdentifier; folderUri?: ISingleFolderWorkspaceIdentifier; title: string; filename?: string; }[]> {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ export class ActivitybarPart extends Part implements IActivityBarService {
|
||||
private cachedViewlets: ICachedViewlet[] = [];
|
||||
private compositeBar: CompositeBar;
|
||||
private compositeActions: { [compositeId: string]: { activityAction: ViewletActivityAction, pinnedAction: ToggleCompositePinnedAction } } = Object.create(null);
|
||||
private readonly viewletDisposables: Map<string, IDisposable> = new Map<string, IDisposable>();
|
||||
|
||||
constructor(
|
||||
@IViewletService private readonly viewletService: IViewletService,
|
||||
@@ -121,7 +122,7 @@ export class ActivitybarPart extends Part implements IActivityBarService {
|
||||
|
||||
// Viewlet registration
|
||||
this._register(this.viewletService.onDidViewletRegister(viewlet => this.onDidRegisterViewlets([viewlet])));
|
||||
this._register(this.viewletService.onDidViewletDeregister(({ id }) => this.removeComposite(id, true)));
|
||||
this._register(this.viewletService.onDidViewletDeregister(({ id }) => this.onDidDeregisterViewlet(id)));
|
||||
|
||||
// Activate viewlet action on opening of a viewlet
|
||||
this._register(this.viewletService.onDidViewletOpen(viewlet => this.onDidViewletOpen(viewlet)));
|
||||
@@ -144,29 +145,9 @@ export class ActivitybarPart extends Part implements IActivityBarService {
|
||||
private onDidRegisterExtensions(): void {
|
||||
this.removeNotExistingComposites();
|
||||
|
||||
for (const viewlet of this.viewletService.getViewlets()) {
|
||||
this.enableCompositeActions(viewlet);
|
||||
const viewContainer = this.getViewContainer(viewlet.id);
|
||||
if (viewContainer && viewContainer.hideIfEmpty) {
|
||||
const viewDescriptors = this.viewsService.getViewDescriptors(viewContainer);
|
||||
if (viewDescriptors) {
|
||||
this.onDidChangeActiveViews(viewlet, viewDescriptors);
|
||||
viewDescriptors.onDidChangeActiveViews(() => this.onDidChangeActiveViews(viewlet, viewDescriptors));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.saveCachedViewlets();
|
||||
}
|
||||
|
||||
private onDidChangeActiveViews(viewlet: ViewletDescriptor, viewDescriptors: IViewDescriptorCollection): void {
|
||||
if (viewDescriptors.activeViewDescriptors.length) {
|
||||
this.compositeBar.addComposite(viewlet);
|
||||
} else {
|
||||
this.removeComposite(viewlet.id, true);
|
||||
}
|
||||
}
|
||||
|
||||
private onDidViewletOpen(viewlet: IViewlet): void {
|
||||
|
||||
// Update the composite bar by adding
|
||||
@@ -321,6 +302,34 @@ export class ActivitybarPart extends Part implements IActivityBarService {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const viewlet of viewlets) {
|
||||
this.enableCompositeActions(viewlet);
|
||||
const viewContainer = this.getViewContainer(viewlet.id);
|
||||
if (viewContainer && viewContainer.hideIfEmpty) {
|
||||
const viewDescriptors = this.viewsService.getViewDescriptors(viewContainer);
|
||||
if (viewDescriptors) {
|
||||
this.onDidChangeActiveViews(viewlet, viewDescriptors);
|
||||
this.viewletDisposables.set(viewlet.id, viewDescriptors.onDidChangeActiveViews(() => this.onDidChangeActiveViews(viewlet, viewDescriptors)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private onDidDeregisterViewlet(viewletId: string): void {
|
||||
const disposable = this.viewletDisposables.get(viewletId);
|
||||
if (disposable) {
|
||||
disposable.dispose();
|
||||
}
|
||||
this.viewletDisposables.delete(viewletId);
|
||||
this.removeComposite(viewletId, true);
|
||||
}
|
||||
|
||||
private onDidChangeActiveViews(viewlet: ViewletDescriptor, viewDescriptors: IViewDescriptorCollection): void {
|
||||
if (viewDescriptors.activeViewDescriptors.length) {
|
||||
this.compositeBar.addComposite(viewlet);
|
||||
} else {
|
||||
this.removeComposite(viewlet.id, true);
|
||||
}
|
||||
}
|
||||
|
||||
private shouldBeHidden(viewletId: string, cachedViewlet: ICachedViewlet): boolean {
|
||||
|
||||
@@ -336,7 +336,12 @@ export class BreadcrumbsControl {
|
||||
editorViewState = undefined;
|
||||
}
|
||||
this._contextViewService.hideContextView(this);
|
||||
this._revealInEditor(event, data.target, this._getEditorGroup(data.payload && data.payload.originalEvent), (data.payload && data.payload.originalEvent && data.payload.originalEvent.middleButton));
|
||||
|
||||
const group = (picker.useAltAsMultipleSelectionModifier && (data.browserEvent as MouseEvent).metaKey) || (!picker.useAltAsMultipleSelectionModifier && (data.browserEvent as MouseEvent).altKey)
|
||||
? SIDE_GROUP
|
||||
: ACTIVE_GROUP;
|
||||
|
||||
this._revealInEditor(event, data.target, group, (data.browserEvent as MouseEvent).button === 1);
|
||||
/* __GDPR__
|
||||
"breadcrumbs/open" : {
|
||||
"type": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||
@@ -464,10 +469,10 @@ export class BreadcrumbsControl {
|
||||
}
|
||||
}
|
||||
|
||||
private _getEditorGroup(data: StandardMouseEvent | object): SIDE_GROUP_TYPE | ACTIVE_GROUP_TYPE | undefined {
|
||||
if (data === BreadcrumbsControl.Payload_RevealAside || (data instanceof StandardMouseEvent && data.altKey)) {
|
||||
private _getEditorGroup(data: object): SIDE_GROUP_TYPE | ACTIVE_GROUP_TYPE | undefined {
|
||||
if (data === BreadcrumbsControl.Payload_RevealAside) {
|
||||
return SIDE_GROUP;
|
||||
} else if (data === BreadcrumbsControl.Payload_Reveal || (data instanceof StandardMouseEvent && data.metaKey)) {
|
||||
} else if (data === BreadcrumbsControl.Payload_Reveal) {
|
||||
return ACTIVE_GROUP;
|
||||
} else {
|
||||
return undefined;
|
||||
|
||||
@@ -205,7 +205,7 @@ export class EditorBreadcrumbsModel {
|
||||
let chain: Array<OutlineGroup | OutlineElement> = [];
|
||||
while (item) {
|
||||
chain.push(item);
|
||||
let parent = item.parent;
|
||||
let parent: any = item.parent;
|
||||
if (parent instanceof OutlineModel) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,11 @@ interface ILayoutInfo {
|
||||
|
||||
type Tree<I, E> = WorkbenchDataTree<I, E, FuzzyScore> | WorkbenchAsyncDataTree<I, E, FuzzyScore>;
|
||||
|
||||
export interface SelectEvent {
|
||||
target: any;
|
||||
browserEvent: UIEvent;
|
||||
}
|
||||
|
||||
export abstract class BreadcrumbsPicker {
|
||||
|
||||
protected readonly _disposables = new Array<IDisposable>();
|
||||
@@ -58,11 +63,11 @@ export abstract class BreadcrumbsPicker {
|
||||
protected _fakeEvent = new UIEvent('fakeEvent');
|
||||
protected _layoutInfo: ILayoutInfo;
|
||||
|
||||
private readonly _onDidPickElement = new Emitter<{ target: any, payload: any }>();
|
||||
readonly onDidPickElement: Event<{ target: any, payload: any }> = this._onDidPickElement.event;
|
||||
private readonly _onDidPickElement = new Emitter<SelectEvent>();
|
||||
readonly onDidPickElement: Event<SelectEvent> = this._onDidPickElement.event;
|
||||
|
||||
private readonly _onDidFocusElement = new Emitter<{ target: any, payload: any }>();
|
||||
readonly onDidFocusElement: Event<{ target: any, payload: any }> = this._onDidFocusElement.event;
|
||||
private readonly _onDidFocusElement = new Emitter<SelectEvent>();
|
||||
readonly onDidFocusElement: Event<SelectEvent> = this._onDidFocusElement.event;
|
||||
|
||||
constructor(
|
||||
parent: HTMLElement,
|
||||
@@ -106,18 +111,18 @@ export abstract class BreadcrumbsPicker {
|
||||
|
||||
this._disposables.push(this._tree.onDidChangeSelection(e => {
|
||||
if (e.browserEvent !== this._fakeEvent) {
|
||||
const target = this._getTargetFromEvent(e.elements[0], e.browserEvent);
|
||||
const target = this._getTargetFromEvent(e.elements[0]);
|
||||
if (target) {
|
||||
setTimeout(_ => {// need to debounce here because this disposes the tree and the tree doesn't like to be disposed on click
|
||||
this._onDidPickElement.fire({ target, payload: undefined });
|
||||
this._onDidPickElement.fire({ target, browserEvent: e.browserEvent || new UIEvent('fake') });
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
}));
|
||||
this._disposables.push(this._tree.onDidChangeFocus(e => {
|
||||
const target = this._getTargetFromEvent(e.elements[0], e.browserEvent);
|
||||
const target = this._getTargetFromEvent(e.elements[0]);
|
||||
if (target) {
|
||||
this._onDidFocusElement.fire({ target, payload: undefined });
|
||||
this._onDidFocusElement.fire({ target, browserEvent: e.browserEvent || new UIEvent('fake') });
|
||||
}
|
||||
}));
|
||||
this._disposables.push(this._tree.onDidChangeContentHeight(() => {
|
||||
@@ -155,9 +160,13 @@ export abstract class BreadcrumbsPicker {
|
||||
|
||||
}
|
||||
|
||||
get useAltAsMultipleSelectionModifier() {
|
||||
return this._tree.useAltAsMultipleSelectionModifier;
|
||||
}
|
||||
|
||||
protected abstract _setInput(element: BreadcrumbElement): Promise<void>;
|
||||
protected abstract _createTree(container: HTMLElement): Tree<any, any>;
|
||||
protected abstract _getTargetFromEvent(element: any, payload: UIEvent | undefined): any | undefined;
|
||||
protected abstract _getTargetFromEvent(element: any): any | undefined;
|
||||
}
|
||||
|
||||
//#region - Files
|
||||
@@ -425,7 +434,7 @@ export class BreadcrumbsFilePicker extends BreadcrumbsPicker {
|
||||
});
|
||||
}
|
||||
|
||||
protected _getTargetFromEvent(element: any, _payload: any): any | undefined {
|
||||
protected _getTargetFromEvent(element: any): any | undefined {
|
||||
// todo@joh
|
||||
if (element && !IWorkspaceFolder.isIWorkspaceFolder(element) && !(element as IFileStat).isDirectory) {
|
||||
return new FileElement((element as IFileStat).resource, FileKind.FILE);
|
||||
|
||||
@@ -20,7 +20,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ClosePanelAction, TogglePanelPositionAction, PanelActivityAction, ToggleMaximizedPanelAction, TogglePanelAction } from 'vs/workbench/browser/parts/panel/panelActions';
|
||||
import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
|
||||
import { PANEL_BACKGROUND, PANEL_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER, PANEL_DRAG_AND_DROP_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { PANEL_BACKGROUND, PANEL_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER, PANEL_DRAG_AND_DROP_BACKGROUND, PANEL_INPUT_BORDER } from 'vs/workbench/common/theme';
|
||||
import { activeContrastBorder, focusBorder, contrastBorder, editorBackground, badgeBackground, badgeForeground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { CompositeBar, ICompositeBarItem } from 'vs/workbench/browser/parts/compositeBar';
|
||||
import { ToggleCompositePinnedAction } from 'vs/workbench/browser/parts/compositeBarActions';
|
||||
@@ -484,8 +484,6 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
|
||||
// Styling with Outline color (e.g. high contrast theme)
|
||||
const outline = theme.getColor(activeContrastBorder);
|
||||
if (outline) {
|
||||
const outline = theme.getColor(activeContrastBorder);
|
||||
|
||||
collector.addRule(`
|
||||
.monaco-workbench .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item.checked .action-label,
|
||||
.monaco-workbench .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label:hover {
|
||||
@@ -502,6 +500,15 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
const inputBorder = theme.getColor(PANEL_INPUT_BORDER);
|
||||
if (inputBorder) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .part.panel .monaco-inputbox {
|
||||
border-color: ${inputBorder}
|
||||
}
|
||||
`);
|
||||
}
|
||||
});
|
||||
|
||||
registerSingleton(IPanelService, PanelPart);
|
||||
@@ -463,6 +463,10 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
|
||||
this.update();
|
||||
}
|
||||
|
||||
public inputHasFocus(): boolean {
|
||||
return this.visible ? this.ui.inputBox.hasFocus() : false;
|
||||
}
|
||||
|
||||
onDidChangeSelection = this.onDidChangeSelectionEmitter.event;
|
||||
|
||||
onDidTriggerItemButton = this.onDidTriggerItemButtonEmitter.event;
|
||||
|
||||
@@ -81,6 +81,10 @@ export class QuickInputBox {
|
||||
this.inputBox.setEnabled(enabled);
|
||||
}
|
||||
|
||||
hasFocus(): boolean {
|
||||
return this.inputBox.hasFocus();
|
||||
}
|
||||
|
||||
setAttribute(name: string, value: string) {
|
||||
this.inputBox.inputElement.setAttribute(name, value);
|
||||
}
|
||||
|
||||
@@ -173,10 +173,10 @@ export class Workbench extends Layout {
|
||||
// Layout Service
|
||||
serviceCollection.set(IWorkbenchLayoutService, this);
|
||||
|
||||
//
|
||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
// NOTE: DO NOT ADD ANY OTHER SERVICE INTO THE COLLECTION HERE.
|
||||
// INSTEAD, CONTRIBUTE IT VIA WORKBENCH.MAIN.TS
|
||||
//
|
||||
// CONTRIBUTE IT VIA WORKBENCH.MAIN.TS AND registerSingleton().
|
||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
// All Contributed Services
|
||||
const contributedServices = getServices();
|
||||
@@ -192,8 +192,8 @@ export class Workbench extends Layout {
|
||||
|
||||
// TODO@Ben legacy file service
|
||||
const fileService = accessor.get(IFileService) as any;
|
||||
if (typeof fileService.setImpl === 'function') {
|
||||
fileService.setImpl(accessor.get(ILegacyFileService));
|
||||
if (typeof fileService.setLegacyService === 'function') {
|
||||
fileService.setLegacyService(accessor.get(ILegacyFileService));
|
||||
}
|
||||
|
||||
// TODO@Sandeep debt around cyclic dependencies
|
||||
|
||||
Reference in New Issue
Block a user