Project

General

Profile

« Previous | Next » 

Revision 9370d21c

Added by Katja Luther almost 4 years ago

#8785: move aggregation to context menu

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/handler/AddDescriptionHandler.java
24 24
import org.eclipse.jface.viewers.IStructuredSelection;
25 25
import org.eclipse.jface.window.Window;
26 26

  
27
import eu.etaxonomy.cdm.api.service.dto.SpecimenRowWrapperDTO;
27 28
import eu.etaxonomy.cdm.persistence.dto.SpecimenNodeWrapper;
28 29
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
29 30
import eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix.CharacterMatrix;
......
80 81
    @CanExecute
81 82
    public boolean canExecute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart,
82 83
            MHandledMenuItem menuItem){
83
//        CharacterMatrixPart matrixPart = (CharacterMatrixPart) activePart.getObject();
84
//        IStructuredSelection selection = matrixPart.getSelection();
85
//        boolean canExecute = (selection.isEmpty() ||
86
//                !(selection.getFirstElement() instanceof SpecimenRowWrapperDTO) );
87
//
88
//        return canExecute;
89
        return true;
84
        CharacterMatrixPart matrixPart = (CharacterMatrixPart) activePart.getObject();
85
        IStructuredSelection selection = matrixPart.getSelection();
86
        boolean canExecute = (selection.isEmpty() ||
87
                !(selection.getFirstElement() instanceof SpecimenRowWrapperDTO) );
88

  
89
        return canExecute;
90

  
90 91
    }
91 92
}

Also available in: Unified diff