<commit_before>/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

'use strict';

import URI from 'vs/base/common/uri';
import { Action } from 'vs/base/common/actions';
import { localize } from 'vs/nls';
import { TPromise } from 'vs/base/common/winjs.base';
import { INextEditorGroupsService, SplitDirection } from 'vs/workbench/services/editor/common/nextEditorGroupsService';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { EditorInput } from 'vs/workbench/common/editor';
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';

export class NextEditorContribution implements IWorkbenchContribution {

	constructor(
		@IInstantiationService instantiationService: IInstantiationService
	) {
		instantiationService.createInstance(OpenNextEditorAction, OpenNextEditorAction.ID, OpenNextEditorAction.LABEL).run();
	}
}

export class OpenNextEditorAction extends Action {

	static readonly ID = 'workbench.action.openNextEditor';
	static readonly LABEL = localize('openNextEditor', "Next Editor");

	constructor(
		id: string,
		label: string,
		@IWorkbenchEditorService private legacyEditorService: IWorkbenchEditorService,
		@INextEditorGroupsService private nextEditorGroupsService: INextEditorGroupsService
	) {
		super(id, label);
	}

	run(): TPromise<any> {
		const inputs = [
			'/Users/bpasero/Development/monaco/src/vs/workbench/browser/parts/editor2/nextEditorActions.ts',
			'/Users/bpasero/Development/monaco/src/vs/workbench/browser/parts/editor2/nextEditorPart.ts',
			'/Users/bpasero/Development/monaco/src/vs/workbench/browser/parts/editor2/nextEditorGroupsViewer.ts'
		].map(input => {
			return this.legacyEditorService.createInput({ resource: URI.file(input) }) as EditorInput;
		});

		const firstGroup = this.nextEditorGroupsService.activeGroup;
		firstGroup.openEditor(inputs[0]);

		const secondGroup = this.nextEditorGroupsService.addGroup(firstGroup, SplitDirection.RIGHT);
		secondGroup.openEditor(inputs[1]);

		const thirdGroup = this.nextEditorGroupsService.addGroup(secondGroup, SplitDirection.DOWN);
		thirdGroup.openEditor(inputs[2]);

		return TPromise.as(void 0);
	}
}<commit_msg>grid - tweak initial sample<commit_after>/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

'use strict';

import URI from 'vs/base/common/uri';
import { Action } from 'vs/base/common/actions';
import { localize } from 'vs/nls';
import { TPromise } from 'vs/base/common/winjs.base';
import { INextEditorGroupsService, SplitDirection } from 'vs/workbench/services/editor/common/nextEditorGroupsService';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { EditorInput } from 'vs/workbench/common/editor';
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';

export class NextEditorContribution implements IWorkbenchContribution {

	constructor(
		@IInstantiationService instantiationService: IInstantiationService
	) {
		instantiationService.createInstance(OpenNextEditorAction, OpenNextEditorAction.ID, OpenNextEditorAction.LABEL).run();
	}
}

export class OpenNextEditorAction extends Action {

	static readonly ID = 'workbench.action.openNextEditor';
	static readonly LABEL = localize('openNextEditor', "Next Editor");

	constructor(
		id: string,
		label: string,
		@IWorkbenchEditorService private legacyEditorService: IWorkbenchEditorService,
		@INextEditorGroupsService private nextEditorGroupsService: INextEditorGroupsService
	) {
		super(id, label);
	}

	run(): TPromise<any> {
		const inputs = [
			'/Users/bpasero/Development/monaco/src/vs/workbench/browser/parts/editor2/editor2.contribution.ts',
			'/Users/bpasero/Development/monaco/src/vs/workbench/browser/parts/editor2/nextEditorActions.ts',
			'/Users/bpasero/Development/monaco/src/vs/workbench/browser/parts/editor2/nextEditorGroupView.ts',
			'/Users/bpasero/Development/monaco/src/vs/workbench/browser/parts/editor2/nextEditorPart.ts',
			'/Users/bpasero/Development/monaco/src/vs/workbench/browser/parts/editor2/nextNoTabsTitleControl.ts',
			'/Users/bpasero/Development/monaco/src/vs/workbench/browser/parts/editor2/nextTabsTitleControl.ts',
			'/Users/bpasero/Development/monaco/src/vs/workbench/browser/parts/editor2/nextTitleControl.ts'
		].map(input => {
			return this.legacyEditorService.createInput({ resource: URI.file(input) }) as EditorInput;
		});

		const firstGroup = this.nextEditorGroupsService.activeGroup;
		firstGroup.openEditor(inputs[0], { pinned: true });
		firstGroup.openEditor(inputs[1], { pinned: true });
		firstGroup.openEditor(inputs[2], { pinned: true });

		const secondGroup = this.nextEditorGroupsService.addGroup(firstGroup, SplitDirection.RIGHT);
		secondGroup.openEditor(inputs[3], { pinned: true });
		secondGroup.openEditor(inputs[4], { pinned: true });

		const thirdGroup = this.nextEditorGroupsService.addGroup(secondGroup, SplitDirection.DOWN);
		thirdGroup.openEditor(inputs[5], { pinned: true });
		thirdGroup.openEditor(inputs[6], { pinned: true });

		return TPromise.as(void 0);
	}
}
{'fraction_non_alphanumeric': 0.17288599794590895, 'fraction_numerical': 0.003937007874015748, 'mean_word_length': 3.9812446717817562, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '529868', 'n_tokens_mistral': 1769, 'n_tokens_neox': 1620, 'n_words': 293}