UNPKG

@theia/core

Version:

Theia is a cloud & desktop IDE framework implemented in TypeScript.

133 lines • 7.7 kB
import { MenuContribution, MenuModelRegistry } from '../common/menu/index.js'; import { CommonMenus } from './common-menus.js'; export { CommonMenus }; import { KeybindingContribution, KeybindingRegistry } from './keybinding.js'; import { FrontendApplication } from './frontend-application.js'; import { FrontendApplicationContribution, OnWillStopAction } from './frontend-application-contribution.js'; import { CommandContribution, CommandRegistry, Command } from '../common/command.js'; import { CommonCommands } from './common-commands.js'; export { CommonCommands }; import { SelectionService } from '../common/selection-service.js'; import { MessageService } from '../common/message-service.js'; import { OpenerService } from '../browser/opener-service.js'; import { ApplicationShell } from './shell/application-shell.js'; import { SidePanelItemVisibility } from './shell/side-panel-item-visibility.js'; import { AboutDialog } from './about-dialog.js'; import { ContextKey, ContextKeyService } from './context-key-service.js'; import { ResourceContextKey } from './resource-context-key.js'; import { StorageService } from './storage-service.js'; import { IconThemeService } from './icon-theme-service.js'; import { ColorContribution } from './color-application-contribution.js'; import { ColorRegistry } from './color-registry.js'; import { CoreConfiguration, CorePreferences } from '../common/core-preferences.js'; import { ThemeService } from './theming.js'; import { ClipboardService } from './clipboard-service.js'; import { EncodingRegistry } from './encoding-registry.js'; import { EnvVariablesServer } from '../common/env-variables/index.js'; import { AuthenticationService } from './authentication-service.js'; import { SaveOptions } from './saveable.js'; import { QuickInputService } from './quick-input/index.js'; import { AsyncLocalizationProvider } from '../common/i18n/localization.js'; import { WindowService } from './window/window-service.js'; import { SecondaryWindowService } from './window/secondary-window-service.js'; import { Title, Widget } from './widgets/index.js'; import { SaveableService } from './saveable-service.js'; import { UserWorkingDirectoryProvider } from './user-working-directory-provider.js'; import { PreferenceChangeEvent, PreferenceService, UntitledResourceResolver } from '../common/index.js'; import { LanguageQuickPickService } from './i18n/language-quick-pick-service.js'; import { UndoRedoHandlerService } from './undo-redo-handler.js'; export declare const supportCut: boolean; export declare const supportCopy: boolean; export declare const supportPaste: boolean; export declare const RECENT_COMMANDS_STORAGE_KEY = "commands"; export declare const CLASSNAME_OS_MAC = "mac"; export declare const CLASSNAME_OS_WINDOWS = "windows"; export declare const CLASSNAME_OS_LINUX = "linux"; /** * Mirrors VS Code's `workbench.action.toggleKeybindingsLog` command. It logs how each key press was interpreted so keyboard-layout problems can be diagnosed on machines where they cannot be reproduced. */ export declare const TOGGLE_KEYBOARD_SHORTCUTS_TROUBLESHOOTING: Command; export declare class CommonFrontendContribution implements FrontendApplicationContribution, MenuContribution, CommandContribution, KeybindingContribution, ColorContribution { protected readonly shell: ApplicationShell; protected readonly selectionService: SelectionService; protected readonly messageService: MessageService; protected readonly openerService: OpenerService; protected readonly aboutDialog: AboutDialog; protected readonly localizationProvider: AsyncLocalizationProvider; protected readonly saveResourceService: SaveableService; protected commonDecorationsStyleSheet: CSSStyleSheet; constructor(shell: ApplicationShell, selectionService: SelectionService, messageService: MessageService, openerService: OpenerService, aboutDialog: AboutDialog, localizationProvider: AsyncLocalizationProvider, saveResourceService: SaveableService); protected readonly contextKeyService: ContextKeyService; protected readonly resourceContextKey: ResourceContextKey; protected readonly commandRegistry: CommandRegistry; protected readonly keybindingRegistry: KeybindingRegistry; protected readonly menuRegistry: MenuModelRegistry; protected readonly storageService: StorageService; protected readonly sidePanelItemVisibility: SidePanelItemVisibility; protected readonly quickInputService: QuickInputService; protected readonly iconThemes: IconThemeService; protected readonly themeService: ThemeService; protected readonly preferences: CorePreferences; protected readonly preferenceService: PreferenceService; protected readonly clipboardService: ClipboardService; protected readonly encodingRegistry: EncodingRegistry; protected readonly environments: EnvVariablesServer; protected readonly authenticationService: AuthenticationService; protected readonly windowService: WindowService; protected readonly secondaryWindowService: SecondaryWindowService; protected readonly workingDirProvider: UserWorkingDirectoryProvider; protected readonly languageQuickPickService: LanguageQuickPickService; protected readonly untitledResourceResolver: UntitledResourceResolver; protected readonly undoRedoHandlerService: UndoRedoHandlerService; protected pinnedKey: ContextKey<boolean>; configure(app: FrontendApplication): Promise<void>; protected setOsClass(): void; protected getOsClass(): string; protected updateStyles(): void; protected updatePinnedKey(): void; protected handlePreferenceChange(e: PreferenceChangeEvent<CoreConfiguration>, app: FrontendApplication): void; protected setSashProperties(): void; onStart(): void; protected setupHtmlLanguageAttributes(element: HTMLElement): void; onStop(): void; protected initResourceContextKeys(): void; registerMenus(registry: MenuModelRegistry): void; registerCommands(commandRegistry: CommandRegistry): void; protected getOrdinalNumbers(): readonly string[]; protected isElectron(): boolean; protected togglePinned(title?: Title<Widget>): void; registerKeybindings(registry: KeybindingRegistry): void; protected save(options?: SaveOptions): Promise<void>; protected openAbout(): Promise<void>; protected shouldPreventClose: boolean; /** * registers event listener which make sure that * window doesn't get closed if CMD/CTRL W is pressed. * Too many users have that in their muscle memory. * Chrome doesn't let us rebind or prevent default the keybinding, so this * at least doesn't close the window immediately. */ protected registerCtrlWHandling(): void; onWillStop(): OnWillStopAction | undefined; private confirmExitWithOrWithoutSaving; protected unsavedTabsCaptions(): string[]; protected unsavedUntitledTabsCaptions(): Widget[]; protected configureDisplayLanguage(): Promise<void>; /** * saves any dirty widget in toSave * side effect - will pop all widgets from toSave that was saved * @param toSave */ protected saveDirty(toSave: Widget[]): Promise<void>; protected toggleBreadcrumbs(): void; protected isBreadcrumbsEnabled(): boolean; protected confirmRestart(languageName: string): Promise<boolean>; protected selectIconTheme(): void; protected selectColorTheme(): void; /** * @todo https://github.com/eclipse-theia/theia/issues/12824 */ protected showNewFilePicker(): Promise<void>; registerColors(colors: ColorRegistry): void; } //# sourceMappingURL=common-frontend-contribution.d.ts.map