Revision 61c51c84
Added by Patrick Plitzner about 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForDescriptionElement.java | ||
---|---|---|
11 | 11 |
import eu.etaxonomy.cdm.model.description.IndividualsAssociation; |
12 | 12 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase; |
13 | 13 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
14 |
import eu.etaxonomy.taxeditor.editor.Messages; |
|
14 | 15 |
import eu.etaxonomy.taxeditor.editor.handler.OpenDerivateViewHandler; |
15 | 16 |
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput; |
16 | 17 |
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase; |
... | ... | |
31 | 32 |
@Override |
32 | 33 |
protected void open(ExecutionEvent event, IndividualsAssociation entity) { |
33 | 34 |
if(entity==null || entity.getAssociatedSpecimenOrObservation()==null){ |
34 |
MessagingUtils.messageDialog("No specimens found", this, "No specimens found for the selected object. (Maybe there are unsaved changes)");
|
|
35 |
MessagingUtils.messageDialog(Messages.OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS, this, Messages.OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS_MESSAGE);
|
|
35 | 36 |
return; |
36 | 37 |
} |
37 | 38 |
SpecimenOrObservationBase associatedSpecimenOrObservation = entity.getAssociatedSpecimenOrObservation(); |
... | ... | |
40 | 41 |
try { |
41 | 42 |
EditorUtil.open(new DerivateViewEditorInput(Collections.singletonList(specimenUuid))); |
42 | 43 |
} catch (PartInitException e) { |
43 |
MessagingUtils.error(OpenDerivateViewHandler.class, "Derivative Editor could not be opened", e);
|
|
44 |
MessagingUtils.error(OpenDerivateViewHandler.class, OpenDerivativeEditorForTaxonNode.OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN, e);
|
|
44 | 45 |
} |
45 | 46 |
} |
46 | 47 |
|
Also available in: Unified diff
ref #4611 i18n for taxeditor.editor plugin