Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin: re-organize proposed api files #12550

Merged
merged 1 commit into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/plugin-ext/src/plugin/plugin-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ import {
WebviewEditorTabInput,
DocumentPasteEdit,
ExternalUriOpenerPriority,
EditSessionIdentityMatch
EditSessionIdentityMatch,
TerminalOutputAnchor
} from './types-impl';
import { AuthenticationExtImpl } from './authentication-ext';
import { SymbolKind } from '../common/plugin-api-rpc-model';
Expand Down Expand Up @@ -1376,6 +1377,7 @@ export function createAPIFactory(
TabInputWebview: WebviewEditorTabInput,
TabInputTerminal: TerminalEditorTabInput,
TerminalLocation,
TerminalOutputAnchor,
TerminalExitReason,
DocumentPasteEdit,
ExternalUriOpenerPriority,
Expand Down
6 changes: 6 additions & 0 deletions packages/plugin-ext/src/plugin/types-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2049,6 +2049,12 @@ export enum TerminalLocation {
Panel = 1,
Editor = 2
}

export enum TerminalOutputAnchor {
Top = 0,
Bottom = 1
}

export class TerminalProfile {
/**
* Creates a new terminal profile.
Expand Down
86 changes: 86 additions & 0 deletions packages/plugin/src/theia-extra.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,5 +293,91 @@ export module '@theia/plugin' {
readonly logUri: Uri;
}

export namespace commands {

/**
* Get the keybindings associated to commandId.
* @param commandId The ID of the command for which we are looking for keybindings.
*/
export function getKeyBinding(commandId: string): Thenable<CommandKeyBinding[] | undefined>;
}

/**
* Key Binding of a command
*/
export interface CommandKeyBinding {
/**
* Identifier of the command.
*/
id: string;
/**
* Value of the keyBinding
*/
value: string;
}

/**
* Enumeration of the supported operating systems.
*/
export enum OperatingSystem {
Windows = 'Windows',
Linux = 'Linux',
OSX = 'OSX'
}

export namespace env {

/**
* Returns the type of the operating system on the client side (like browser'OS if using browser mode). If it is neither [Windows](isWindows) nor [OS X](isOSX), then
* it always return with the `Linux` OS type.
*/
export function getClientOperatingSystem(): Thenable<OperatingSystem>;

}

export interface DecorationData {
letter?: string;
title?: string;
color?: ThemeColor;
priority?: number;
bubble?: boolean;
source?: string;
}

export interface SourceControl {

/**
* Whether the source control is selected.
*/
readonly selected: boolean;

/**
* An event signaling when the selection state changes.
*/
readonly onDidChangeSelection: Event<boolean>;
}

export interface SourceControlResourceDecorations {
source?: string;
letter?: string;
color?: ThemeColor;
}

}

/**
* Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise,
* and others. This API makes no assumption about what promise library is being used which
* enables reusing existing code without migrating to a specific promise implementation. Still,
* we recommend the use of native promises which are available in this editor.
*/
interface Thenable<T> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
}
Loading