From: Hyunjong,park Date: Mon, 4 Nov 2013 11:58:00 +0000 (+0900) Subject: [Title] fix. network page X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e9546b4086051694e72740224a7128949c75e12;p=sdk%2Ftools%2Fdynamic-analyzer.git [Title] fix. network page [Desc.] chnage hexcode in detail view [Issue] - --- diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkApiListTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkApiListTable.java index 5e3afeb..232db00 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkApiListTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkApiListTable.java @@ -134,7 +134,7 @@ public class NetworkApiListTable extends DAApiListTableComposite { String seq = Integer.toString(contentTemp.getSeq()); contentText.add(0, seq); contentData.add(seq); - + boolean isExistStartTimeLog = false; if (fdApiType.equals(Integer .toString(LogCenterConstants.SOCKET_API_RECV_START)) @@ -150,7 +150,7 @@ public class NetworkApiListTable extends DAApiListTableComposite { findStartAPITableIndexHashMap.put(contentTemp.getArgs(), i); - }else if (fdApiType.equals(Integer + } else if (fdApiType.equals(Integer .toString(LogCenterConstants.SOCKET_API_RECV_END)) || fdApiType.equals(Integer .toString(LogCenterConstants.SOCKET_API_SEND_END)) @@ -169,31 +169,34 @@ public class NetworkApiListTable extends DAApiListTableComposite { long startTime = contents.get(startLogIndex.intValue()) .getContents().getTime(); - String timeFormat = Formatter - .toTimeFormat(contentTemp.getTime() - startTime); - String removeTimeFormat = timeFormat.replace("00:", CommonConstants.EMPTY);//$NON-NLS-1$ + String timeFormat = Formatter.toTimeFormat(contentTemp + .getTime() - startTime); + String removeTimeFormat = timeFormat.replace( + "00:", CommonConstants.EMPTY);//$NON-NLS-1$ contentText.add(removeTimeFormat); // elapsed time - contentData.add(Long.toString(contentTemp.getTime() - startTime)); + contentData.add(Long.toString(contentTemp.getTime() + - startTime)); isExistStartTimeLog = true; removeTableIndex.add(startLogIndex.intValue()); } } - + if (!isExistStartTimeLog) { - contentText.add(Formatter.toTimeFormat(contentTemp.getTime())); // start time + contentText.add(Formatter.toTimeFormat(contentTemp.getTime())); // start + // time contentData.add(Long.toString(contentTemp.getTime())); contentText.add("00.000");//$NON-NLS-1$ //elapsed time contentData.add("00.000");//$NON-NLS-1$ } - + contentText.add(Integer.toString(contentTemp.getPid())); contentData.add(Integer.toString(contentTemp.getPid())); - + contentText.add(Integer.toString(contentTemp.getTid())); contentData.add(Integer.toString(contentTemp.getTid())); - + contentText.add(contentTemp.getApiName()); contentData.add(contentTemp.getApiName()); @@ -237,7 +240,7 @@ public class NetworkApiListTable extends DAApiListTableComposite { TableInput tableInput = new TableInput(); tableInput.setText(contentText); tableInput.setData(tableData); - if(!errMsg.contains("SUCCESS") ){//$NON-NLS-1$ + if (!errMsg.contains("SUCCESS")) {//$NON-NLS-1$ tableInput.setFailed(true); } input.add(tableInput); diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkApiListView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkApiListView.java index b2ffe63..dd36d00 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkApiListView.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkApiListView.java @@ -34,6 +34,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.tizen.dynamicanalyzer.common.AnalyzerConstants; import org.tizen.dynamicanalyzer.common.AnalyzerManager; +import org.tizen.dynamicanalyzer.common.CommonConstants; import org.tizen.dynamicanalyzer.common.DASelectionData; import org.tizen.dynamicanalyzer.model.DAView; import org.tizen.dynamicanalyzer.nl.NetworkPageLabels; @@ -143,7 +144,8 @@ public class NetworkApiListView extends DAView { @Override public void updateView(DASelectionData data) { - NetworkChartManager.getInstance().setPacketMessage(""); + NetworkChartManager.getInstance().setPacketMessage( + CommonConstants.EMPTY); NetworkChartData pageData = (NetworkChartData) data.getData(); if (!(pageData instanceof NetworkChartData)) { diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkChartManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkChartManager.java index c73ae68..69cebb2 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkChartManager.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkChartManager.java @@ -181,20 +181,24 @@ public class NetworkChartManager implements Runnable { StringBuffer strHex = new StringBuffer(); StringBuffer strAscii = new StringBuffer(); int index = 1; - for (int nIndex = 0; nIndex < packetMessage.getBytes().length; nIndex++) { + long hexAddress = 0; + for (int nIndex = 0; nIndex < packetMessage.length(); nIndex++) { strAscii.append(packetMessage.charAt(nIndex)); - strHex.append(String.format("%02X ", - (int) packetMessage.charAt(nIndex)));//$NON-NLS-1$ + if (index == 1) { + strHex.append( + Long.toHexString((Long) hexAddress++).toUpperCase()) + .append(CommonConstants.TAB); + } else if (index % 8 == 0) { + strHex.append(CommonConstants.NEW_LINE) + .append(Long.toHexString((Long) hexAddress++) + .toUpperCase()).append(CommonConstants.TAB); - if (index % 8 == 0) { - strHex.append(CommonConstants.NEW_LINE); } + strHex.append(String.format("%02X ", + (int) packetMessage.charAt(nIndex)));//$NON-NLS-1$ - if (nIndex >= packetMessage.length()) { - break; - } index++; } @@ -208,11 +212,13 @@ public class NetworkChartManager implements Runnable { CommonConstants.NEW_LINE); out.append(CommonConstants.SPACE).append(CommonConstants.SPACE); - out.append(NetworkPageLabels.NETWORK_DETAILS_PAYLOAD_ASCII) + out.append(NetworkPageLabels.NETWORK_DETAILS_PAYLOAD_HEXCODE) .append(CommonConstants.NEW_LINE) .append(CommonConstants.NEW_LINE); out.append(strHex.toString()); this.packetMessage = out.toString(); + } else { + this.packetMessage = CommonConstants.EMPTY; } } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkChartView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkChartView.java index 93868ec..afd43a0 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkChartView.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkChartView.java @@ -180,14 +180,14 @@ public class NetworkChartView extends DAView { double startTime = (double) start / TimelineConstants.MEGA_DOUBLE; double endTime = (double) end / TimelineConstants.MEGA_DOUBLE; -// double middleTime = (startTime + endTime) / 2.0; -// if (start == end) { -// middleTime = startTime; -// } + // double middleTime = (startTime + endTime) / 2.0; + // if (start == end) { + // middleTime = startTime; + // } DAChartBoard chartBoard = (DAChartBoard) stackLayout.topControl; -// chartBoard.setVisibleMiddleTime(middleTime); + // chartBoard.setVisibleMiddleTime(middleTime); DAChartPlotIntervalMarker intervalMarker = (DAChartPlotIntervalMarker) chartBoard .getMarkers().get(UICommonConstants.SELECTION_MARKER_INDEX); intervalMarker.setStartVal(startTime);