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.Collection;
|
13
|
import java.util.UUID;
|
14
|
|
15
|
import org.eclipse.jface.resource.ImageDescriptor;
|
16
|
import org.eclipse.ui.IEditorInput;
|
17
|
import org.eclipse.ui.IPersistableElement;
|
18
|
|
19
|
/**
|
20
|
* Editor input for the {@link DerivateView}
|
21
|
*
|
22
|
* @author pplitzner
|
23
|
* @date Nov 11, 2015
|
24
|
*
|
25
|
*/
|
26
|
public class DerivateViewEditorInput implements IEditorInput {
|
27
|
|
28
|
private Collection<UUID> derivativeUuids;
|
29
|
private UUID taxonUuid;
|
30
|
|
31
|
public DerivateViewEditorInput() {
|
32
|
}
|
33
|
|
34
|
public DerivateViewEditorInput(Collection<UUID> derivativeUuids, UUID taxonUuid) {
|
35
|
this.derivativeUuids = derivativeUuids;
|
36
|
this.taxonUuid = taxonUuid;
|
37
|
}
|
38
|
|
39
|
public DerivateViewEditorInput(Collection<UUID> derivativeUuids) {
|
40
|
this(derivativeUuids, null);
|
41
|
}
|
42
|
|
43
|
public Collection<UUID> getDerivativeUuids() {
|
44
|
return derivativeUuids;
|
45
|
}
|
46
|
|
47
|
public UUID getTaxonUuid() {
|
48
|
return taxonUuid;
|
49
|
}
|
50
|
|
51
|
@Override
|
52
|
public Object getAdapter(Class adapter) {
|
53
|
return null;
|
54
|
}
|
55
|
|
56
|
@Override
|
57
|
public boolean exists() {
|
58
|
return false;
|
59
|
}
|
60
|
|
61
|
@Override
|
62
|
public ImageDescriptor getImageDescriptor() {
|
63
|
return null;
|
64
|
}
|
65
|
|
66
|
@Override
|
67
|
public String getName() {
|
68
|
return getEditorName();
|
69
|
}
|
70
|
|
71
|
@Override
|
72
|
public IPersistableElement getPersistable() {
|
73
|
return null;
|
74
|
}
|
75
|
|
76
|
@Override
|
77
|
public String getToolTipText() {
|
78
|
return getEditorName();
|
79
|
}
|
80
|
|
81
|
private String getEditorName() {
|
82
|
return "Derivative Editor";
|
83
|
}
|
84
|
|
85
|
}
|