drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/CommitAction.java
public void selectionChanged(IAction action, ISelection selection) {
        boolean validResourceSet = ActionUtils.checkResourceSet(selection, true)
                                   && ActionUtils.areFilesDirty(selection);
        if (validResourceSet) {
            action.setEnabled(true);
            selectedItems = (IStructuredSelection)selection;
        } else {
            action.setEnabled(false);
            selectedItems = null;
        }
    }
public void selectionChanged(IAction action, ISelection selection) {
        boolean validResourceSet = ActionUtils.checkResourceSet(selection, true)
                                   && ActionUtils.areFilesDirty(selection);
        if (validResourceSet) {
            action.setEnabled(true);
            selectedItems = (IStructuredSelection)selection;
        } else {
            action.setEnabled(false);
            selectedItems = null;
        }
    }
public void selectionChanged ( IAction action , ISelection selection ) { boolean validResourceSet = ActionUtils . checkResourceSet ( selection , true ) && ActionUtils . areFilesDirty ( selection ) ; if ( validResourceSet ) { action . setEnabled ( true ) ; selectedItems = ( IStructuredSelection ) selection ; } else { action . setEnabled ( false ) ; selectedItems = null ; } }
/*
(non-Javadoc)
@see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
/ * ( non - Javadoc )