3 * Copyright (C) 2014 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
.molecular
.editor
;
13 import java
.util
.UUID
;
15 import org
.eclipse
.jface
.resource
.ImageDescriptor
;
16 import org
.eclipse
.ui
.IEditorInput
;
17 import org
.eclipse
.ui
.IPersistableElement
;
26 public class AlignmentEditorInput
implements IEditorInput
{
27 private static final String name
= "AlignmentEditor";
30 private final UUID sequenceNodeUuid
;
33 public AlignmentEditorInput(UUID sequenceNodeUuid
) {
35 this.sequenceNodeUuid
= sequenceNodeUuid
;
40 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
43 public Object
getAdapter(Class adapter
) {
44 // TODO Auto-generated method stub
50 * @see org.eclipse.ui.IEditorInput#exists()
53 public boolean exists() {
54 // TODO Auto-generated method stub
60 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
63 public ImageDescriptor
getImageDescriptor() {
64 // TODO Auto-generated method stub
70 * @see org.eclipse.ui.IEditorInput#getName()
73 public String
getName() {
79 * @see org.eclipse.ui.IEditorInput#getPersistable()
82 public IPersistableElement
getPersistable() {
88 * @see org.eclipse.ui.IEditorInput#getToolTipText()
91 public String
getToolTipText() {
97 * Returns the {@link UUID} of the sequence CDM node that should be edited by the {@link AlignmentEditor} this object
100 * @return the uuid of the CDM node to work on
102 public UUID
getSequenceNodeUuid() {
103 return sequenceNodeUuid
;
108 public int hashCode() {
109 final int prime
= 31;
111 result
= prime
* result
112 + ((sequenceNodeUuid
== null) ?
0 : sequenceNodeUuid
.hashCode());
118 public boolean equals(Object obj
) {
125 if (getClass() != obj
.getClass()) {
128 AlignmentEditorInput other
= (AlignmentEditorInput
) obj
;
129 if (sequenceNodeUuid
== null) {
130 if (other
.sequenceNodeUuid
!= null) {
133 } else if (!sequenceNodeUuid
.equals(other
.sequenceNodeUuid
)) {