EditorService editorService = model.getEditorService();
EditorSelectorWindow window;
if (editors.size() <= THUMBNAIL_SELECTOR_LIMIT) {
window = new EditorThumbnailSelectorWindow(editorService, editors, southPosition);
} else {
QuickSwitchEditorWindow listWindow = new QuickSwitchEditorWindow(editorService, editors);
listWindow.setIncludeSearchField(false);
window = listWindow;
}
if (dialog != null) {
window.setDialog(dialog);
}