Revision fd602c14
Added by Katja Luther over 8 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientClassificationService.java | ||
---|---|---|
647 | 647 |
* @see eu.etaxonomy.cdm.api.service.IClassificationService#getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(eu.etaxonomy.cdm.model.taxon.Classification) |
648 | 648 |
*/ |
649 | 649 |
@Override |
650 |
public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(Classification classification) { |
|
651 |
return defaultService.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classification); |
|
650 |
public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(Classification classification, List<UUID> excludeTaxa) {
|
|
651 |
return defaultService.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classification, excludeTaxa);
|
|
652 | 652 |
} |
653 | 653 |
|
654 | 654 |
/** |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/MoveDescriptionElementsHandler.java | ||
---|---|---|
94 | 94 |
excludeTaxa.add(actualTaxon.getUuid()); |
95 | 95 |
} |
96 | 96 |
Classification classification = null; |
97 |
TaxonNode actualNode = null; |
|
97 | 98 |
if (actualTaxon != null){ |
98 | 99 |
if (!actualTaxon.getTaxonNodes().isEmpty() && actualTaxon.getTaxonNodes().size() ==1){ |
99 |
classification = actualTaxon.getTaxonNodes().iterator().next().getClassification(); |
|
100 |
actualNode = actualTaxon.getTaxonNodes().iterator().next(); |
|
101 |
classification = actualNode.getClassification(); |
|
102 |
|
|
100 | 103 |
} |
101 | 104 |
} |
102 | 105 |
TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), |
103 | 106 |
editor.getConversationHolder(), |
104 | 107 |
"Choose the accepted taxon", |
105 | 108 |
excludeTaxa, |
106 |
null,classification |
|
109 |
null, classification
|
|
107 | 110 |
); |
108 | 111 |
if (newAcceptedTaxonNode != null){ |
109 | 112 |
Taxon targetTaxon = newAcceptedTaxonNode.getTaxon(); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java | ||
---|---|---|
91 | 91 |
this.settings = settings; |
92 | 92 |
|
93 | 93 |
this.conversation = conversation; |
94 |
|
|
94 |
this.cdmBaseToBeFiltered = cdmObject; |
|
95 | 95 |
Cursor cursor = shell.getCursor(); |
96 | 96 |
shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT)); |
97 | 97 |
init(); |
... | ... | |
223 | 223 |
/** {@inheritDoc} */ |
224 | 224 |
@Override |
225 | 225 |
public void refresh() { |
226 |
//initModel();
|
|
226 |
initModel(); |
|
227 | 227 |
filterExcludedObjects(); |
228 | 228 |
super.refresh(); |
229 | 229 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java | ||
---|---|---|
49 | 49 |
private List<Classification> classifications; |
50 | 50 |
|
51 | 51 |
private Classification selectedClassification; |
52 |
private final List<UUID> excludeTaxa; |
|
52 | 53 |
|
53 | 54 |
protected TaxonNodeSelectionDialog(Shell shell, ConversationHolder conversation, String title, List<UUID> excludeTaxa, boolean multi, TaxonNode node, Classification classification) { |
54 | 55 |
super(shell, conversation, title, multi, TaxonNodeSelectionDialog.class.getCanonicalName(), node); |
... | ... | |
57 | 58 |
|
58 | 59 |
setListLabelProvider(labelProvider); |
59 | 60 |
setDetailsLabelProvider(labelProvider); |
60 |
|
|
61 |
this.excludeTaxa = excludeTaxa; |
|
61 | 62 |
if(classification != null){ |
62 | 63 |
selectedClassification = classification; |
63 | 64 |
} |
65 |
initModel(); |
|
64 | 66 |
} |
65 | 67 |
|
66 | 68 |
/** {@inheritDoc} */ |
... | ... | |
134 | 136 |
return o1.getTitleCache().compareTo(o2.getTitleCache()); |
135 | 137 |
} |
136 | 138 |
}); |
137 |
selectedClassification = classifications.iterator().next(); |
|
139 |
if (this.cdmBaseToBeFiltered == null){ |
|
140 |
selectedClassification = classifications.iterator().next(); |
|
141 |
} else { |
|
142 |
selectedClassification = this.cdmBaseToBeFiltered.getClassification(); |
|
143 |
} |
|
138 | 144 |
} |
139 | 145 |
|
140 |
model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification); |
|
146 |
model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification, excludeTaxa);
|
|
141 | 147 |
} |
142 | 148 |
|
143 | 149 |
/** {@inheritDoc} */ |
Also available in: Unified diff
fixing #5324 and #5325