use of com.cubrid.common.ui.query.tuner.dialog.QueryTunerDialog in project cubrid-manager by CUBRID.
the class QueryTunerAction method run.
public void run() {
Object[] obj = this.getSelectedObj();
if (!isSupported(obj)) {
setEnabled(false);
return;
}
ISelectionProvider provider = getSelectionProvider();
if (!(provider instanceof TreeViewer)) {
return;
}
ISchemaNode node = (ISchemaNode) obj[0];
String query = getQuery();
if (StringUtil.isNotEmpty(query)) {
new QueryTunerDialog(getShell(), node.getDatabase(), query).open();
} else {
CommonUITool.openInformationBox(Messages.errSelectQueryForTuning);
new QueryTunerDialog(getShell(), node.getDatabase()).open();
}
}
use of com.cubrid.common.ui.query.tuner.dialog.QueryTunerDialog in project cubrid-manager by CUBRID.
the class QueryTunerRunAction method run.
public void run() {
Control control = getFocusProvider();
String query = "";
if (control instanceof StyledText) {
StyledText stext = (StyledText) control;
String data = stext.getSelectionText();
if (data != null && !data.equals("")) {
query = data;
}
}
CubridDatabase database = getDatabaseWithSelection();
if (database != null) {
new QueryTunerDialog(getShell(), getDatabaseWithSelection(), query).open();
}
}
Aggregations