import { URI } from "../../../../../base/common/uri.js"; import { IWorkbenchLayoutService } from "../../../../services/layout/browser/layoutService.service.js"; import { IWorkspace, WorkbenchState } from "../../../../../platform/workspace/common/workspace.js"; import { IWorkspaceContextService } from "../../../../../platform/workspace/common/workspace.service.js"; import { IConfigurationService } from "../../../../../platform/configuration/common/configuration.service.js"; import { IKeybindingService } from "../../../../../platform/keybinding/common/keybinding.service.js"; import { IInstantiationService } from "../../../../../platform/instantiation/common/instantiation.js"; import { IProgressService } from "../../../../../platform/progress/common/progress.service.js"; import { IContextMenuService } from "../../../../../platform/contextview/browser/contextView.service.js"; import { IContextKeyService } from "../../../../../platform/contextkey/common/contextkey.service.js"; import { IEditorService } from "../../../../services/editor/common/editorService.service.js"; import { IViewPaneOptions, ViewPane } from "../../../../browser/parts/views/viewPane.js"; import { ILabelService } from "../../../../../platform/label/common/label.service.js"; import { ICompressedNavigationController } from "./explorerViewer.js"; import { IThemeService } from "../../../../../platform/theme/common/themeService.service.js"; import { IWorkbenchThemeService } from "../../../../services/themes/common/workbenchThemeService.service.js"; import { ITelemetryService } from "../../../../../platform/telemetry/common/telemetry.service.js"; import { ExplorerItem } from "../../common/explorerModel.js"; import { IStorageService } from "../../../../../platform/storage/common/storage.service.js"; import { IClipboardService } from "../../../../../platform/clipboard/common/clipboardService.service.js"; import { IFileService } from "../../../../../platform/files/common/files.service.js"; import { IDisposable } from "../../../../../base/common/lifecycle.js"; import { IViewDescriptorService } from "../../../../common/views.service.js"; import { IOpenerService } from "../../../../../platform/opener/common/opener.service.js"; import { IUriIdentityService } from "../../../../../platform/uriIdentity/common/uriIdentity.service.js"; import { IExplorerView } from "../files.js"; import { IExplorerService } from "../files.service.js"; import { ICommandService } from "../../../../../platform/commands/common/commands.service.js"; import { IEditorResolverService } from "../../../../services/editor/common/editorResolverService.service.js"; import { IHoverService } from "../../../../../platform/hover/browser/hover.service.js"; import { IAccessibilityService } from "../../../../../platform/accessibility/common/accessibility.service.js"; import { IEnvironmentService } from "../../../../../platform/environment/common/environment.service.js"; export declare function getContext(focus: ExplorerItem[], selection: ExplorerItem[], respectMultiSelection: boolean, compressedNavigationControllerProvider: { getCompressedNavigationController(stat: ExplorerItem): ICompressedNavigationController[] | undefined; }): ExplorerItem[]; export interface IExplorerViewContainerDelegate { willOpenElement(event?: UIEvent): void; didOpenElement(event?: UIEvent): void; } export interface IExplorerViewPaneOptions extends IViewPaneOptions { delegate: IExplorerViewContainerDelegate; } /** * Marks the Explorer pane header as showing a name the user chose. */ export declare const PRESERVE_WORKSPACE_NAME_CASE_CLASS = "preserve-workspace-name-case"; /** * Marks the part hosting the Explorer as showing a name the user chose in its * merged (single view) title. */ export declare const PRESERVE_MERGED_WORKSPACE_NAME_CASE_CLASS = "preserve-merged-workspace-name-case"; /** * Whether the Explorer title shows a name the user provided and therefore has to * be rendered with its original casing. Untitled workspaces show a generated * label and empty workbenches show a static label, so both keep the default casing. */ export declare function shouldPreserveWorkspaceNameCase(workbenchState: WorkbenchState, workspace: IWorkspace, environmentService: IEnvironmentService): boolean; export declare class ExplorerView extends ViewPane implements IExplorerView { private readonly contextService; private readonly progressService; private readonly editorService; private readonly editorResolverService; private readonly layoutService; private readonly labelService; private readonly telemetryService; private readonly explorerService; private readonly storageService; private clipboardService; private readonly fileService; private readonly uriIdentityService; protected readonly commandService: ICommandService; private readonly accessibilityService; private readonly environmentService; static readonly TREE_VIEW_STATE_STORAGE_KEY: string; private tree; private filter; private findProvider; private resourceContext; private folderContext; private parentReadonlyContext; private readonlyContext; private availableEditorIdsContext; private rootContext; private resourceMoveableToTrash; private renderer; private treeContainer; private container; private compressedFocusContext; private compressedFocusFirstContext; private compressedFocusLastContext; private viewHasSomeCollapsibleRootItem; private viewVisibleContextKey; private readonly setTreeInputSequencer; private horizontalScrolling; private dragHandler; private _autoReveal; private readonly delegate; private workspaceTitleContainer; get singleViewPaneContainerTitle(): string; constructor(options: IExplorerViewPaneOptions, contextMenuService: IContextMenuService, viewDescriptorService: IViewDescriptorService, instantiationService: IInstantiationService, contextService: IWorkspaceContextService, progressService: IProgressService, editorService: IEditorService, editorResolverService: IEditorResolverService, layoutService: IWorkbenchLayoutService, keybindingService: IKeybindingService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, labelService: ILabelService, themeService: IWorkbenchThemeService, telemetryService: ITelemetryService, hoverService: IHoverService, explorerService: IExplorerService, storageService: IStorageService, clipboardService: IClipboardService, fileService: IFileService, uriIdentityService: IUriIdentityService, commandService: ICommandService, openerService: IOpenerService, accessibilityService: IAccessibilityService, environmentService: IEnvironmentService); get autoReveal(): boolean | "force" | "focusNoScroll"; set autoReveal(autoReveal: boolean | "force" | "focusNoScroll"); get name(): string; get title(): string; set title(_: string); get headerVisible(): boolean; set headerVisible(visible: boolean); setVisible(visible: boolean): void; private get fileCopiedContextKey(); private get resourceCutContextKey(); protected renderHeader(container: HTMLElement): void; private updateWorkspaceTitleContainer; private clearWorkspaceTitleContainer; private updateWorkspaceTitleCase; protected layoutBody(height: number, width: number): void; protected renderBody(container: HTMLElement): void; focus(): void; hasFocus(): boolean; getFocus(): ExplorerItem[]; focusNext(): void; focusLast(): void; getContext(respectMultiSelection: boolean): ExplorerItem[]; isItemVisible(item: ExplorerItem): boolean; isItemCollapsed(item: ExplorerItem): boolean; setEditable(stat: ExplorerItem, isEditing: boolean): Promise; private selectActiveFile; private createTree; private onConfigurationUpdated; private storeTreeViewState; private setContextKeys; private onContextMenu; private onFocusChanged; /** * Safely queries the file explorer tree for the relative top of an element. * * `hasNode()` and `getRelativeTop()` consult different internal maps in the * compressible async data tree. During an async refresh (e.g. when the * underlying file system provider changes, or file nesting settings update) * there is a microtask gap where one map has been updated but the other has * not. In that window `getRelativeTop()` can throw * `TreeError [FileExplorer] Tree element not found` (issue #188365) even * though the caller reasonably believed the element was still present. * * Treat such a failure as "not currently visible" so that callers fall back * to their not-visible branch (e.g. finishing editable state, or calling * `reveal()`), which is safe when the element is still in the data source * even if the view has not caught up yet. */ private tryGetRelativeTop; /** * Refresh the contents of the explorer to get up to date data from the disk about the file structure. * If the item is passed we refresh only that level of the tree, otherwise we do a full refresh. */ refresh(recursive: boolean, item?: ExplorerItem, cancelEditing?: boolean): Promise; getOptimalWidth(): number; setTreeInput(): Promise; private doSetTreeInput; selectResource(resource: URI | undefined, reveal?: "focusNoScroll" | "force" | boolean, retry?: number): Promise; itemsCopied(stats: ExplorerItem[], cut: boolean, previousCut: ExplorerItem[] | undefined): void; expandAll(): void; collapseAll(): void; previousCompressedStat(): void; nextCompressedStat(): void; firstCompressedStat(): void; lastCompressedStat(): void; private updateCompressedNavigationContextKeys; private updateAnyCollapsedContext; hasPhantomElements(): boolean; dispose(): void; } export declare function createFileIconThemableTreeContainerScope(container: HTMLElement, themeService: IThemeService): IDisposable;