mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
GitHub - add "Open on GitHub" to blame hover (#237514)
* WIP - saving my work * Refactor hover rendering code
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Disposable, commands } from 'vscode';
|
||||
import { Command, Disposable, commands } from 'vscode';
|
||||
import { Model } from '../model';
|
||||
import { getRemoteSourceActions, pickRemoteSource } from '../remoteSource';
|
||||
import { getRemoteSourceActions, getRemoteSourceControlHistoryItemCommands, pickRemoteSource } from '../remoteSource';
|
||||
import { GitBaseExtensionImpl } from './extension';
|
||||
import { API, PickRemoteSourceOptions, PickRemoteSourceResult, RemoteSourceAction, RemoteSourceProvider } from './git-base';
|
||||
|
||||
@@ -21,6 +21,10 @@ export class ApiImpl implements API {
|
||||
return getRemoteSourceActions(this._model, url);
|
||||
}
|
||||
|
||||
getRemoteSourceControlHistoryItemCommands(url: string): Promise<Command[]> {
|
||||
return getRemoteSourceControlHistoryItemCommands(this._model, url);
|
||||
}
|
||||
|
||||
registerRemoteSourceProvider(provider: RemoteSourceProvider): Disposable {
|
||||
return this._model.registerRemoteSourceProvider(provider);
|
||||
}
|
||||
|
||||
5
extensions/git-base/src/api/git-base.d.ts
vendored
5
extensions/git-base/src/api/git-base.d.ts
vendored
@@ -3,11 +3,13 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Disposable, Event, ProviderResult, Uri } from 'vscode';
|
||||
import { Command, Disposable, Event, ProviderResult } from 'vscode';
|
||||
export { ProviderResult } from 'vscode';
|
||||
|
||||
export interface API {
|
||||
registerRemoteSourceProvider(provider: RemoteSourceProvider): Disposable;
|
||||
getRemoteSourceActions(url: string): Promise<RemoteSourceAction[]>;
|
||||
getRemoteSourceControlHistoryItemCommands(url: string): Promise<Command[]>;
|
||||
pickRemoteSource(options: PickRemoteSourceOptions): Promise<string | PickRemoteSourceResult | undefined>;
|
||||
}
|
||||
|
||||
@@ -80,6 +82,7 @@ export interface RemoteSourceProvider {
|
||||
|
||||
getBranches?(url: string): ProviderResult<string[]>;
|
||||
getRemoteSourceActions?(url: string): ProviderResult<RemoteSourceAction[]>;
|
||||
getRemoteSourceControlHistoryItemCommands?(url: string): ProviderResult<Command[]>;
|
||||
getRecentRemoteSources?(query?: string): ProviderResult<RecentRemoteSource[]>;
|
||||
getRemoteSources(query?: string): ProviderResult<RemoteSource[]>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user