4 package eu
.etaxonomy
.taxeditor
.store
;
6 import java
.util
.HashMap
;
10 import org
.eclipse
.ui
.IEditorInput
;
12 import eu
.etaxonomy
.taxeditor
.model
.ICdmEditorHandle
;
13 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
21 public class EditorManager
{
23 Map
<Class
<?
extends IEditorInput
>, ICdmEditorHandle
> editors
= new HashMap
<Class
<?
extends IEditorInput
>, ICdmEditorHandle
>();
25 public void openEditor(Class
<?
extends IEditorInput
> inputType
, UUID uuid
){
26 ICdmEditorHandle editor
= editors
.get(inputType
);
29 MessagingUtils
.warningDialog("No editor", getClass(), "No editor was registered for the given type.");
35 public ICdmEditorHandle
add(ICdmEditorHandle editor
){
36 return editors
.put(editor
.getInputType(), editor
);
39 public ICdmEditorHandle
remove(ICdmEditorHandle editor
){
40 return editors
.remove(editor
);