mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
Workbench editor renames (#91943)
* IEditor => IEditorPane * More panes: * IVisibleEditor => IVisibleEditorPane * ITextEditor => ITextEditorPane * ITextDiffEditor => ITextDiffEditorPane * imports - remove type alias * More pane renames * IEditorService#activeControl => activeEditorPane * IEditorService#visibleControls => visibleEditorPanes * More editor renames * activeTextEditorWidget => activeTextEditorControl * visibleTextEditorWidgets => visibleTextEditorControls
This commit is contained in:
@@ -21,7 +21,7 @@ import { MainThreadTextEditors } from 'vs/workbench/api/browser/mainThreadEditor
|
||||
import { ExtHostContext, ExtHostDocumentsAndEditorsShape, IDocumentsAndEditorsDelta, IExtHostContext, IModelAddedData, ITextEditorAddData, MainContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { EditorViewColumn, editorGroupToViewColumn } from 'vs/workbench/api/common/shared/editor';
|
||||
import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor';
|
||||
import { IEditor as IWorkbenchEditor } from 'vs/workbench/common/editor';
|
||||
import { IEditorPane } from 'vs/workbench/common/editor';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
|
||||
@@ -290,11 +290,11 @@ class MainThreadDocumentAndEditorStateComputer {
|
||||
}
|
||||
|
||||
private _getActiveEditorFromEditorPart(): IEditor | undefined {
|
||||
let result = this._editorService.activeTextEditorWidget;
|
||||
if (isDiffEditor(result)) {
|
||||
result = result.getModifiedEditor();
|
||||
let activeTextEditorControl = this._editorService.activeTextEditorControl;
|
||||
if (isDiffEditor(activeTextEditorControl)) {
|
||||
activeTextEditorControl = activeTextEditorControl.getModifiedEditor();
|
||||
}
|
||||
return result;
|
||||
return activeTextEditorControl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -435,17 +435,17 @@ export class MainThreadDocumentsAndEditors {
|
||||
}
|
||||
|
||||
private _findEditorPosition(editor: MainThreadTextEditor): EditorViewColumn | undefined {
|
||||
for (const workbenchEditor of this._editorService.visibleControls) {
|
||||
if (editor.matches(workbenchEditor)) {
|
||||
return editorGroupToViewColumn(this._editorGroupService, workbenchEditor.group);
|
||||
for (const editorPane of this._editorService.visibleEditorPanes) {
|
||||
if (editor.matches(editorPane)) {
|
||||
return editorGroupToViewColumn(this._editorGroupService, editorPane.group);
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
findTextEditorIdFor(inputEditor: IWorkbenchEditor): string | undefined {
|
||||
findTextEditorIdFor(editorPane: IEditorPane): string | undefined {
|
||||
for (const [id, editor] of this._textEditors) {
|
||||
if (editor.matches(inputEditor)) {
|
||||
if (editor.matches(editorPane)) {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user