Revision 869f9c7a
Added by Andreas Müller about 3 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForTaxonNode.java | ||
---|---|---|
40 | 40 |
UUID taxonUuid = entity.getTaxonUuid(); |
41 | 41 |
config.setAssociatedTaxonUuid(taxonUuid); |
42 | 42 |
List<SpecimenOrObservationBase> specimens = CdmStore.getService(IOccurrenceService.class).findByTitle(config).getRecords(); |
43 |
Collection<UUID> specimenUuids = new ArrayList<UUID>();
|
|
43 |
Collection<UUID> specimenUuids = new ArrayList<>(); |
|
44 | 44 |
for (SpecimenOrObservationBase<?> specimenOrObservationBase : specimens) { |
45 | 45 |
specimenUuids.add(specimenOrObservationBase.getUuid()); |
46 | 46 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenClassificationWizardHandlerE4.java | ||
---|---|---|
20 | 20 |
|
21 | 21 |
public class DefaultOpenClassificationWizardHandlerE4 extends DefaultOpenHandlerBaseE4<TaxonNodeDto> { |
22 | 22 |
|
23 |
// @Override |
|
24 |
// protected TaxonNode getEntity(UUID uuid) { |
|
25 |
// return CdmStore.getService(ITaxonNodeService.class).load(uuid); |
|
26 |
// } |
|
27 |
|
|
28 | 23 |
@Override |
29 | 24 |
protected void open(TaxonNodeDto entity, Shell shell, EPartService partService) { |
30 | 25 |
NewClassificationWizard classificationWizard = new NewClassificationWizard(); |
... | ... | |
34 | 29 |
dialog.open(); |
35 | 30 |
} |
36 | 31 |
|
37 |
/** |
|
38 |
* {@inheritDoc} |
|
39 |
*/ |
|
40 | 32 |
@Override |
41 | 33 |
protected boolean canExecute(Object selection) { |
42 |
// return true; |
|
43 | 34 |
if (((IStructuredSelection)selection).getFirstElement() instanceof TaxonNodeDto){ |
44 | 35 |
return ((TaxonNodeDto)((IStructuredSelection)selection).getFirstElement()).getTaxonUuid() == null; |
45 | 36 |
} |
46 | 37 |
return false; |
47 |
// return entity.getClassification().getRootNode().equals(entity); |
|
48 | 38 |
} |
49 |
|
|
50 |
|
|
51 |
} |
|
39 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenHandlerBaseE4.java | ||
---|---|---|
35 | 35 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell, MHandledMenuItem menuItem, |
36 | 36 |
EModelService modelService, EPartService partService, MApplication application, |
37 | 37 |
IEclipseContext context) throws Exception { |
38 |
|
|
38 | 39 |
this.context = context; |
39 | 40 |
this.modelService = modelService; |
40 | 41 |
this.application = application; |
Also available in: Unified diff
cleanup