From 7214e56cd4784f6881c8b0bce3fda61cbaa88cfb Mon Sep 17 00:00:00 2001 From: "Hyunjong,park" Date: Fri, 1 Nov 2013 19:14:13 +0900 Subject: [PATCH] [Title] fix table widget [Desc.] show context data by hex [Issue] - --- .../dynamicanalyzer/ui/file/FileApiListTable.java | 31 +++++++++++++++++----- .../dynamicanalyzer/ui/file/FileDataMaker.java | 16 ++++++++--- .../ui/network/NetworkApiListTable.java | 11 +++++--- 3 files changed, 45 insertions(+), 13 deletions(-) diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListTable.java index d6f0761..bffaad3 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListTable.java @@ -121,7 +121,7 @@ public class FileApiListTable extends DAApiListTableComposite { List contentText = new ArrayList(); List contentData = new ArrayList(); - int startLogIndex = 0; + Integer startLogIndex = 0; int fdApiType = contentTemp.getFdApiType(); if (fdApiType==LogCenterConstants.FD_API_TYPE_READ_START @@ -132,8 +132,11 @@ public class FileApiListTable extends DAApiListTableComposite { } else if (fdApiType==LogCenterConstants.FD_API_TYPE_READ_END || fdApiType==LogCenterConstants.FD_API_TYPE_WRITE_END) { - startLogIndex = findStartAPITableIndexHashMap.get(contentTemp.getArgs()); - removeTableIndex.add(startLogIndex); + startLogIndex = findStartAPITableIndexHashMap.get(contentTemp.getArgs()); + if(null != startLogIndex){ + removeTableIndex.add(startLogIndex.intValue()); + } + } @@ -144,8 +147,14 @@ public class FileApiListTable extends DAApiListTableComposite { if (fdApiType==LogCenterConstants.FD_API_TYPE_READ_END || fdApiType==LogCenterConstants.FD_API_TYPE_WRITE_END) { - contentText.add(input.get(startLogIndex).getText().get(1)); - contentData.add(input.get(startLogIndex).getText().get(1)); + if(null != startLogIndex){ + contentText.add(input.get(startLogIndex.intValue()).getText().get(1)); + contentData.add(input.get(startLogIndex.intValue()).getText().get(1)); + }else{ + contentText.add(Formatter.toTimeFormat(time)); + contentData.add(Long.toString(time)); + } + } else { contentText.add(Formatter.toTimeFormat(contentTemp.getTime())); contentData.add(Formatter.toTimeFormat(contentTemp.getTime())); @@ -161,8 +170,18 @@ public class FileApiListTable extends DAApiListTableComposite { contentData.add(contentTemp.getArgs()); contentText.add(Integer.toString(contentTemp.getTid())); contentData.add(Integer.toString(contentTemp.getTid())); - contentText.add(Long.toString(contentTemp.getReturn())); + +// if(fdApiType == LogCenterConstants.FD_API_TYPE_OPEN){ +// contentText.add("0x"+Long.toHexString(contentTemp.getReturn()));//$NON-NLS-1$ +// contentData.add("0x"+Long.toHexString(contentTemp.getReturn()));//$NON-NLS-1$ +// }else{ +// contentText.add(Long.toString(contentTemp.getReturn())); +// contentData.add(Long.toString(contentTemp.getReturn())); +// } + + contentText.add(contentTemp.getHexReturn()); contentData.add(Long.toString(contentTemp.getReturn())); + String errMsg = ErrorCodeManager.getInatance() .getErrorCode(contentTemp.getErrno()).name(); if (null == errMsg) { diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java index 426ae6b..72240b9 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java @@ -125,7 +125,7 @@ public class FileDataMaker { int size = inputs.size(); for (int i = 0; i < size; i++) { FileData input = (FileData) inputs.get(i); - + if (AnalyzerUtil.isInternal(input)) { continue; } @@ -184,7 +184,8 @@ public class FileDataMaker { } else if (fdApiType == LogCenterConstants.FD_API_TYPE_READ_END || fdApiType == LogCenterConstants.FD_API_TYPE_WRITE_END) { long fileSize = input.getFileSize(); - System.out.println(input.getApiName()+" : fileSize : "+fileSize); + System.out.println(input.getApiName() + " : fileSize : " + + fileSize); if (fileSize < 0) { fileSize = 0; } @@ -320,7 +321,7 @@ public class FileDataMaker { fromSelectionItem .addListener(new PopupFromSelectionMenuItemClickListener( fromSelectionItem, board)); - + DAPopupMenuItem analysisItem = new DAPopupMenuItem(popupMenu, DAPopupMenuItem.NONE); analysisItem.setText(TimelineChartLabels.RANGE_CONTEXT_ANALYSIS); @@ -349,7 +350,14 @@ public class FileDataMaker { initFileChart(chart, true); } else { DAChartBoardItem parentItem = parent.getItem(); - item = new DAChartBoardItem(parentItem, Long.toString(sync.getFD())); + if (sync.getFD() > 999999999) { + item = new DAChartBoardItem(parentItem, "0x" + + Long.toHexString(sync.getFD())); + } else { + item = new DAChartBoardItem(parentItem, Long.toString(sync + .getFD())); + } + chart = item.getChart(); initFileChart(chart, false); } 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 9a0ec36..7327c9c 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 @@ -198,15 +198,20 @@ public class NetworkApiListTable extends DAApiListTableComposite { contentText.add(contentTemp.getApiName()); contentData.add(contentTemp.getApiName()); + if(contentTemp.getApiName().contains(CommonConstants.DOUBLE_COLON)){ + contentText.add(AnalyzerUtil.toHexdecimal(contentTemp.getObjectAddress())); + contentData.add(AnalyzerUtil.toHexdecimal(contentTemp.getObjectAddress())); + }else{ + contentText.add(CommonConstants.DASH); + contentData.add(CommonConstants.DASH); + } - contentText.add(AnalyzerUtil.toHexdecimal(contentTemp.getObjectAddress()));//$NON-NLS-1$ - contentData.add(AnalyzerUtil.toHexdecimal(contentTemp.getObjectAddress()));//$NON-NLS-1$ contentText.add(contentTemp.getArgs()); contentData.add(contentTemp.getArgs()); contentText.add(Integer.toString(contentTemp.getTid())); contentData.add(Integer.toString(contentTemp.getTid())); - contentText.add(Long.toString(contentTemp.getReturn())); + contentText.add(contentTemp.getHexReturn()); contentData.add(Long.toString(contentTemp.getReturn())); int apiType = contentTemp.getFdApiType(); -- 2.7.4