use of com.cubrid.cubridmanager.core.cubrid.database.model.PlanDumpInfo in project cubrid-manager by CUBRID.
the class PlanDumpTask method getContent.
/**
* get result from the response.
*
* @return LogContentInfo
*/
public PlanDumpInfo getContent() {
TreeNode response = getResponse();
if (response == null || (this.getErrorMsg() != null && getErrorMsg().trim().length() > 0)) {
return null;
}
PlanDumpInfo planDumpInfo = new PlanDumpInfo();
String path = response.getValue("path");
planDumpInfo.setPath(path);
for (int i = 0; i < response.childrenSize(); i++) {
TreeNode node = response.getChildren().get(i);
if (node != null && node.getValue("open") != null && node.getValue("open").equals("log")) {
String[] lines = node.getValues("line");
for (int j = 0; j < lines.length; j++) {
String str = lines[j];
if (str != null) {
planDumpInfo.addLine(str);
}
}
}
}
return planDumpInfo;
}
use of com.cubrid.cubridmanager.core.cubrid.database.model.PlanDumpInfo in project cubrid-manager by CUBRID.
the class PlanDumpDialog method completeAll.
/**
* @see com.cubrid.common.ui.spi.progress.ITaskExecutorInterceptor#completeAll()
*/
public void completeAll() {
PlanDumpInfo getResultInfo = (PlanDumpInfo) task.getContent();
StringBuffer result = new StringBuffer("");
for (int i = 0, n = getResultInfo.getLine().size(); i < n; i++) {
result.append(getResultInfo.getLine().get(i) + "\n");
}
PlanDumpResultDialog planDumpResultDialog = new PlanDumpResultDialog(getShell());
planDumpResultDialog.setResult(result);
planDumpResultDialog.open();
}
Aggregations