提交 781b1b7a 编写于 作者: B Benjamin Pasero

grid - remove "structural" from group change event

上级 1c2ffea3
......@@ -364,7 +364,7 @@ export class NextEditorGroupView extends Themable implements INextEditorGroupVie
this.updateContainer();
// Event
this._onDidGroupChange.fire({ kind: GroupChangeKind.EDITOR_OPEN, editor, structural: true });
this._onDidGroupChange.fire({ kind: GroupChangeKind.EDITOR_OPEN, editor });
}
private onDidEditorClose(event: EditorCloseEvent): void {
......@@ -403,7 +403,7 @@ export class NextEditorGroupView extends Themable implements INextEditorGroupVie
// Event
this._onDidCloseEditor.fire(event);
this._onDidGroupChange.fire({ kind: GroupChangeKind.EDITOR_CLOSE, editor, structural: true });
this._onDidGroupChange.fire({ kind: GroupChangeKind.EDITOR_CLOSE, editor });
}
private onDidEditorDispose(editor: EditorInput): void {
......@@ -768,7 +768,7 @@ export class NextEditorGroupView extends Themable implements INextEditorGroupVie
this.titleAreaControl.pinEditor(editor);
// Event
this._onDidGroupChange.fire({ kind: GroupChangeKind.EDITOR_MOVE, editor, structural: true });
this._onDidGroupChange.fire({ kind: GroupChangeKind.EDITOR_MOVE, editor });
}
private doMoveOrCopyEditorAcrossGroups(editor: EditorInput, target: INextEditorGroupView, moveOptions: IMoveEditorOptions = Object.create(null), keepCopy?: boolean): void {
......
......@@ -253,7 +253,6 @@ export enum GroupChangeKind {
export interface IGroupChangeEvent {
kind: GroupChangeKind;
structural?: boolean;
editor?: IEditorInput;
}
......
......@@ -151,7 +151,6 @@ suite('Editor groups service (editor2)', () => {
let rootGroupActiveChangeCounter = 0;
const rootGroupChangeListener = rootGroup.onDidGroupChange(e => {
if (e.kind === GroupChangeKind.GROUP_ACTIVE) {
assert.notEqual(e.structural, true);
rootGroupActiveChangeCounter++;
}
});
......@@ -159,7 +158,6 @@ suite('Editor groups service (editor2)', () => {
let rightGroupActiveChangeCounter = 0;
const rightGroupChangeListener = rightGroup.onDidGroupChange(e => {
if (e.kind === GroupChangeKind.GROUP_ACTIVE) {
assert.notEqual(e.structural, true);
rightGroupActiveChangeCounter++;
}
});
......@@ -273,7 +271,6 @@ suite('Editor groups service (editor2)', () => {
let labelChangeCounter = 0;
const labelChangeListener = downGroup.onDidGroupChange(e => {
if (e.kind === GroupChangeKind.GROUP_LABEL) {
assert.notEqual(e.structural, true);
labelChangeCounter++;
}
});
......@@ -386,19 +383,15 @@ suite('Editor groups service (editor2)', () => {
let editorPinCounter = 0;
const editorGroupChangeListener = group.onDidGroupChange(e => {
if (e.kind === GroupChangeKind.EDITOR_OPEN) {
assert.equal(e.structural, true);
assert.ok(e.editor);
editorDidOpenCounter++;
} else if (e.kind === GroupChangeKind.EDITOR_ACTIVE) {
assert.notEqual(e.structural, true);
assert.ok(e.editor);
activeEditorChangeCounter++;
} else if (e.kind === GroupChangeKind.EDITOR_CLOSE) {
assert.equal(e.structural, true);
assert.ok(e.editor);
editorCloseCounter1++;
} else if (e.kind === GroupChangeKind.EDITOR_PIN) {
assert.notEqual(e.structural, true);
assert.ok(e.editor);
editorPinCounter++;
}
......@@ -605,7 +598,6 @@ suite('Editor groups service (editor2)', () => {
let editorMoveCounter = 0;
const editorGroupChangeListener = group.onDidGroupChange(e => {
if (e.kind === GroupChangeKind.EDITOR_MOVE) {
assert.equal(e.structural, true);
assert.ok(e.editor);
editorMoveCounter++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册