/** * Convenience method that retrieves an instance of the MuAction denoted by the given {@link * ActionParameters} and associated with the given {@link com.mucommander.ui.main.MainFrame} and * calls {@link MuAction#performAction()} on it. Returns <code>true</code> if an instance of the * action could be retrieved and performed, <code>false</code> if the MuAction could not be found * or could not be instantiated. * * @param actionParameters the ActionParameters of the action to perform * @param mainFrame the MainFrame the action belongs to * @return true if the action instance could be retrieved and the action performed, false * otherwise */ public static boolean performAction(ActionParameters actionParameters, MainFrame mainFrame) { MuAction action = getActionInstance(actionParameters, mainFrame); if (action == null) return false; action.performAction(); return true; }