Project

General

Profile

« Previous | Next » 

Revision 0db2412a

Added by Patrick Plitzner over 6 years ago

ref #6909, #6598 migrate default open handlers

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForDescriptionElement.java
3 3
import java.util.Collections;
4 4
import java.util.UUID;
5 5

  
6
import org.eclipse.core.commands.ExecutionEvent;
7 6
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
8 7
import org.eclipse.e4.ui.workbench.modeling.EPartService;
9 8
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
9
import org.eclipse.swt.widgets.Shell;
10 10

  
11 11
import eu.etaxonomy.cdm.api.service.IDescriptionService;
12 12
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
......
16 16
import eu.etaxonomy.taxeditor.editor.l10n.Messages;
17 17
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
18 18
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
19
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
19
import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
20 20
import eu.etaxonomy.taxeditor.model.MessagingUtils;
21 21
import eu.etaxonomy.taxeditor.store.CdmStore;
22 22
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
23 23

  
24
public class OpenDerivativeEditorForDescriptionElement extends DefaultOpenHandlerBase<IndividualsAssociation> {
24
public class OpenDerivativeEditorForDescriptionElement extends DefaultOpenHandlerBaseE4<IndividualsAssociation> {
25 25

  
26 26
    @Override
27 27
    protected IndividualsAssociation getEntity(UUID uuid) {
......
33 33
    }
34 34

  
35 35
    @Override
36
    protected void open(ExecutionEvent event, IndividualsAssociation entity) {
36
    protected void open(IndividualsAssociation entity, Shell shell) {
37 37
    	if(entity==null || entity.getAssociatedSpecimenOrObservation()==null){
38 38
    		MessagingUtils.messageDialog(Messages.OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS, this, Messages.OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS_MESSAGE);
39 39
    		return;
......
50 50

  
51 51
    }
52 52

  
53

  
54
    /**
55
     * {@inheritDoc}
56
     */
57
    @Override
58
    protected boolean canExecute(IndividualsAssociation entity) {
59
        return true;
60
    }
53 61
}

Also available in: Unified diff