src/vs/workbench/common/editor/resourceEditorInput.ts/decorateFileEditorLabel
export function decorateFileEditorLabel(label: string, state: { orphaned: boolean, readonly: boolean }): string {
	if (state.orphaned && state.readonly) {
		return localize('orphanedReadonlyFile', "{0} (deleted, read-only)", label);
	}

	if (state.orphaned) {
		return localize('orphanedFile', "{0} (deleted)", label);
	}

	if (state.readonly) {
		return localize('readonlyFile', "{0} (read-only)", label);
	}

	return label;
}