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

vscode: add ProfileContentHandler API stubbing #12535

Merged
merged 1 commit into from
May 18, 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
7 changes: 5 additions & 2 deletions packages/plugin-ext/src/plugin/plugin-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,13 @@ export function createAPIFactory(
get tabGroups(): theia.TabGroups {
return tabsExt.tabGroups;
},

// ExternalUriOpener @stubbed
/** @stubbed ExternalUriOpener */
registerExternalUriOpener(id: string, opener: theia.ExternalUriOpener, metadata: theia.ExternalUriOpenerMetadata): theia.Disposable {
return Disposable.NULL;
},
/** @stubbed ProfileContentHandler */
registerProfileContentHandler(id: string, profileContentHandler: theia.ProfileContentHandler): theia.Disposable {
return Disposable.NULL;
}
};

Expand Down
14 changes: 14 additions & 0 deletions packages/plugin/src/theia-proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,20 @@ export module '@theia/plugin' {
}

// #endregion

// #region ProfileContentHandler

export interface ProfileContentHandler {
readonly name: string;
saveProfile(name: string, content: string, token: CancellationToken): Thenable<Uri | null>;
readProfile(uri: Uri, token: CancellationToken): Thenable<string | null>;
}

export namespace window {
export function registerProfileContentHandler(id: string, profileContentHandler: ProfileContentHandler): Disposable;
}

// #endregion ProfileContentHandler
}

/**
Expand Down