1 package eu
.etaxonomy
.taxeditor
.prototype2
.model
;
3 import org
.eclipse
.jface
.resource
.ImageDescriptor
;
4 import org
.eclipse
.ui
.IEditorInput
;
5 import org
.eclipse
.ui
.IPersistableElement
;
7 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
13 public class NameEditorInput
implements IEditorInput
{
17 public NameEditorInput (Taxon taxon
) {
21 public boolean exists() {
22 // TODO Auto-generated method stub
26 public ImageDescriptor
getImageDescriptor() {
27 // TODO Auto-generated method stub
31 public String
getName() {
32 if (taxon
.getName().getNameCache() == null)
35 return taxon
.getName().getNameCache();
38 public IPersistableElement
getPersistable() {
39 // TODO Auto-generated method stub
43 public String
getToolTipText() {
47 public Object
getAdapter(Class adapter
) {
49 if (adapter
== Taxon
.class) {
57 * Overrides equals to ensure that a taxon can only be edited by
58 * one editor at a time.
62 public boolean equals(Object obj
) {
63 if (this.taxon
.equals(((NameEditorInput
) obj
).taxon
))