Revision 3aacef44
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/Messages.java | ||
---|---|---|
163 | 163 |
public static String TaxonNodeLabelProvider_NO_TAXON; |
164 | 164 |
public static String TaxonNodeLabelProvider_NODE_WITH_NO_TAXON; |
165 | 165 |
public static String TaxonNodeLabelProvider_TAXON; |
166 |
public static String TaxonNodeLabelProvider_CLASSIFICATION; |
|
166 | 167 |
|
167 | 168 |
public static String TreeNodeDropAdapter_10; |
168 | 169 |
public static String TreeNodeDropAdapter_BEHIND; |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages.properties | ||
---|---|---|
138 | 138 |
TaxonNavigatorLabels_SET_SEC_FOR_CHILDREN=Set new Secundum Reference for all children. |
139 | 139 |
TaxonNavigatorLabels_UNSAVED_CHANGES=There are unsaved changes in the source taxon. Please save first. |
140 | 140 |
TaxonNodeLabelProvider_NO_TAXON=>NO TAXON< |
141 |
TaxonNodeLabelProvider_CLASSIFICATION=Classification: |
|
141 | 142 |
TaxonNodeLabelProvider_NODE_WITH_NO_TAXON=The taxon node does not have a taxon attached to it. Please check your import. TaxonNode: %s |
142 | 143 |
TaxonNodeLabelProvider_TAXON=Taxon: |
143 | 144 |
TreeNodeDropAdapter_10=\ |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages_de.properties | ||
---|---|---|
140 | 140 |
TaxonNodeLabelProvider_NO_TAXON=>KEIN TAXON< |
141 | 141 |
TaxonNodeLabelProvider_NODE_WITH_NO_TAXON=Der Taxonknoten enth?lt kein Taxon. Bitte ?berpr?fen Sie den Import. Taxonknoten: %s |
142 | 142 |
TaxonNodeLabelProvider_TAXON=Taxon: |
143 |
TaxonNodeLabelProvider_CLASSIFICATION=Klassifikation: |
|
143 | 144 |
TreeNodeDropAdapter_10=\ |
144 | 145 |
TreeNodeDropAdapter_BEHIND=Hinter |
145 | 146 |
TreeNodeDropAdapter_CANCEL=Abbrechen |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodeLabelProvider.java | ||
---|---|---|
85 | 85 |
public String getDescription(Object anElement) { |
86 | 86 |
if (anElement instanceof TaxonNode) { |
87 | 87 |
Taxon data = ((TaxonNode) anElement).getTaxon(); |
88 |
return Messages.TaxonNodeLabelProvider_TAXON + (data != null ? data.getTitleCache() : Messages.TaxonNodeLabelProvider_NO_TAXON); |
|
88 |
String text = (data != null ? Messages.TaxonNodeLabelProvider_TAXON + data.getTitleCache() : Messages.TaxonNodeLabelProvider_CLASSIFICATION + ((TaxonNode)anElement).getClassification().getTitleCache()); |
|
89 |
|
|
90 |
return text; |
|
89 | 91 |
} |
90 | 92 |
return null; |
91 | 93 |
} |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/CreateClassificationHierarchyHandler.java | ||
---|---|---|
9 | 9 |
import org.eclipse.ui.handlers.HandlerUtil; |
10 | 10 |
|
11 | 11 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
12 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
|
12 | 13 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
13 | 14 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
14 | 15 |
import eu.etaxonomy.taxeditor.navigation.NavigationUtil; |
... | ... | |
34 | 35 |
ISelection currentSelection = HandlerUtil.getCurrentSelection(event); |
35 | 36 |
if (currentSelection instanceof IStructuredSelection) { |
36 | 37 |
Object selectedElement = ((IStructuredSelection) currentSelection).getFirstElement(); |
37 |
if (selectedElement instanceof Classification) {
|
|
38 |
if (selectedElement instanceof TaxonNode && !((TaxonNode)selectedElement).hasTaxon()) {
|
|
38 | 39 |
|
39 |
Classification classification = (Classification) selectedElement;
|
|
40 |
Classification classification = ((TaxonNode) selectedElement).getClassification();
|
|
40 | 41 |
try { |
41 | 42 |
TaxonNavigator taxonNavigator = (TaxonNavigator)AbstractUtility.showView(TaxonNavigator.ID); |
42 | 43 |
// IClassificationService service = CdmStore.getService(IClassificationService.class); |
Also available in: Unified diff
change label for classification in status bar and fix createClassificationHierarchyHandler