mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
last round of making changes smaller
This commit is contained in:
@@ -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'),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user