1
|
/**
|
2
|
* Copyright (C) 2013 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.taxeditor.editor.view.derivate;
|
10
|
|
11
|
import java.util.Collection;
|
12
|
import java.util.Collections;
|
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
|
import eu.etaxonomy.taxeditor.editor.Messages;
|
20
|
|
21
|
/**
|
22
|
* Editor input for the {@link DerivateView}
|
23
|
*
|
24
|
* @author pplitzner
|
25
|
* @date Nov 11, 2015
|
26
|
*
|
27
|
*/
|
28
|
public class DerivateViewEditorInput implements IEditorInput {
|
29
|
|
30
|
private Collection<UUID> derivativeUuids;
|
31
|
private UUID taxonUuid;
|
32
|
|
33
|
public DerivateViewEditorInput() {
|
34
|
}
|
35
|
|
36
|
public DerivateViewEditorInput(UUID derivativeUuid, UUID taxonUuid) {
|
37
|
this(Collections.singleton(derivativeUuid), taxonUuid);
|
38
|
}
|
39
|
|
40
|
public DerivateViewEditorInput(Collection<UUID> derivativeUuids, UUID taxonUuid) {
|
41
|
this.derivativeUuids = derivativeUuids;
|
42
|
this.taxonUuid = taxonUuid;
|
43
|
}
|
44
|
|
45
|
public DerivateViewEditorInput(UUID derivativeUuid) {
|
46
|
this(derivativeUuid, null);
|
47
|
}
|
48
|
|
49
|
public DerivateViewEditorInput(Collection<UUID> derivativeUuids) {
|
50
|
this(derivativeUuids, null);
|
51
|
}
|
52
|
|
53
|
public Collection<UUID> getDerivativeUuids() {
|
54
|
return derivativeUuids;
|
55
|
}
|
56
|
|
57
|
public UUID getTaxonUuid() {
|
58
|
return taxonUuid;
|
59
|
}
|
60
|
|
61
|
@Override
|
62
|
public Object getAdapter(Class adapter) {
|
63
|
return null;
|
64
|
}
|
65
|
|
66
|
@Override
|
67
|
public boolean exists() {
|
68
|
return false;
|
69
|
}
|
70
|
|
71
|
@Override
|
72
|
public ImageDescriptor getImageDescriptor() {
|
73
|
return null;
|
74
|
}
|
75
|
|
76
|
@Override
|
77
|
public String getName() {
|
78
|
return getEditorName();
|
79
|
}
|
80
|
|
81
|
@Override
|
82
|
public IPersistableElement getPersistable() {
|
83
|
return null;
|
84
|
}
|
85
|
|
86
|
@Override
|
87
|
public String getToolTipText() {
|
88
|
return getEditorName();
|
89
|
}
|
90
|
|
91
|
private String getEditorName() {
|
92
|
return Messages.DerivateViewEditorInput_SPECIMEN_EDITOR;
|
93
|
}
|
94
|
|
95
|
}
|