提交 a560acd1 编写于 作者: D Daniel Imms

Remove test link provider

上级 56358ffd
......@@ -425,7 +425,6 @@ class ExtensionTerminalLinkProvider implements ITerminalExternalLinkProvider {
async provideLinks(instance: ITerminalInstance, line: string): Promise<ITerminalLink[] | undefined> {
const proxy = this._proxy;
const extHostLinks = await proxy.$provideLinks(instance.id, line);
console.log('ExtensionTerminalLinkProvider#provideLinks', extHostLinks);
return extHostLinks.map(dto => ({
id: dto.id,
startIndex: dto.startIndex,
......
......@@ -341,23 +341,6 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ
onFirstListenerAdd: () => this._proxy.$startSendingDataEvents(),
onLastListenerRemove: () => this._proxy.$stopSendingDataEvents()
});
this.registerLinkProvider({
provideTerminalLinks(ctx) {
const links: vscode.TerminalLink[] = [
{
startIndex: 0,
length: 10,
tooltip: `Open this custom "${ctx.line.substr(0, 10)}" link`
}
];
return links;
},
handleTerminalLink(link) {
console.log('Handled link on ext host, tooltip=' + link.tooltip);
return true;
}
});
}
public abstract createTerminal(name?: string, shellPath?: string, shellArgs?: string[] | string): vscode.Terminal;
......
......@@ -301,9 +301,6 @@ export interface ITerminalInstance {
/** A promise that resolves when the terminal's pty/process have been created. */
processReady: Promise<void>;
/** A promise that resolves when xterm.js has been created. */
xtermReady: Promise<void>;
/**
* The title of the terminal. This is either title or the process currently running or an
* explicit name given to the terminal instance through the extension API.
......
......@@ -129,7 +129,6 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
// TODO: Should this be an event as it can fire twice?
public get processReady(): Promise<void> { return this._processManager.ptyProcessReady; }
public get areLinksReady(): boolean { return this._areLinksReady; }
public get xtermReady(): Promise<void> { return this._xtermReadyPromise.then(() => { }); }
public get exitCode(): number | undefined { return this._exitCode; }
public get title(): string { return this._title; }
public get hadFocusOnExit(): boolean { return this._hadFocusOnExit; }
......
......@@ -88,8 +88,6 @@ export class TerminalService implements ITerminalService {
public get onInstancesChanged(): Event<void> { return this._onInstancesChanged.event; }
private readonly _onInstanceTitleChanged = new Emitter<ITerminalInstance>();
public get onInstanceTitleChanged(): Event<ITerminalInstance> { return this._onInstanceTitleChanged.event; }
private readonly _onInstanceXtermReady = new Emitter<ITerminalInstance>();
public get onInstanceXtermReady(): Event<ITerminalInstance> { return this._onInstanceXtermReady.event; }
private readonly _onActiveInstanceChanged = new Emitter<ITerminalInstance | undefined>();
public get onActiveInstanceChanged(): Event<ITerminalInstance | undefined> { return this._onActiveInstanceChanged.event; }
private readonly _onTabDisposed = new Emitter<ITerminalTab>();
......@@ -490,7 +488,6 @@ export class TerminalService implements ITerminalService {
const disposables: IDisposable[] = [];
this._linkProviders.add(linkProvider);
for (const instance of this.terminalInstances) {
// Only register immediately when xterm is ready
if (instance.areLinksReady) {
disposables.push(instance.registerLinkProvider(linkProvider));
}
......@@ -665,7 +662,6 @@ export class TerminalService implements ITerminalService {
public createInstance(container: HTMLElement | undefined, shellLaunchConfig: IShellLaunchConfig): ITerminalInstance {
const instance = this._instantiationService.createInstance(TerminalInstance, this._terminalFocusContextKey, this._terminalShellTypeContextKey, this._configHelper, container, shellLaunchConfig);
this._onInstanceCreated.fire(instance);
instance.xtermReady.then(() => this._onInstanceXtermReady.fire(instance));
return instance;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册