1 |
b2f76600
|
Patric Plitzner
|
/**
|
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 |
3ad97e48
|
Patrick Plitzner
|
import java.util.Collection;
|
12 |
fdcd1628
|
Patrick Plitzner
|
import java.util.Collections;
|
13 |
3ad97e48
|
Patrick Plitzner
|
import java.util.UUID;
|
14 |
|
|
|
15 |
b2f76600
|
Patric Plitzner
|
import org.eclipse.jface.resource.ImageDescriptor;
|
16 |
|
|
import org.eclipse.ui.IEditorInput;
|
17 |
|
|
import org.eclipse.ui.IPersistableElement;
|
18 |
|
|
|
19 |
150b624d
|
Patrick Plitzner
|
import eu.etaxonomy.taxeditor.editor.l10n.Messages;
|
20 |
61c51c84
|
Patrick Plitzner
|
|
21 |
b2f76600
|
Patric Plitzner
|
/**
|
22 |
d2ea9779
|
Patrick Plitzner
|
* Editor input for the {@link DerivateView}
|
23 |
|
|
*
|
24 |
b2f76600
|
Patric Plitzner
|
* @author pplitzner
|
25 |
d2ea9779
|
Patrick Plitzner
|
* @date Nov 11, 2015
|
26 |
b2f76600
|
Patric Plitzner
|
*
|
27 |
|
|
*/
|
28 |
dd35c5fd
|
Patrick Plitzner
|
public class DerivateViewEditorInput implements IEditorInput {
|
29 |
b2f76600
|
Patric Plitzner
|
|
30 |
fe0647c6
|
Patrick Plitzner
|
private Collection<UUID> derivativeUuids;
|
31 |
|
|
private UUID taxonUuid;
|
32 |
3ad97e48
|
Patrick Plitzner
|
|
33 |
d2ea9779
|
Patrick Plitzner
|
public DerivateViewEditorInput() {
|
34 |
b2f76600
|
Patric Plitzner
|
}
|
35 |
|
|
|
36 |
fdcd1628
|
Patrick Plitzner
|
public DerivateViewEditorInput(UUID derivativeUuid, UUID taxonUuid) {
|
37 |
|
|
this(Collections.singleton(derivativeUuid), taxonUuid);
|
38 |
|
|
}
|
39 |
|
|
|
40 |
fe0647c6
|
Patrick Plitzner
|
public DerivateViewEditorInput(Collection<UUID> derivativeUuids, UUID taxonUuid) {
|
41 |
3ad97e48
|
Patrick Plitzner
|
this.derivativeUuids = derivativeUuids;
|
42 |
fe0647c6
|
Patrick Plitzner
|
this.taxonUuid = taxonUuid;
|
43 |
|
|
}
|
44 |
|
|
|
45 |
fdcd1628
|
Patrick Plitzner
|
public DerivateViewEditorInput(UUID derivativeUuid) {
|
46 |
|
|
this(derivativeUuid, null);
|
47 |
|
|
}
|
48 |
|
|
|
49 |
fe0647c6
|
Patrick Plitzner
|
public DerivateViewEditorInput(Collection<UUID> derivativeUuids) {
|
50 |
|
|
this(derivativeUuids, null);
|
51 |
3ad97e48
|
Patrick Plitzner
|
}
|
52 |
|
|
|
53 |
|
|
public Collection<UUID> getDerivativeUuids() {
|
54 |
|
|
return derivativeUuids;
|
55 |
|
|
}
|
56 |
|
|
|
57 |
fe0647c6
|
Patrick Plitzner
|
public UUID getTaxonUuid() {
|
58 |
|
|
return taxonUuid;
|
59 |
|
|
}
|
60 |
|
|
|
61 |
b2f76600
|
Patric Plitzner
|
@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 |
68224814
|
Patric Plitzner
|
return getEditorName();
|
79 |
b2f76600
|
Patric Plitzner
|
}
|
80 |
|
|
|
81 |
|
|
@Override
|
82 |
|
|
public IPersistableElement getPersistable() {
|
83 |
|
|
return null;
|
84 |
|
|
}
|
85 |
|
|
|
86 |
|
|
@Override
|
87 |
|
|
public String getToolTipText() {
|
88 |
68224814
|
Patric Plitzner
|
return getEditorName();
|
89 |
|
|
}
|
90 |
|
|
|
91 |
|
|
private String getEditorName() {
|
92 |
61c51c84
|
Patrick Plitzner
|
return Messages.DerivateViewEditorInput_SPECIMEN_EDITOR;
|
93 |
b2f76600
|
Patric Plitzner
|
}
|
94 |
|
|
|
95 |
|
|
}
|