use of com.cubrid.common.ui.common.dialog.BrokerLogParserDialog in project cubrid-manager by CUBRID.
the class BrokerLogParserAction method run.
public void run() {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window == null) {
return;
}
BrokerLogParserDialog dialog = new BrokerLogParserDialog(window.getShell());
dialog.open();
if (dialog.getReturnCode() != IDialogConstants.OK_ID) {
return;
}
String sql = dialog.getResultSql();
try {
QueryUnit input = new QueryUnit();
QueryEditorPart editor = (QueryEditorPart) window.getActivePage().openEditor(input, QueryEditorPart.ID);
editor.setQuery(sql, false, false, false);
} catch (PartInitException e) {
LOGGER.debug("Failed sql is {}.", sql);
LOGGER.error("Can not parse broker sql log.", e);
}
}
Aggregations