use of com.google.security.zynamics.binnavi.Gui.FunctionSelection.CFunctionSelectionDialog in project binnavi by google.
the class CFunctionHelpers method resolveFunction.
/**
* Shows a dialog where the user can resolve a function.
*
* @param parent Parent window used for dialogs.
* @param database Database the function belongs to.
* @param function Function to be forwarded to another module.
*/
public static void resolveFunction(final Window parent, final IDatabase database, final INaviFunction function) {
final CFunctionSelectionDialog dlg = new CFunctionSelectionDialog(parent, database);
GuiHelper.centerChildToParent(parent, dlg, true);
dlg.setVisible(true);
final INaviFunction selectedFunction = dlg.getSelectedFunction();
if (selectedFunction != null) {
try {
function.setForwardedFunction(selectedFunction);
} catch (final CouldntSaveDataException e) {
CUtilityFunctions.logException(e);
}
}
}
Aggregations