[Title] fix table widget
authorHyunjong,park <phjwithyou.park@samsung.com>
Fri, 1 Nov 2013 10:14:13 +0000 (19:14 +0900)
committerHyunjong,park <phjwithyou.park@samsung.com>
Fri, 1 Nov 2013 10:14:13 +0000 (19:14 +0900)
[Desc.] show context data by hex
[Issue] -

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkApiListTable.java

index d6f0761..bffaad3 100644 (file)
@@ -121,7 +121,7 @@ public class FileApiListTable extends DAApiListTableComposite {
                        List<String> contentText = new ArrayList<String>();
                        List<String> contentData = new ArrayList<String>();
 
-                       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) {
index 426ae6b..72240b9 100644 (file)
@@ -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);
                }
index 9a0ec36..7327c9c 100644 (file)
@@ -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();