Revision 0f76f092
Added by Katja Luther about 4 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyLabelProvider.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.taxeditor.editor.key.polytomous; |
11 | 11 |
|
12 |
import java.util.Map; |
|
13 |
|
|
12 | 14 |
import org.apache.commons.lang.StringUtils; |
13 | 15 |
import org.eclipse.draw2d.IFigure; |
14 | 16 |
import org.eclipse.jface.viewers.LabelProvider; |
... | ... | |
16 | 18 |
import org.eclipse.zest.core.viewers.IEntityStyleProvider; |
17 | 19 |
|
18 | 20 |
import eu.etaxonomy.cdm.model.common.Language; |
21 |
import eu.etaxonomy.cdm.model.common.LanguageString; |
|
19 | 22 |
import eu.etaxonomy.cdm.model.description.KeyStatement; |
20 | 23 |
import eu.etaxonomy.cdm.model.description.PolytomousKey; |
21 | 24 |
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode; |
... | ... | |
77 | 80 |
if (statement != null) { |
78 | 81 |
Language language = CdmStore.getDefaultLanguage(); |
79 | 82 |
String statementLabel = statement.getLabelText(language); |
83 |
if (StringUtils.isBlank(statementLabel)){ |
|
84 |
Map<Language, LanguageString> labels = statement.getLabel(); |
|
85 |
if (labels != null && !labels.isEmpty()){ |
|
86 |
statementLabel = labels.values().iterator().next().getText(); |
|
87 |
} |
|
88 |
} |
|
80 | 89 |
|
81 | 90 |
return StringUtils.isEmpty(statementLabel) ? EMPTY |
82 | 91 |
: statementLabel; |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/Messages.java | ||
---|---|---|
309 | 309 |
public static String DescriptiveDataSetEditor_DELETE_FAIL_MESSAGE; |
310 | 310 |
public static String DescriptiveDataSetEditor_DELETE_FAIL_TITLE; |
311 | 311 |
public static String ChecklistEditor_DEFAULT_SOURCE; |
312 |
public static String ChecklistEditor_SWITCH_DEFAULT_SOURCE; |
|
312 | 313 |
public static String ChecklistEditor_REMOVE_DEFAULT_SOURCE; |
313 | 314 |
public static String ChecklistEditor_DEFAULT_SOURCE_TOOLTIP; |
314 | 315 |
public static String ChecklistEditor_REMOVE_DEFAULT_SOURCE_TOOLTIP; |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/messages.properties | ||
---|---|---|
288 | 288 |
ChooseFromMultipleAcceptedTaxaDialog_CHOOSE_ACCEPTED_TAXON=Choose accepted taxon |
289 | 289 |
ChooseFromMultipleAcceptedTaxaDialog_CHOOSE_ACCEPTED_TAXON_MESSAGE=The taxon is related with multiple accepted taxa. Please choose the one you want to open. |
290 | 290 |
ChecklistEditor_DEFAULT_SOURCE=Choose Source |
291 |
ChecklistEditor_SWITCH_DEFAULT_SOURCE=Switch Source |
|
291 | 292 |
ChecklistEditor_DEFAULT_SOURCE_TOOLTIP=Choose a source which is added to every new distribution. |
292 | 293 |
ChecklistEditor_REMOVE_DEFAULT_SOURCE_TOOLTIP=After removing the default source, newly created distribution will not get a default source. |
293 | 294 |
ChecklistEditor_SEARCH_TOOLTIP=Textfilter for Taxa |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/messages_de.properties | ||
---|---|---|
26 | 26 |
MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Verschieben von "%s" nach "%s" nicht m?glich\! |
27 | 27 |
MoveDescriptionElementsHandler_CHOOSE_ACC_TAXON=W?hle akzeptiertes Taxon |
28 | 28 |
MoveDescriptionElementsHandler_CREATE_FAILURE=Konnte Taxon nicht erstellen |
29 |
MoveDescriptionElementsHandler_ELEMENTS_MOVED=Fakten verschoben von %s |
|
30 | 29 |
MoveDescriptionToOtherTaxonHandler_CHOOSE_ACC_TAXON=W?hle akzeptiertes Taxon |
31 | 30 |
MoveDescriptionToOtherTaxonHandler_CREATE_FAILED=Konnte Taxon nicht erstellen |
32 | 31 |
MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES=?nderungen speichern |
... | ... | |
288 | 287 |
ChooseFromMultipleAcceptedTaxaDialog_CHOOSE_ACCEPTED_TAXON=Akzeptiertes Taxon w?hlen |
289 | 288 |
ChooseFromMultipleAcceptedTaxaDialog_CHOOSE_ACCEPTED_TAXON_MESSAGE=Das Taxon ist mit mehreren akzeptierten Taxa verkn?pft. Bitte w?hlen sie, welches sie ?ffnen m?chten. |
290 | 289 |
ChecklistEditor_DEFAULT_SOURCE=Quelle ausw?hlen |
290 |
ChecklistEditor_SWITCH_DEFAULT_SOURCE=Quelle wechseln |
|
291 | 291 |
ChecklistEditor_DEFAULT_SOURCE_TOOLTIP=W?hlen Sie eine Quelle aus, die jeder neu angelegten Verbreitung zugef?gt wird. |
292 | 292 |
ChecklistEditor_REMOVE_DEFAULT_SOURCE_TOOLTIP=Wenn die Quelle entfernt wurde, wird den neu angelegten Verbreitungen nicht mehr automatisch eine Quelle zugef?gt. |
293 | 293 |
ChecklistEditor_SEARCH_TOOLTIP=Textfilter auf Taxa |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java | ||
---|---|---|
69 | 69 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship; |
70 | 70 |
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto; |
71 | 71 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
72 |
import eu.etaxonomy.taxeditor.editor.AppModelId; |
|
73 | 72 |
import eu.etaxonomy.taxeditor.editor.CdmDataTransfer; |
74 | 73 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
75 | 74 |
import eu.etaxonomy.taxeditor.editor.ISecuredEditor; |
... | ... | |
279 | 278 |
if (!input.getCdmEntitySession().isActive()) { |
280 | 279 |
input.bind(); |
281 | 280 |
} |
282 |
|
|
283 |
|
|
284 |
|
|
285 |
|
|
286 |
} |
|
287 |
if(selection!=null){ |
|
288 |
selService.setSelection(new StructuredSelection(selection)); |
|
289 | 281 |
} |
282 |
// if(selection!=null){ |
|
283 |
// selService.setSelection(new StructuredSelection(selection)); |
|
284 |
// } |
|
290 | 285 |
// check permissions |
291 | 286 |
boolean doEnable = permissionsSatisfied(); |
292 | 287 |
managedForm.getForm().setEnabled(doEnable); |
293 |
if (EditorUtil.isFactsVisible()){ |
|
294 |
String partIdFactualData = AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_DESCRIPTIVE_E4_FACTUALDATAPARTE4; |
|
295 |
EditorUtil.showPart(partIdFactualData, modelService, partService); |
|
296 |
} |
|
297 |
if (EditorUtil.isMediaVisible()){ |
|
298 |
String partIdMediaData = AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_MEDIA_E4_MEDIAVIEWPARTE4; |
|
299 |
EditorUtil.showPart(partIdMediaData, modelService, partService); |
|
300 |
} |
|
288 |
|
|
301 | 289 |
eventBroker.post(WorkbenchEventConstants.CURRENT_ACTIVE_EDITOR, this); |
302 | 290 |
} |
303 | 291 |
|
... | ... | |
584 | 572 |
} |
585 | 573 |
|
586 | 574 |
public AbstractGroupedContainerE4 getSelectedContainer() { |
575 |
if (selection == null && input != null){ |
|
576 |
selection = this.input.getTaxon(); |
|
577 |
} |
|
587 | 578 |
return (selection != null) ? getContainer(selection) : getAcceptedNameContainer(); |
588 | 579 |
} |
589 | 580 |
|
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/TaxonDistributionDtoComparator.java | ||
---|---|---|
36 | 36 |
String name2 = arg1.getNameCache(); |
37 | 37 |
Integer rankTax1 = arg0.getRankOrderIndex(); |
38 | 38 |
Integer rankTax2 = arg1.getRankOrderIndex(); |
39 |
|
|
39 |
// String parentName1 = arg0.get |
|
40 | 40 |
if (rankTax1 == null && rankTax2 != null){ |
41 | 41 |
return 1; |
42 | 42 |
}else if(rankTax2 == null && rankTax1 != null){ |
43 | 43 |
return -1; |
44 |
}else if (rankTax1 == null && rankTax2 == null || rankTax1.equals(rankTax2)) {
|
|
44 |
}else if (rankTax1 != null && rankTax1<rankTax2) {
|
|
45 | 45 |
//same rank, order by name |
46 | 46 |
return name1.compareTo(name2); |
47 |
}else if (rankTax1 != null && rankTax1<rankTax2){
|
|
47 |
}else if (rankTax1 == null && rankTax2 == null || rankTax1.equals(rankTax2)){
|
|
48 | 48 |
return -1; |
49 | 49 |
} |
50 | 50 |
|
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/FactualDataPartE4.java | ||
---|---|---|
191 | 191 |
containerTree.buildTree(); |
192 | 192 |
} |
193 | 193 |
if (featureNodeContainerCache.isEmpty()){ |
194 |
return; |
|
194 |
// return;
|
|
195 | 195 |
} |
196 | 196 |
if(object instanceof DescriptionElementBase){ |
197 | 197 |
DescriptionElementBase descriptionElement = (DescriptionElementBase) object; |
... | ... | |
210 | 210 |
StructuredSelection selection = new StructuredSelection(object); |
211 | 211 |
viewer.setSelection(selection, true); |
212 | 212 |
} |
213 |
// selectionProvidingPart.setDirty(true); |
|
213 | 214 |
super.changed(object); |
214 | 215 |
} |
215 | 216 |
|
Also available in: Unified diff
ref #8047: add l10n files