last round of making changes smaller

This commit is contained in:
Johannes Rieken
2019-02-13 15:20:29 +01:00
parent b49bf46bf2
commit ac03e62afc
7 changed files with 12 additions and 44 deletions

View File

@@ -505,18 +505,6 @@ export interface ExtHostWebviewsShape {
$deserializeWebviewPanel(newWebviewHandle: WebviewPanelHandle, viewType: string, title: string, state: any, position: EditorViewColumn, options: vscode.WebviewOptions): Promise<void>;
}
// export type CodeInsetWebviewHandle = string;
// export interface ExtHostCodeInsetWebviewsShape {
// }
// export interface ExtHostCodeInsetWebviewShape extends IDisposable {
// $setHtml(handle: WebviewPanelHandle, value: string): void;
// $setOptions(handle: WebviewPanelHandle, options: vscode.WebviewOptions): void;
// $postMessage(handle: WebviewPanelHandle, value: any): Promise<boolean>;
// }
export interface MainThreadUrlsShape extends IDisposable {
$registerUriHandler(handle: number, extensionId: ExtensionIdentifier): Promise<void>;
$unregisterUriHandler(handle: number): Promise<void>;
@@ -1179,7 +1167,6 @@ export const ExtHostContext = {
ExtHostWorkspace: createExtId<ExtHostWorkspaceShape>('ExtHostWorkspace'),
ExtHostWindow: createExtId<ExtHostWindowShape>('ExtHostWindow'),
ExtHostWebviews: createExtId<ExtHostWebviewsShape>('ExtHostWebviews'),
// ExtHostCodeInsetWebviews: createExtId<ExtHostCodeInsetWebviewsShape>('ExtHostWebviews'),
ExtHostProgress: createMainId<ExtHostProgressShape>('ExtHostProgress'),
ExtHostComments: createMainId<ExtHostCommentsShape>('ExtHostComments'),
ExtHostStorage: createMainId<ExtHostStorageShape>('ExtHostStorage'),

View File

@@ -1134,16 +1134,16 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
registerCodeInsetProvider(extension: IExtensionDescription, selector: vscode.DocumentSelector, provider: vscode.CodeInsetProvider): vscode.Disposable {
const handle = this._nextHandle();
// const eventHandle = typeof provider.onDidChangeCodeInsets === 'function' ? this._nextHandle() : undefined;
const eventHandle = typeof provider.onDidChangeCodeInsets === 'function' ? this._nextHandle() : undefined;
this._adapter.set(handle, new AdapterData(new CodeInsetAdapter(this._documents, this._heapService, provider), extension));
this._proxy.$registerCodeInsetSupport(handle, this._transformDocumentSelector(selector), undefined);
this._proxy.$registerCodeInsetSupport(handle, this._transformDocumentSelector(selector), eventHandle);
let result = this._createDisposable(handle);
// if (eventHandle !== undefined) {
// const subscription = provider.onDidChangeCodeInsets(_ => this._proxy.$emitCodeLensEvent(eventHandle));
// result = Disposable.from(result, subscription);
// }
if (eventHandle !== undefined) {
const subscription = provider.onDidChangeCodeInsets(_ => this._proxy.$emitCodeLensEvent(eventHandle));
result = Disposable.from(result, subscription);
}
return result;
}

View File

@@ -1140,12 +1140,10 @@ export class CodeLens {
export class CodeInset {
range: Range;
isResolved: boolean;
height?: number;
constructor(range: Range, height?: number) {
this.range = range;
this.isResolved = false;
this.height = height;
}
}