*/
@ServiceProvider(service = GeneralActionsManipulator.class)
public class SearchReplace implements GeneralActionsManipulator {
public void execute() {
SearchReplaceUI ui = Lookup.getDefault().lookup(SearchReplaceUI.class);
if (ui.isActive()) {
return;//Do not open more than one Search/Replace dialog
}
if (Lookup.getDefault().lookup(DataTablesController.class).isNodeTableMode()) {
ui.setMode(SearchReplaceUI.Mode.NODES_TABLE);
} else {
ui.setMode(SearchReplaceUI.Mode.EDGES_TABLE);
}
DialogDescriptor dd = new DialogDescriptor(ui, getName());
dd.setModal(true);
dd.setOptions(new Object[]{NbBundle.getMessage(SearchReplace.class, "SearchReplace.window.close")});
ui.setActive(true);
DialogDisplayer.getDefault().notify(dd);
ui.setActive(false);
}