}
private EditorSelectorWindow createEditorSelector(EditorCategory category, KongaDialog dialog) {
List<Editor> editors = model.getEditors(category);
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);
}
if (editors.size() > 1) {
window.setSelectedEditor(editorService.getActiveEditor());
window.setNotifications(model.getNotifications());
}
Component activeArea = getActiveArea();
window.setActiveArea(activeArea);
return window;
}