private static SearchManager searchManager = new SearchManager();
- private static EditorManager editorManager = new EditorManager();
-
private static UseObjectStore useObjectInitializer = new UseObjectStore();
private static ProgressMonitorClientManager progressMonitorClientManager = new ProgressMonitorClientManager();
return searchManager;
}
- public static EditorManager getEditorManager() {
- return editorManager;
- }
public static ProgressMonitorClientManager getProgressMonitorClientManager() {
return progressMonitorClientManager;
+++ /dev/null
-/**
- *
- */
-package eu.etaxonomy.taxeditor.store;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.eclipse.ui.IEditorInput;
-
-import eu.etaxonomy.taxeditor.model.ICdmEditorHandle;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
-
-/**
- *
- *
- * @author n.hoffmann
- *
- */
-public class EditorManager {
-
- Map<Class<? extends IEditorInput>, ICdmEditorHandle> editors = new HashMap<Class<? extends IEditorInput>, ICdmEditorHandle>();
-
- public void openEditor(Class<? extends IEditorInput> inputType, UUID uuid){
- ICdmEditorHandle editor = editors.get(inputType);
-
- if(editor == null){
- MessagingUtils.warningDialog("No editor", getClass(), "No editor was registered for the given type.");
- }else{
- editor.open(uuid);
- }
- }
-
- public ICdmEditorHandle add(ICdmEditorHandle editor){
- return editors.put(editor.getInputType(), editor);
- }
-
- public ICdmEditorHandle remove(ICdmEditorHandle editor){
- return editors.remove(editor);
- }
-}