Project

General

Profile

« Previous | Next » 

Revision c3bb7840

Added by Patrick Plitzner over 6 years ago

ref #6909 Implement menu item/handler visibility

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/NewTaxonNodeHandlerE4.java
12 12
import javax.inject.Named;
13 13

  
14 14
import org.eclipse.core.runtime.IStatus;
15
import org.eclipse.e4.core.di.annotations.CanExecute;
15 16
import org.eclipse.e4.ui.services.IServiceConstants;
17
import org.eclipse.jface.viewers.TreeSelection;
16 18
import org.eclipse.jface.wizard.WizardDialog;
17 19
import org.eclipse.swt.widgets.Shell;
18 20

  
......
50 52
			}
51 53
		}
52 54
	}
55

  
56
    @CanExecute
57
    private boolean canExecute(@Named(IServiceConstants.ACTIVE_SELECTION)TreeSelection selection){
58
        return selection!=null && !selection.isEmpty();
59
    }
53 60
}

Also available in: Unified diff