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
.location
.NamedArea
;
19 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
26 public class DefinedTermEditorInputFactory
{
28 // public static final String NamedArea = "eu.etaxonomy.taxeditor.editor.namedArea";
34 public static IEditorInput
NewInstance(Class
<?
extends DefinedTermBase
> clazz
) {
35 if(clazz
== NamedArea
.class){
36 return new NamedAreaEditorInput();
38 if (clazz
== NamedAreaLevel
.class){
39 return new NamedAreaLevelEditorInput();
41 if (clazz
== ExtensionType
.class){
42 return new ExtensionTypeEditorInput();
44 if (clazz
== MarkerType
.class){
45 return new MarkerTypeEditorInput();
47 if (clazz
== Feature
.class){
48 return new FeatureEditorInput();