Project

General

Profile

« Previous | Next » 

Revision 6268cff8

Added by Patrick Plitzner over 5 years ago

ref #7923 Extract common interface for feature tree editors

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/handler/RemoveFeatureHandler.java
20 20
import org.eclipse.jface.viewers.IStructuredSelection;
21 21

  
22 22
import eu.etaxonomy.cdm.model.description.FeatureNode;
23
import eu.etaxonomy.taxeditor.featuretree.e4.FeatureTreeEditor;
23
import eu.etaxonomy.taxeditor.featuretree.e4.IFeatureTreeEditor;
24 24
import eu.etaxonomy.taxeditor.featuretree.e4.operation.RemoveFeatureOperation;
25 25
import eu.etaxonomy.taxeditor.model.AbstractUtility;
26 26
import eu.etaxonomy.taxeditor.store.StoreUtil;
27
import eu.etaxonomy.taxeditor.workbench.part.IE4ViewerPart;
28 27

  
29 28
/**
30 29
 * @author pplitzner
......
36 35
    @Execute
37 36
    public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart thisPart,
38 37
            @Named(IServiceConstants.ACTIVE_SELECTION)IStructuredSelection selection, UISynchronize sync){
39
        FeatureTreeEditor editor = (FeatureTreeEditor) thisPart.getObject();
38
        IFeatureTreeEditor editor = (IFeatureTreeEditor) thisPart.getObject();
40 39

  
41 40
        if (StoreUtil.checkDirty(editor)) {
42 41
            return;
......
63 62
                canExecute &= object instanceof FeatureNode;
64 63
            }
65 64
        }
66
        canExecute &= thisPart.getObject() instanceof IE4ViewerPart;
65
        canExecute &= thisPart.getObject() instanceof IFeatureTreeEditor;
67 66
        menuItem.setVisible(canExecute);
68 67
        return canExecute;
69 68
    }

Also available in: Unified diff