1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2013 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
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.
|
9
|
*/
|
10
|
package eu.etaxonomy.taxeditor.editor.view.derivate;
|
11
|
|
12
|
import java.util.UUID;
|
13
|
|
14
|
import org.eclipse.jface.resource.ImageDescriptor;
|
15
|
import org.eclipse.ui.IEditorInput;
|
16
|
import org.eclipse.ui.IPersistableElement;
|
17
|
|
18
|
/**
|
19
|
* @author pplitzner
|
20
|
* @date 25.11.2013
|
21
|
*
|
22
|
*/
|
23
|
public class DerivateViewEditorInput implements IEditorInput {
|
24
|
|
25
|
private final UUID uuid;
|
26
|
|
27
|
/**
|
28
|
* @param uuid
|
29
|
*/
|
30
|
public DerivateViewEditorInput(UUID uuid) {
|
31
|
super();
|
32
|
this.uuid = uuid;
|
33
|
}
|
34
|
|
35
|
/* (non-Javadoc)
|
36
|
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
|
37
|
*/
|
38
|
@Override
|
39
|
public Object getAdapter(Class adapter) {
|
40
|
// TODO Auto-generated method stub
|
41
|
return null;
|
42
|
}
|
43
|
|
44
|
/* (non-Javadoc)
|
45
|
* @see org.eclipse.ui.IEditorInput#exists()
|
46
|
*/
|
47
|
@Override
|
48
|
public boolean exists() {
|
49
|
// TODO Auto-generated method stub
|
50
|
return false;
|
51
|
}
|
52
|
|
53
|
/* (non-Javadoc)
|
54
|
* @see org.eclipse.ui.IEditorInput#getImageDescriptor()
|
55
|
*/
|
56
|
@Override
|
57
|
public ImageDescriptor getImageDescriptor() {
|
58
|
// TODO Auto-generated method stub
|
59
|
return null;
|
60
|
}
|
61
|
|
62
|
/* (non-Javadoc)
|
63
|
* @see org.eclipse.ui.IEditorInput#getName()
|
64
|
*/
|
65
|
@Override
|
66
|
public String getName() {
|
67
|
// TODO Auto-generated method stub
|
68
|
return null;
|
69
|
}
|
70
|
|
71
|
/* (non-Javadoc)
|
72
|
* @see org.eclipse.ui.IEditorInput#getPersistable()
|
73
|
*/
|
74
|
@Override
|
75
|
public IPersistableElement getPersistable() {
|
76
|
return null;
|
77
|
}
|
78
|
|
79
|
/* (non-Javadoc)
|
80
|
* @see org.eclipse.ui.IEditorInput#getToolTipText()
|
81
|
*/
|
82
|
@Override
|
83
|
public String getToolTipText() {
|
84
|
// TODO Auto-generated method stub
|
85
|
return null;
|
86
|
}
|
87
|
|
88
|
|
89
|
/* (non-Javadoc)
|
90
|
* @see java.lang.Object#hashCode()
|
91
|
*/
|
92
|
@Override
|
93
|
public int hashCode() {
|
94
|
final int prime = 31;
|
95
|
int result = 1;
|
96
|
result = prime * result + ((uuid == null) ? 0 : uuid.hashCode());
|
97
|
return result;
|
98
|
}
|
99
|
|
100
|
/* (non-Javadoc)
|
101
|
* @see java.lang.Object#equals(java.lang.Object)
|
102
|
*/
|
103
|
@Override
|
104
|
public boolean equals(Object obj) {
|
105
|
if (this == obj) {
|
106
|
return true;
|
107
|
}
|
108
|
if (obj == null) {
|
109
|
return false;
|
110
|
}
|
111
|
if (getClass() != obj.getClass()) {
|
112
|
return false;
|
113
|
}
|
114
|
DerivateViewEditorInput other = (DerivateViewEditorInput) obj;
|
115
|
if (uuid == null) {
|
116
|
if (other.uuid != null) {
|
117
|
return false;
|
118
|
}
|
119
|
} else if (!uuid.equals(other.uuid)) {
|
120
|
return false;
|
121
|
}
|
122
|
return true;
|
123
|
}
|
124
|
|
125
|
}
|