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

grid - remove "structural" from group change event

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