[Title] fix. windowing table widget
authorHyunjong,park <phjwithyou.park@samsung.com>
Tue, 5 Nov 2013 05:05:40 +0000 (14:05 +0900)
committerHyunjong,park <phjwithyou.park@samsung.com>
Tue, 5 Nov 2013 05:05:40 +0000 (14:05 +0900)
[Desc.] update snapshotview and callstack view
[Issue] -

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallstackView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/SnapshotView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/CallTraceTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/CallTraceView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/table/DAWindowingTableComposite.java

index 5987bf5..e079ec5 100644 (file)
@@ -43,6 +43,7 @@ import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DAWindowingTableComposite;
 import org.tizen.dynamicanalyzer.ui.widgets.table.TableColumnSizePackListener;
 
 public class CallstackView extends DAView {
@@ -101,6 +102,8 @@ public class CallstackView extends DAView {
                        Grid table = null;
                        if (control instanceof DATableComposite) {
                                table = ((DATableComposite) control).getTable();
+                       } else if (control instanceof DAWindowingTableComposite) {
+                               table = ((DAWindowingTableComposite) control).getTable();
                        } else if (control instanceof DATreeComposite) {
                                table = ((DATreeComposite) control).getTable();
                        } else {
index 12e7d29..4c96d4c 100644 (file)
@@ -67,6 +67,7 @@ import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DAWindowingTableComposite;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlotIntervalMarker;
@@ -376,6 +377,8 @@ public class SnapshotView extends DAView {
                                return;
                        } else if (control instanceof DATableComposite) {
                                table = ((DATableComposite) control).getTable();
+                       } else if (control instanceof DAWindowingTableComposite) {
+                               table = ((DAWindowingTableComposite) control).getTable();
                        } else if (control instanceof DATreeComposite) {
                                table = ((DATreeComposite) control).getTable();
                        } else {
index 1b3d9c1..959c628 100644 (file)
@@ -270,7 +270,6 @@ public class CallTraceTable extends DATableComposite {
 //
 //public class CallTraceTable extends DAWindowingTableComposite {
 //     private String dbOptionQuery = "messageid = 8";//$NON-NLS-1$
-//     //private DAChartBoard chartBoard = null;
 //
 //     public CallTraceTable(Composite parent, int compStyle, int tableStyle) {
 //             super(parent, compStyle, tableStyle);
@@ -319,7 +318,7 @@ public class CallTraceTable extends DATableComposite {
 //                             text.add(Integer.toString(data.getPid()));
 //                             text.add(data.getApiName());
 //                             text.add(data.getArgs());
-//                             text.add(data.getHexReturn());
+//     //                      text.add(data.getHexReturn());
 //                             text.add(data.getLibName());
 //                     } else if (logData instanceof ProfileData) {
 //                             ProfileData data = (ProfileData) logData;
@@ -386,4 +385,4 @@ public class CallTraceTable extends DATableComposite {
 //     protected String getSelectQueryOption(){
 //             return dbOptionQuery;
 //     }
-//}
+//}
\ No newline at end of file
index 9c2446c..24abcd6 100644 (file)
@@ -217,11 +217,8 @@ public class CallTraceView extends DAView {
        }
 
 }
-
-
-
-
-
+//
+//
 //import org.eclipse.swt.SWT;
 //import org.eclipse.swt.layout.FillLayout;
 //import org.eclipse.swt.widgets.Composite;
@@ -253,7 +250,7 @@ public class CallTraceView extends DAView {
 //                     AnalyzerLabels.TABLE_COLUMN_PARAMETERS,
 //                     AnalyzerLabels.TABLE_COLUMN_RETURN,
 //                     AnalyzerLabels.TABLE_COLUMN_LIBNAME };
-//     private int[] columnSizes = { 60, 35, 35, 350, 150, 80, 200 };
+//     private int[] columnSizes = { 65, 45, 45, 400, 150, 80, 200 };
 //     private boolean[] columnVisibility = { true, true, true, true, true, true,
 //                     true };
 //     int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM,
@@ -327,5 +324,4 @@ public class CallTraceView extends DAView {
 //     public void updateLog(LogPackage logPack) {
 //             
 //     }
-//
-//}
\ No newline at end of file
+//}
index 485d3de..97f7622 100644 (file)
@@ -68,8 +68,8 @@ import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenuListener;
 
 public abstract class DAWindowingTableComposite extends Composite {
 
+       final private boolean choiceDumyDBLog = false;
        final private int additionalSelectCount = 100;
-       final private boolean choiceDumyDBLog = true;
 
        protected Composite scrollComp;
        protected ScrollBar scrollbar;
@@ -94,11 +94,11 @@ public abstract class DAWindowingTableComposite extends Composite {
        private int scrollStartSelection = 0;
        private int scrollEndSelection = 0;
        private int preDBTableItemsCount = 0;
-       private List<TableInput> savedDBList = null;
+       private List<TableInput> savedTableInputList = null;
 
        private int preLogCount = -1;
        private int preSelectionScrollIndex = -1;
-       List<LogData> preDBList = null;
+       List<LogData> savedLogDataList = null;
 
        protected Color rangeColor = ColorResources.TABLE_RANGE_COLOR_RANGE;
        protected Color secondSelectionColor = ColorResources.TABLE_RANGE_COLOR_SECOND_SELECTION;
@@ -115,8 +115,6 @@ public abstract class DAWindowingTableComposite extends Composite {
 
        protected Point mousePoint = new Point(0, 0);
 
-       private int failedAPITableColumIndex = -1;
-
        protected RangeDataManager rangeDataManager = RangeDataManager
                        .getInstance();
 
@@ -226,11 +224,9 @@ public abstract class DAWindowingTableComposite extends Composite {
 
        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();
@@ -242,7 +238,8 @@ public abstract class DAWindowingTableComposite extends Composite {
                scrollStartSelection = 0;
                scrollEndSelection = 0;
                preDBTableItemsCount = 0;
-               savedDBList = null;
+               savedTableInputList = null;
+               savedLogDataList = null;
        }
 
        private List<TableInput> makeTableInput() {
@@ -322,10 +319,9 @@ public abstract class DAWindowingTableComposite extends Composite {
                return outputList;
        }
 
+       
        private List<TableInput> makeTableInputFromDB() {
                int scrollSelection = scrollbar.getSelection();
-               List<LogData> userLog = null;
-
                boolean isQueryDB = false;
                if (preSelectionScrollIndex != scrollSelection) {
                        isQueryDB = true;
@@ -338,14 +334,14 @@ public abstract class DAWindowingTableComposite extends Composite {
                preLogCount = getItemCount();
 
                if (isQueryDB) {
-                       userLog = getItemListFromDB();
-               } else {
-                       userLog = preDBList;
+                       savedLogDataList = getItemListFromDB();
                }
-               if (null == userLog) {
+               
+               if (null == savedLogDataList) {
                        return null;
                }
-               return makeTableInput(userLog);
+               
+               return makeTableInput(savedLogDataList);
        }
 
        private List<LogData> getItemListFromDB() {
@@ -356,7 +352,7 @@ public abstract class DAWindowingTableComposite extends Composite {
                }
                List<LogData> outputList = SqlManager.getInstance()
                                .selectTableData(getTableLogId(), scrollSelection,
-                                               selectedEndIndex + 1, "messageid = 8");
+                                               selectedEndIndex + 1, getSelectQueryOption());
                return outputList;
        }
 
@@ -401,7 +397,6 @@ public abstract class DAWindowingTableComposite extends Composite {
                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)
@@ -814,19 +809,11 @@ public abstract class DAWindowingTableComposite extends Composite {
                return autoColumnPack;
        }
 
-       public int getFailedAPITableIndex() {
-               return failedAPITableColumIndex;
-       }
-
-       public void setFailedAPITableIndex(int failedTableIndex) {
-               this.failedAPITableColumIndex = failedTableIndex;
-       }
-
-       public List<TableInput> getSavedDBList() {
-               return savedDBList;
+       private List<TableInput> getSavedDBList() {
+               return savedTableInputList;
        }
 
-       public void setSavedDBList(List<TableInput> savedDBList) {
-               this.savedDBList = savedDBList;
+       private void setSavedDBList(List<TableInput> savedDBList) {
+               this.savedTableInputList = savedDBList;
        }
 }