import org.tizen.dynamicanalyzer.ui.summary.warning.WarningCase;
import org.tizen.dynamicanalyzer.ui.summary.warning.WarningChecker;
import org.tizen.dynamicanalyzer.ui.summary.warning.WarningData;
-import org.tizen.dynamicanalyzer.ui.timeline.chart.CPUChart;
-import org.tizen.dynamicanalyzer.ui.timeline.chart.NetworkIOChart;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
import org.tizen.dynamicanalyzer.widgets.chart.DAChart;
import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlot;
private HashMap<String, String> addressByFdHashMap = new HashMap<String, String>();
private HashMap<String, String> parentFDByFdHashMap = new HashMap<String, String>();
- private DAChartBoardItem networkTrafficItem;
- private DAChartBoardItem networkIOItem;
- private DAChartBoardItem cpuItem;
+// private DAChartBoardItem networkTrafficItem;
+// private DAChartBoardItem networkIOItem;
+// private DAChartBoardItem cpuItem;
private WarningChecker warningChecker = null;
private FailedChecker failedChecker = null;
networkEventQueue.clear();
addressByFdHashMap.clear();
parentFDByFdHashMap.clear();
- networkTrafficItem = null;
- networkIOItem = null;
- cpuItem = null;
+// networkTrafficItem = null;
+// networkIOItem = null;
+// cpuItem = null;
NetworkTrafficChart.getInstance().clear();
}
return true;
}
- private boolean createTransmissionSizeBoardItem() {
- if (null == networkTrafficItem) {
- if (null == board) {
- return false;
- }
- DAChart chart;
- networkTrafficItem = NetworkTrafficChart.getInstance()
- .createBoardItem(board);
-
- chart = networkTrafficItem.getChart();
- initNetworkChart(chart, true);
- }
- return true;
- }
-
- private boolean createNetworkIOBoardItem() {
- if (null == networkIOItem) {
- if (null == board) {
- return false;
- }
- DAChart chart;
- networkIOItem = NetworkIOChart.getInstance().createBoardItem(board);
- chart = networkIOItem.getChart();
-
- DAChartPlot plot = chart.getPlot();
- DAChartPlotTooltip tooltip = new DAChartPlotTooltip(-1);
- tooltip.setFont(FontResources.CHART_TOOLTIP_FONT);
- plot.setTooltip(tooltip);
-
- DAPopupMenu popupMenu = new DAPopupMenu(chart);
- popupMenu.setFont(FontResources.CONTEXT_MENU_ITEM_FONT);
- DAPopupMenuItem startItem = new DAPopupMenuItem(popupMenu,
- DAPopupMenuItem.NONE);
- startItem.setText(TimelineChartLabels.RANGE_CONTEXT_SET_START);
- startItem.addListener(new PopupStartMenuItemClickListener(
- startItem, board));
-
- DAPopupMenuItem endItem = new DAPopupMenuItem(popupMenu,
- DAPopupMenuItem.NONE);
- endItem.setText(TimelineChartLabels.RANGE_CONTEXT_SET_END);
- endItem.addListener(new PopupEndMenuItemClickListener(endItem,
- board));
-
- DAPopupMenuItem fromSelectionItem = new DAPopupMenuItem(popupMenu,
- DAPopupMenuItem.NONE);
- fromSelectionItem
- .setText(TimelineChartLabels.RANGE_CONTEXT_SET_FROM_SELECTION);
- fromSelectionItem
- .addListener(new PopupFromSelectionMenuItemClickListener(
- fromSelectionItem, board));
-
- DAPopupMenuItem analysisItem = new DAPopupMenuItem(popupMenu,
- DAPopupMenuItem.NONE);
- analysisItem.setText(TimelineChartLabels.RANGE_CONTEXT_ANALYSIS);
- analysisItem.addListener(new PopupAnalysisMenuItemClickListener());
-
- DAPopupMenuItem clearItem = new DAPopupMenuItem(popupMenu,
- DAPopupMenuItem.NONE);
- clearItem.setText(TimelineChartLabels.RANGE_CONTEXT_CLEAR);
- clearItem.addListener(new PopupClearMenuItemClickListener());
-
- TimelineChartMouseEventListener timelineChartMouseEventListener = new TimelineChartMouseEventListener(
- popupMenu, board.getTimeline());
- chart.addMouseListener(timelineChartMouseEventListener);
- chart.addMouseMoveListener(timelineChartMouseEventListener);
- chart.addMouseTrackListener(new TimelineChartMouseTrackAdapter(
- board.getTimeline()));
- plot.setMarkers(board.getMarkers());
- }
- return true;
- }
-
- private boolean createCPUBoardItem() {
- if (null == cpuItem) {
- if (null == board) {
- return false;
- }
- DAChart chart;
- cpuItem = CPUChart.getInstance().createBoardItem(board);
- chart = cpuItem.getChart();
-
- DAChartPlot plot = chart.getPlot();
- DAChartPlotTooltip tooltip = new DAChartPlotTooltip(-1);
- tooltip.setFont(FontResources.CHART_TOOLTIP_FONT);
- plot.setTooltip(tooltip);
-
- DAPopupMenu popupMenu = new DAPopupMenu(chart);
- popupMenu.setFont(FontResources.CONTEXT_MENU_ITEM_FONT);
- DAPopupMenuItem startItem = new DAPopupMenuItem(popupMenu,
- DAPopupMenuItem.NONE);
- startItem.setText(TimelineChartLabels.RANGE_CONTEXT_SET_START);
- startItem.addListener(new PopupStartMenuItemClickListener(
- startItem, board));
-
- DAPopupMenuItem endItem = new DAPopupMenuItem(popupMenu,
- DAPopupMenuItem.NONE);
- endItem.setText(TimelineChartLabels.RANGE_CONTEXT_SET_END);
- endItem.addListener(new PopupEndMenuItemClickListener(endItem,
- board));
-
- DAPopupMenuItem fromSelectionItem = new DAPopupMenuItem(popupMenu,
- DAPopupMenuItem.NONE);
- fromSelectionItem
- .setText(TimelineChartLabels.RANGE_CONTEXT_SET_FROM_SELECTION);
- fromSelectionItem
- .addListener(new PopupFromSelectionMenuItemClickListener(
- fromSelectionItem, board));
-
- DAPopupMenuItem analysisItem = new DAPopupMenuItem(popupMenu,
- DAPopupMenuItem.NONE);
- analysisItem.setText(TimelineChartLabels.RANGE_CONTEXT_ANALYSIS);
- analysisItem.addListener(new PopupAnalysisMenuItemClickListener());
-
- DAPopupMenuItem clearItem = new DAPopupMenuItem(popupMenu,
- DAPopupMenuItem.NONE);
- clearItem.setText(TimelineChartLabels.RANGE_CONTEXT_CLEAR);
- clearItem.addListener(new PopupClearMenuItemClickListener());
-
- TimelineChartMouseEventListener timelineChartMouseEventListener = new TimelineChartMouseEventListener(
- popupMenu, board.getTimeline());
- chart.addMouseListener(timelineChartMouseEventListener);
- chart.addMouseMoveListener(timelineChartMouseEventListener);
- chart.addMouseTrackListener(new TimelineChartMouseTrackAdapter(
- board.getTimeline()));
- plot.setMarkers(board.getMarkers());
- }
- return true;
- }
+// private boolean createTransmissionSizeBoardItem() {
+// if (null == networkTrafficItem) {
+// if (null == board) {
+// return false;
+// }
+// DAChart chart;
+// networkTrafficItem = NetworkTrafficChart.getInstance()
+// .createBoardItem(board);
+//
+// chart = networkTrafficItem.getChart();
+// initNetworkChart(chart, true);
+// }
+// return true;
+// }
+//
+// private boolean createNetworkIOBoardItem() {
+// if (null == networkIOItem) {
+// if (null == board) {
+// return false;
+// }
+// DAChart chart;
+// networkIOItem = NetworkIOChart.getInstance().createBoardItem(board);
+// chart = networkIOItem.getChart();
+//
+// DAChartPlot plot = chart.getPlot();
+// DAChartPlotTooltip tooltip = new DAChartPlotTooltip(-1);
+// tooltip.setFont(FontResources.CHART_TOOLTIP_FONT);
+// plot.setTooltip(tooltip);
+//
+// DAPopupMenu popupMenu = new DAPopupMenu(chart);
+// popupMenu.setFont(FontResources.CONTEXT_MENU_ITEM_FONT);
+// DAPopupMenuItem startItem = new DAPopupMenuItem(popupMenu,
+// DAPopupMenuItem.NONE);
+// startItem.setText(TimelineChartLabels.RANGE_CONTEXT_SET_START);
+// startItem.addListener(new PopupStartMenuItemClickListener(
+// startItem, board));
+//
+// DAPopupMenuItem endItem = new DAPopupMenuItem(popupMenu,
+// DAPopupMenuItem.NONE);
+// endItem.setText(TimelineChartLabels.RANGE_CONTEXT_SET_END);
+// endItem.addListener(new PopupEndMenuItemClickListener(endItem,
+// board));
+//
+// DAPopupMenuItem fromSelectionItem = new DAPopupMenuItem(popupMenu,
+// DAPopupMenuItem.NONE);
+// fromSelectionItem
+// .setText(TimelineChartLabels.RANGE_CONTEXT_SET_FROM_SELECTION);
+// fromSelectionItem
+// .addListener(new PopupFromSelectionMenuItemClickListener(
+// fromSelectionItem, board));
+//
+// DAPopupMenuItem analysisItem = new DAPopupMenuItem(popupMenu,
+// DAPopupMenuItem.NONE);
+// analysisItem.setText(TimelineChartLabels.RANGE_CONTEXT_ANALYSIS);
+// analysisItem.addListener(new PopupAnalysisMenuItemClickListener());
+//
+// DAPopupMenuItem clearItem = new DAPopupMenuItem(popupMenu,
+// DAPopupMenuItem.NONE);
+// clearItem.setText(TimelineChartLabels.RANGE_CONTEXT_CLEAR);
+// clearItem.addListener(new PopupClearMenuItemClickListener());
+//
+// TimelineChartMouseEventListener timelineChartMouseEventListener = new TimelineChartMouseEventListener(
+// popupMenu, board.getTimeline());
+// chart.addMouseListener(timelineChartMouseEventListener);
+// chart.addMouseMoveListener(timelineChartMouseEventListener);
+// chart.addMouseTrackListener(new TimelineChartMouseTrackAdapter(
+// board.getTimeline()));
+// plot.setMarkers(board.getMarkers());
+// }
+// return true;
+// }
+//
+// private boolean createCPUBoardItem() {
+// if (null == cpuItem) {
+// if (null == board) {
+// return false;
+// }
+// DAChart chart;
+// cpuItem = CPUChart.getInstance().createBoardItem(board);
+// chart = cpuItem.getChart();
+//
+// DAChartPlot plot = chart.getPlot();
+// DAChartPlotTooltip tooltip = new DAChartPlotTooltip(-1);
+// tooltip.setFont(FontResources.CHART_TOOLTIP_FONT);
+// plot.setTooltip(tooltip);
+//
+// DAPopupMenu popupMenu = new DAPopupMenu(chart);
+// popupMenu.setFont(FontResources.CONTEXT_MENU_ITEM_FONT);
+// DAPopupMenuItem startItem = new DAPopupMenuItem(popupMenu,
+// DAPopupMenuItem.NONE);
+// startItem.setText(TimelineChartLabels.RANGE_CONTEXT_SET_START);
+// startItem.addListener(new PopupStartMenuItemClickListener(
+// startItem, board));
+//
+// DAPopupMenuItem endItem = new DAPopupMenuItem(popupMenu,
+// DAPopupMenuItem.NONE);
+// endItem.setText(TimelineChartLabels.RANGE_CONTEXT_SET_END);
+// endItem.addListener(new PopupEndMenuItemClickListener(endItem,
+// board));
+//
+// DAPopupMenuItem fromSelectionItem = new DAPopupMenuItem(popupMenu,
+// DAPopupMenuItem.NONE);
+// fromSelectionItem
+// .setText(TimelineChartLabels.RANGE_CONTEXT_SET_FROM_SELECTION);
+// fromSelectionItem
+// .addListener(new PopupFromSelectionMenuItemClickListener(
+// fromSelectionItem, board));
+//
+// DAPopupMenuItem analysisItem = new DAPopupMenuItem(popupMenu,
+// DAPopupMenuItem.NONE);
+// analysisItem.setText(TimelineChartLabels.RANGE_CONTEXT_ANALYSIS);
+// analysisItem.addListener(new PopupAnalysisMenuItemClickListener());
+//
+// DAPopupMenuItem clearItem = new DAPopupMenuItem(popupMenu,
+// DAPopupMenuItem.NONE);
+// clearItem.setText(TimelineChartLabels.RANGE_CONTEXT_CLEAR);
+// clearItem.addListener(new PopupClearMenuItemClickListener());
+//
+// TimelineChartMouseEventListener timelineChartMouseEventListener = new TimelineChartMouseEventListener(
+// popupMenu, board.getTimeline());
+// chart.addMouseListener(timelineChartMouseEventListener);
+// chart.addMouseMoveListener(timelineChartMouseEventListener);
+// chart.addMouseTrackListener(new TimelineChartMouseTrackAdapter(
+// board.getTimeline()));
+// plot.setMarkers(board.getMarkers());
+// }
+// return true;
+// }
private NetworkChartData findAddressChart(NetworkChartDataEvent data) {
setTableToolTipListener(new TableTooltipListener(table));
}
- protected abstract List<TableInput> makeTableInput(
- List<LogData> userLog);
+ protected abstract List<TableInput> makeTableInput(List<LogData> userLog);
+
protected abstract int getItemCount();
+
protected abstract int getTableLogId();
+
protected abstract String getSelectQueryOption();
-
+
public void clean() {
getTable().removeAll();
scrollbar.setMaximum(0);
} else {
scrollEndSelection = scrollSelection + additionalSelectCount;
}
- List<LogData> outputList = SqlManager.getInstance()
- .selectTableData(getTableLogId(), scrollStartSelection,
- scrollEndSelection+1, getSelectQueryOption());
+ List<LogData> outputList = SqlManager.getInstance().selectTableData(
+ getTableLogId(), scrollStartSelection, scrollEndSelection + 1,
+ getSelectQueryOption());
return outputList;
}
-
private List<TableInput> makeTableInputFromDB() {
int scrollSelection = scrollbar.getSelection();
boolean isQueryDB = false;
if (preLogCount != getItemCount()) {
isQueryDB = true;
}
+
+ if (null != savedLogDataList
+ && savedLogDataList.size() != getTableLenght()) {
+ isQueryDB = true;
+ }
+
preLogCount = getItemCount();
if (isQueryDB) {
savedLogDataList = getItemListFromDB();
}
-
+
if (null == savedLogDataList) {
return null;
}
-
+
return makeTableInput(savedLogDataList);
}
if (getItemCount() <= selectedEndIndex) {
selectedEndIndex = getItemCount();
}
- List<LogData> outputList = SqlManager.getInstance()
- .selectTableData(getTableLogId(), scrollSelection,
- selectedEndIndex + 1, getSelectQueryOption());
+ List<LogData> outputList = SqlManager.getInstance().selectTableData(
+ getTableLogId(), scrollSelection, selectedEndIndex + 1,
+ getSelectQueryOption());
return outputList;
}
boolean isSelectionItem = false;
int focusIndex = -1;
int size = output.size();
-
+
for (int i = 0; i < size; i++) {
GridItem gridItem = new GridItem(table, SWT.NONE);
DATableDataFormat gridData = (DATableDataFormat) output.get(i)
int columnCount = text.size();
for (int index = 0; index < columnCount; index++) {
String textData = text.get(index);
- if(null != textData){
+ if (null != textData) {
gridItem.setText(index, text.get(index));
}
}
}
}
-
int[] sels = new int[selectionList.size()];
for (int i = 0; i < selectionList.size(); i++) {