3 * Copyright (C) 2009 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.editor
.definedterm
.input
;
12 import org
.eclipse
.ui
.IEditorInput
;
14 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
15 import eu
.etaxonomy
.cdm
.model
.common
.ExtensionType
;
16 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
17 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
18 import eu
.etaxonomy
.cdm
.model
.description
.Modifier
;
19 import eu
.etaxonomy
.cdm
.model
.description
.State
;
20 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
21 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
28 public class DefinedTermEditorInputFactory
{
30 // public static final String NamedArea = "eu.etaxonomy.taxeditor.editor.namedArea";
36 public static IEditorInput
NewInstance(Class
<?
extends DefinedTermBase
> clazz
) {
37 if(clazz
== NamedArea
.class){
38 return new NamedAreaEditorInput();
40 if (clazz
== NamedAreaLevel
.class){
41 return new NamedAreaLevelEditorInput();
43 if (clazz
== ExtensionType
.class){
44 return new ExtensionTypeEditorInput();
46 if (clazz
== MarkerType
.class){
47 return new MarkerTypeEditorInput();
49 if (clazz
== Feature
.class){
50 return new FeatureEditorInput();
52 if (clazz
== State
.class){
53 return new StateEditorInput();
55 if (clazz
== Modifier
.class){
56 return new ModifierEditorInput();