src/vs/workbench/browser/layout.ts/Layout/resolveEditorsToOpen
class Layout:	private resolveEditorsToOpen(fileService: IFileService): Promise<IUntypedEditorInput[]> | IUntypedEditorInput[] {
		const initialFilesToOpen = this.getInitialFilesToOpen();

		// Only restore editors if we are not instructed to open files initially
		// or when `window.restoreWindows` setting is explicitly set to `preserve`
		const forceRestoreEditors = this.configurationService.getValue<string>('window.restoreWindows') === 'preserve';
		this.state.editor.restoreEditors = !!forceRestoreEditors || initialFilesToOpen === undefined;

		// Files to open, diff or create
		if (initialFilesToOpen !== undefined) {

			// Files to diff is exclusive
			return pathsToEditors(initialFilesToOpen.filesToDiff, fileService).then(filesToDiff => {
				if (filesToDiff.length === 2) {
					const diffEditorInput: IResourceDiffEditorInput[] = [{
						originalInput: { resource: filesToDiff[0].resource },
						modifiedInput: { resource: filesToDiff[1].resource },
						options: { pinned: true },
						forceFile: true
					}];

					return diffEditorInput;
				}

				// Otherwise: Open/Create files
				return pathsToEditors(initialFilesToOpen.filesToOpenOrCreate, fileService);
			});
		}

		// Empty workbench configured to open untitled file if empty
		else if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY && this.configurationService.getValue('workbench.startupEditor') === 'newUntitledFile') {
			if (this.editorGroupService.hasRestorableState) {
				return []; // do not open any empty untitled file if we restored groups/editors from previous session
			}

			return this.workingCopyBackupService.hasBackups().then(hasBackups => {
				if (hasBackups) {
					return []; // do not open any empty untitled file if we have backups to restore
				}

				return [Object.create(null)]; // open empty untitled file
			});
		}

		return [];
	}