[Title] Summary page upgrade
authorLee <jy.exe.lee@samsung.com>
Mon, 19 Nov 2012 06:03:29 +0000 (15:03 +0900)
committerLee <jy.exe.lee@samsung.com>
Mon, 19 Nov 2012 06:03:29 +0000 (15:03 +0900)
[Desc.] when summary page data doubleclicked, change page
[Issue] redmine #7467

34 files changed:
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerConstants.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StopHandler.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogCenterConstants.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogListQueue.java [new file with mode: 0644]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogParser.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/DAView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/FilePageLabels.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/FilePageLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/SummaryLabels.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/SummaryLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChartView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/FileChartManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallstackView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/DAPageComposite.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/ViewAction.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfilingView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/OpenTraceDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/RecordStartStopThread.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/ToolbarArea.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/UserInterfacePage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/UserInterfacePageDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/profiling/UserInterfaceFunctionProfilingView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/DAMessageBox.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/DATabComposite.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/FindDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/table/DATableComposite.java

index 8e0f3d2..42f3c42 100644 (file)
@@ -82,6 +82,7 @@ public class AnalyzerConstants {
        public static final String IDE_COMMUNICATOR_THREAD = "IDE Communicator thread"; //$NON-NLS-1$\r
        public static final String SEND_MESSAGE_THREAD = "Send message thread"; //$NON-NLS-1$\r
        public static final String START_STOP_THREAD = "Start stop thread"; //$NON-NLS-1$\r
+       public static final String FILE_CHART_MANAGER_THREAD = "File Chart Manager thread"; //$NON-NLS-1$\r
 \r
        /* log parsing token and callstack parsing token, etc... */\r
        public static final String CALLSTACK_START = "callstack_start"; //$NON-NLS-1$\r
index a3e6d31..5cc3c4f 100644 (file)
@@ -19,6 +19,7 @@ public class StopHandler extends AbstractHandler {
                Display.getDefault().syncExec(new Runnable() {
                        @Override
                        public void run() {
+                               System.out.println("Stop trace handler called!!!");
                                FunctionUsageProfilingView profilingView = (FunctionUsageProfilingView) AnalyzerUtil
                                                .getView(SummaryPage.ID, FunctionUsageProfilingView.ID);
                                ((DATreeComposite) profilingView.getControl()).getTable()
index 6d0c05f..02b5a56 100644 (file)
@@ -30,14 +30,15 @@ public class LogCenterConstants {
 
        /* probe IDs */
        public static final int LOG_MEMORY = 1;
-       public static final int LOG_UI_CONTROL = 2;
+       public static final int LOG_CONTROL = 2;
        public static final int LOG_RECODER = 3;
        public static final int LOG_USER_FUNCTION = 4;
        public static final int LOG_RESOURCE = 5;
        public static final int LOG_LIFECYCLE = 6;
        public static final int LOG_SNAPSHOT = 7;
-       public static final int LOG_UI_SCENE = 8;
+       public static final int LOG_SCENE = 8;
        public static final int LOG_DEVICE = 9;
+       public static final int LOG_THREAD = 10;
        public static final int LOG_SAMPLE = 11;
        public static final int LOG_SYSTEM = 12;
        public static final int LOG_CUSTOM_CHART = 13;
@@ -64,6 +65,14 @@ public class LogCenterConstants {
        public static final int MEMORY_ADDR_INDEX = 14;
        public static final int MEMORY_RESERVED_INDEX = 15;
 
+       /* Log UserInterface Control : 2 */
+       public static final int USER_INTERFACE_CONTROL_LIST_CONTROL_NAME_INDEX = 12;
+       public static final int USER_INTERFACE_CONTROL_LIST_POINTER_INDEX = 13;
+       public static final int USER_INTERFACE_CONTROL_LIST_PARENT_NAME_INDEX = 14;
+       public static final int USER_INTERFACE_CONTROL_LIST_PARENT_POINTER_INDEX = 15;
+       public static final int USER_INTERFACE_CONTROL_LIST_CHILD_NAME_INDEX = 16;
+       public static final int USER_INTERFACE_CONTROL_LIST_CHILD_POINTER_INDEX = 17;
+
        /* log user function : 4 */
        public static final int USER_FUNCTION_BINARY_RANGE_START_INDEX = 12;
        public static final int USER_FUNCTION_BINARY_RANGE_END_INDEX = 13;
@@ -100,6 +109,14 @@ public class LogCenterConstants {
        public static final String FD_API_WAIT = "13"; //$NON-NLS-1$
        public static final String FD_API_INTERNAL_USE = "14"; //$NON-NLS-1$
 
+       /* Log UserInterface Scene Transforms : 8 */
+       public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_SCENE_NAME_INDEX = 12;
+       public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_NAME_INDEX = 13;
+       public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_POINTER_INDEX = 14;
+       public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_NAME_INDEX = 15;
+       public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_POINTER_INDEX = 16;
+       public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_DIRECTION_INDEX = 17;
+
        /* log Device : 9 */
        public static final int DEVICE_ENERGY_INDEX = 2;
        public static final int DEVICE_TIME_INDEX = TIME_INDEX;
@@ -157,23 +174,6 @@ public class LogCenterConstants {
        public static final int COMMON_COLUMN_SIZE_PCADDR = 0;
        public static final int COMMON_COLUMN_SIZE_ERROR = 0;
 
-       /* Log UserInterface Control List view */
-       public static final int USER_INTERFACE_CONTROL_LIST_CONTROL_NAME_INDEX = 12;
-       public static final int USER_INTERFACE_CONTROL_LIST_POINTER_INDEX = 13;
-       public static final int USER_INTERFACE_CONTROL_LIST_PARENT_NAME_INDEX = 14;
-       public static final int USER_INTERFACE_CONTROL_LIST_PARENT_POINTER_INDEX = 15;
-       public static final int USER_INTERFACE_CONTROL_LIST_CHILD_NAME_INDEX = 16;
-       public static final int USER_INTERFACE_CONTROL_LIST_CHILD_POINTER_INDEX = 17;
-       
-       /* Log UserInterface Scene Transforms List view */
-       public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_SCENE_NAME_INDEX = 12;
-       public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_NAME_INDEX = 13;
-       public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_POINTER_INDEX = 14;
-       public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_NAME_INDEX = 15;
-       public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_POINTER_INDEX = 16;
-       public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_DIRECTION_INDEX = 17;
-       
-       
        public static String getLogCenterNameFromId(int id) {
                if (id == LOG_MEMORY) {
                        return "memory"; //$NON-NLS-1$
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogListQueue.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogListQueue.java
new file mode 100644 (file)
index 0000000..5873de5
--- /dev/null
@@ -0,0 +1,44 @@
+package org.tizen.dynamicanalyzer.logparser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class LogListQueue {
+       private List<List<List<String>>> data = null;
+
+       public LogListQueue() {
+               data = new ArrayList<List<List<String>>>();
+       }
+       
+       public List<List<String>> getFirst() {
+               if (null == data) {
+                       data = new ArrayList<List<List<String>>>();
+                       return null;
+               }
+               List<List<String>> output = data.get(0);
+               data.remove(0);
+               return output;
+       }
+
+       public void putLog(List<List<String>> input) {
+               if (null == data) {
+                       data = new ArrayList<List<List<String>>>();
+               }
+               data.add(input);
+       }
+
+       public boolean isEmpty() {
+               if (null == data) {
+                       data = new ArrayList<List<List<String>>>();
+               }
+               return data.isEmpty();
+       }
+
+       public int size() {
+               return data.size();
+       }
+
+       public void clear() {
+               data.clear();
+       }
+}
index 51adc5b..e7d9bc5 100644 (file)
@@ -137,7 +137,7 @@ public class LogParser implements Runnable {
                        logId = slicedLog[LogCenterConstants.ID_INDEX];
                        int id = Integer.parseInt(logId);
                        if (LogCenterConstants.LOG_DEVICE != id){
-//                     if (LogCenterConstants.LOG_DEVICE != id && LogCenterConstants.LOG_SNAPSHOT != id) {
+//                     if (LogCenterConstants.LOG_DEVICE != id && LogCenterConstants.LOG_UI_SCENE != id) {
                                if (null == pid) {
                                        pid = slicedLog[LogCenterConstants.PROCESS_ID_INDEX];
                                } else {
@@ -147,9 +147,9 @@ public class LogParser implements Runnable {
                                        }
                                }
                        }
-                       if (LogCenterConstants.LOG_SNAPSHOT == id) {
-                               System.out.println("break point");
-                       }
+//                     if (LogCenterConstants.LOG_UI_SCENE == id) {
+//                             System.out.println("break point");
+//                     }
 
                        String currentTime = null;
                        try {
index c03a59f..8258acd 100644 (file)
@@ -26,6 +26,8 @@
 
 package org.tizen.dynamicanalyzer.model;
 
+import java.util.List;
+
 import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
@@ -124,4 +126,10 @@ public class DAView extends Composite implements ViewAction {
                innerMaxWeight = inner;
                outerMaxWeight = outer;
        }
+
+       @Override
+       public void setSelection(List<String> data) {
+               // TODO Auto-generated method stub
+               
+       }
 }
index 9921262..e18c217 100644 (file)
@@ -31,35 +31,35 @@ import org.eclipse.osgi.util.NLS;
 
 public class FilePageLabels extends NLS {
        private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.FilePageLabels"; //$NON-NLS-1$
-       public static String FILE_API_LIST_VIEW_ERRNO;
+
+       public static String FILE_API_LIST_VIEW_TITLE;
        public static String FILE_API_LIST_VIEW_INDEX;
-       public static String FILE_API_LIST_VIEW_NAME;
+       public static String FILE_API_LIST_VIEW_TIME;
+       public static String FILE_API_LIST_VIEW_API;
        public static String FILE_API_LIST_VIEW_PARAMETER;
-       public static String FILE_API_LIST_VIEW_RETURN;
        public static String FILE_API_LIST_VIEW_THREAD_ID;
-       public static String FILE_API_LIST_VIEW_TIME;
-       public static String FILE_API_LIST_VIEW_TITLE;
-       
+       public static String FILE_API_LIST_VIEW_RETURN;
+       public static String FILE_API_LIST_VIEW_ERRNO;
+
+       public static String FILE_CHART_TITLE;
        public static String FILE_CHART_CHART;
        public static String FILE_CHART_FILE;
-       public static String FILE_CHART_TITLE;
        public static String FILE_CHART_TOGGLE_RENDERER_FD;
        public static String FILE_CHART_TOGGLE_RENDERER_OMIT;
        public static String FILE_CHART_TOGGLE_RENDERER_OBJ;
        public static String FILE_CHART_TOGGLE_RENDERER_OBJECT;
-       
+
+       public static String FILE_DETAILS_TITLE;
        public static String FILE_DETAILS_API_COUNT;
        public static String FILE_DETAILS_FAILED_API_COUNT;
        public static String FILE_DETAILS_FILE_NAME;
        public static String FILE_DETAILS_FILE_NAME_NEWLINE;
        public static String FILE_DETAILS_FILE_PATH;
        public static String FILE_DETAILS_READ_SIZE;
-       public static String FILE_DETAILS_TITLE;
        public static String FILE_DETAILS_TOTAL_USE_TIME;
        public static String FILE_DETAILS_WRITE_SIZE;
        public static String FILE_DETAILS_TOTAL_SIZE;
-       
-       
+
        public static String FILE_TIMELINE_DATA_STR1;
        public static String FILE_TIMELINE_DATA_STR2;
        public static String FILE_TIMELINE_DATA_STR3;
index 6082726..a62eeca 100644 (file)
@@ -1,10 +1,10 @@
+FILE_API_LIST_VIEW_TITLE=File API List
 FILE_API_LIST_VIEW_INDEX=\#
-FILE_API_LIST_VIEW_NAME=File API
+FILE_API_LIST_VIEW_TIME=Time
+FILE_API_LIST_VIEW_API=File API
 FILE_API_LIST_VIEW_PARAMETER=Parameter
-FILE_API_LIST_VIEW_RETURN=Return value
 FILE_API_LIST_VIEW_THREAD_ID=Thread ID
-FILE_API_LIST_VIEW_TIME=Time
-FILE_API_LIST_VIEW_TITLE=File API List
+FILE_API_LIST_VIEW_RETURN=Return value
 FILE_API_LIST_VIEW_ERRNO=Error code
 
 FILE_CHART_CHART=Chart
index 6a362ad..b11dbc1 100644 (file)
@@ -24,7 +24,7 @@ import org.eclipse.osgi.util.NLS;
 public class SummaryLabels extends NLS {
        private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.SummaryLabels"; //$NON-NLS-1$
 
-       public static String FAILED_API_LIST_VIEW_FAILED_API_LIST;
+       public static String FAILED_API_LIST_VIEW_TITLE;
        public static String FAILED_API_LIST_VIEW_INDEX;
        public static String FAILED_API_LIST_VIEW_NAME;
        public static String FAILED_API_LIST_VIEW_PARAMETER;
@@ -36,6 +36,7 @@ public class SummaryLabels extends NLS {
        public static String FUNCTION_USAGE_PROFILER_APPLICATION;
        public static String FUNCTION_USAGE_PROFILER_DEPENDENT_LIB;
 
+       public static String FUNCTION_USER_PROFILING_VIEW_TITLE;
        public static String FUNCTION_USER_PROFILING_VIEW_CALL_COUNT;
        public static String FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_RATE;
        public static String FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_TIME;
@@ -44,7 +45,6 @@ public class SummaryLabels extends NLS {
        public static String FUNCTION_USER_PROFILING_VIEW_NAME;
        public static String FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_ELASPED_TIME;
        public static String FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_ELASPED_TIME;
-       public static String FUNCTION_USER_PROFILING_VIEW_TITLE;
 
        public static String WARNING_CASE_BRIEF_DUPLICATE;
        public static String WARNING_CASE_BRIEF_NO_OPERATION;
@@ -57,9 +57,9 @@ public class SummaryLabels extends NLS {
 
        public static String WARNING_CASE_PRE_FIX;
 
+       public static String WARNING_LIST_VIEW_TITLE;
        public static String WARNING_LIST_VIEW_CATEGORY;
        public static String WARNING_LIST_VIEW_INDEX;
-       public static String WARNING_LIST_VIEW_WARNING_LIST;
        public static String WARNING_LIST_VIEW_WARNING_MESSAGE;
        public static String WARNING_TABLE_FILE;
        public static String WARNING_TABLE_SOCKET;
@@ -72,9 +72,9 @@ public class SummaryLabels extends NLS {
        public static String LEAK_TABLE_MEMORY;
        public static String LEAK_TABLE_RESOURCE;
 
+       public static String LEAK_VIEW_TITLE;
        public static String LEAK_VIEW_FILE_PARAMETER;
        public static String LEAK_VIEW_INDEX;
-       public static String LEAK_VIEW_LEAK_VIEW;
        public static String LEAK_VIEW_NAME;
        public static String LEAK_VIEW_RETURN;
        public static String LEAK_VIEW_TIME;
index 8a28a81..1bd5fd1 100644 (file)
@@ -1,4 +1,4 @@
-FAILED_API_LIST_VIEW_FAILED_API_LIST=Failed APIs
+FAILED_API_LIST_VIEW_TITLE=Failed APIs
 FAILED_API_LIST_VIEW_INDEX=\#
 FAILED_API_LIST_VIEW_NAME=Name
 FAILED_API_LIST_VIEW_PARAMETER=Parameter
@@ -9,6 +9,8 @@ FAILED_API_LIST_VIEW_ERROR_DESCRIPTION=Error description
 
 FUNCTION_USAGE_PROFILER_APPLICATION=Application
 FUNCTION_USAGE_PROFILER_DEPENDENT_LIB=Dependent library
+
+FUNCTION_USER_PROFILING_VIEW_TITLE=Function Usage Profiling
 FUNCTION_USER_PROFILING_VIEW_CALL_COUNT=Call count
 FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_RATE=Excl. CPU rate
 FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_TIME=Excl. CPU time
@@ -17,7 +19,7 @@ FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_TIME=Incl. CPU time
 FUNCTION_USER_PROFILING_VIEW_NAME=Library or function name
 FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_ELASPED_TIME=Excl. elapsed time
 FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_ELASPED_TIME=Incl. elapsed time
-FUNCTION_USER_PROFILING_VIEW_TITLE=Function Usage Profiling
+
 
 WARNING_CASE_BRIEF_DUPLICATE=Duplicate file open.
 WARNING_CASE_BRIEF_NO_OPERATION=File closed without changes.
@@ -30,9 +32,9 @@ WARNING_CASE_POST_FIX_UNUSED=> file opened and unused for more than a minute.
 
 WARNING_CASE_PRE_FIX=<
 
+WARNING_LIST_VIEW_TITLE=Warning List
 WARNING_LIST_VIEW_CATEGORY=Category
 WARNING_LIST_VIEW_INDEX=\#
-WARNING_LIST_VIEW_WARNING_LIST=Warning List
 WARNING_LIST_VIEW_WARNING_MESSAGE=Warning message
 WARNING_TABLE_FILE=File
 WARNING_TABLE_SOCKET=Socket
@@ -45,9 +47,9 @@ LEAK_TABLE_ETC=Other
 LEAK_TABLE_MEMORY=Memory
 LEAK_TABLE_RESOURCE=Resource
 
+LEAK_VIEW_TITLE=Leaks
 LEAK_VIEW_FILE_PARAMETER=File or parameter
 LEAK_VIEW_INDEX=\#
-LEAK_VIEW_LEAK_VIEW=Leaks
 LEAK_VIEW_NAME=API
 LEAK_VIEW_RETURN=Return value
 LEAK_VIEW_TIME=Time
index 9a3729d..ae5c724 100644 (file)
@@ -26,6 +26,8 @@
 
 package org.tizen.dynamicanalyzer.ui.file;
 
+import java.util.List;
+
 import org.eclipse.nebula.widgets.grid.Grid;
 import org.eclipse.nebula.widgets.grid.GridItem;
 import org.eclipse.swt.SWT;
@@ -47,12 +49,13 @@ public class FileApiListView extends DAView {
 
        public static final String ID = FileApiListView.class.getName();
        private String lastSelectionKey = null;
+       private boolean selected = false;
        int[] innerMaxWeight = { 0, 100 };
        int[] outerMaxWeight = { 100, 0 };
 
        private String[] columnNames = { FilePageLabels.FILE_API_LIST_VIEW_INDEX,
                        FilePageLabels.FILE_API_LIST_VIEW_TIME,
-                       FilePageLabels.FILE_API_LIST_VIEW_NAME,
+                       FilePageLabels.FILE_API_LIST_VIEW_API,
                        FilePageLabels.FILE_API_LIST_VIEW_PARAMETER,
                        FilePageLabels.FILE_API_LIST_VIEW_THREAD_ID,
                        FilePageLabels.FILE_API_LIST_VIEW_RETURN,
@@ -88,12 +91,12 @@ public class FileApiListView extends DAView {
                contents.setLayout(new FillLayout());
                tableComp = new FileApiListTable(contents, SWT.NONE, SWT.SINGLE
                                | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
-               tableComp.setTableName("File API List");
                tableComp.setComparator(new TableComparator());
                tableComp.setSortTypes(sortTypes);
                tableComp.setSourceColumns(sourceColumns);
                tableComp.setColumns(columnNames);
                tableComp.setColumnSize(columnSizes);
+               tableComp.setTableName(FilePageLabels.FILE_API_LIST_VIEW_TITLE);
        }
 
        @Override
@@ -105,11 +108,13 @@ public class FileApiListView extends DAView {
                DATableDataFormat tableData = (DATableDataFormat) item.getData();
                String key = tableData.getSelectionKey();
 
-               if (null != lastSelectionKey && !key.equals(lastSelectionKey)) {
+               if (null != lastSelectionKey && !key.equals(lastSelectionKey)
+                               && !selected) {
                        tableComp.clear();
                        lastSelectionKey = key;
                } else {
                        lastSelectionKey = key;
+                       selected = false;
                }
 
                tableComp.updateTable();
@@ -124,4 +129,42 @@ public class FileApiListView extends DAView {
        public void clear() {
                tableComp.getTable().removeAll();
        }
+
+       @Override
+       public void setSelection(List<String> data) {
+               if (null == data || data.isEmpty()) {
+                       return;
+               }
+
+               String seq = data.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX);
+
+               tableComp.updateTable();
+
+               Grid table = tableComp.getTable();
+               GridItem[] items = table.getItems();
+
+               int size = items.length;
+               for (int i = 0; i < size; i++) {
+                       DATableDataFormat tableData = (DATableDataFormat) items[i]
+                                       .getData();
+                       String tableKey = tableData.getSelectionKey();
+                       if (tableKey.equals(seq)) {
+                               table.setSelection(i);
+                               table.getVerticalBar().setSelection(
+                                               getScrollSelectionIndex(table, i));
+                       }
+               }
+               // TODO: why??
+               tableComp.updateTable();
+               selected = true;
+       }
+
+       private int getScrollSelectionIndex(Grid table, int selection) {
+               int size = table.getVerticalBar().getThumb() / 2;
+               int output = selection - size;
+
+               output = (output < 0) ? 0 : output;
+               System.out.println(output + "   size " + size);
+               return output;
+       }
 }
index b5db6a9..abcaa54 100644 (file)
@@ -28,6 +28,8 @@ package org.tizen.dynamicanalyzer.ui.file;
 
 import java.util.List;
 
+import org.eclipse.nebula.widgets.grid.Grid;
+import org.eclipse.nebula.widgets.grid.GridItem;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
@@ -41,12 +43,14 @@ import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.ui.file.chart.DAFileChart;
 import org.tizen.dynamicanalyzer.ui.file.chart.FileChartManager;
 import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
 
 public class FileChartView extends DAView {
 
        public static final String ID = FileChartView.class.getName();
 
-       private String[] columnNames = { FilePageLabels.FILE_CHART_FILE, FilePageLabels.FILE_CHART_CHART };
+       private String[] columnNames = { FilePageLabels.FILE_CHART_FILE,
+                       FilePageLabels.FILE_CHART_CHART };
        private int[] columnSizes = {
                        FileChartManager.FILE_CHART_FIRST_COLUMN_WIDTH,
                        FileChartManager.FILE_CHART_SECOND_COLUMN_WIDTH };
@@ -83,8 +87,8 @@ public class FileChartView extends DAView {
                        return;
                }
                List<List<String>> inputs = logs.getLogs();
-
-               FileChartManager.getInstance().makeData(inputs);
+               FileChartManager.getInstance().getLogListQueue().putLog(inputs);
+//              FileChartManager.getInstance().makeData(inputs);
        }
 
        @Override
@@ -96,4 +100,29 @@ public class FileChartView extends DAView {
        public Control getControl() {
                return treeComp;
        }
+
+       @Override
+       public void setSelection(List<String> data) {
+               if (null == data || data.isEmpty()) {
+                       return;
+               }
+
+               String filePath = data.get(LogCenterConstants.RESOURCE_FILE_PATH_INDEX);
+               Grid tree = ((DAFileChart) getControl()).getTree();
+               GridItem[] items = tree.getItems();
+
+               int size = items.length;
+               for (int i = 0; i < size; i++) {
+                       DATableDataFormat tableData = (DATableDataFormat) items[i]
+                                       .getData();
+                       FileChartItemData chartItem = (FileChartItemData) tableData
+                                       .getObject();
+                       String itemPath = chartItem.getPath();
+
+                       if (filePath.equals(itemPath)) {
+                               tree.setSelection(i);
+                               break;
+                       }
+               }
+       }
 }
index ceb3fd4..e355b0b 100644 (file)
@@ -325,6 +325,8 @@ public class DAFileChart extends Composite {
        }
 
        private void updateTree() {
+               selections = tree.getSelectionIndices();
+
                if (fileColumnWidth == 0) {
                        Rectangle rect = tree.getClientArea();
                        fileColumnWidth = rect.width
index 20e1be0..33fd680 100644 (file)
@@ -31,9 +31,11 @@ import java.util.HashMap;
 import java.util.List;
 
 import org.eclipse.swt.graphics.Color;
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.communicator.ResourceCommunicator;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
+import org.tizen.dynamicanalyzer.logparser.LogListQueue;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.ui.file.FileChartData;
 import org.tizen.dynamicanalyzer.ui.file.FileChartItemData;
@@ -45,7 +47,7 @@ import org.tizen.dynamicanalyzer.ui.timeline.chart.FileChart;
 import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 
-public class FileChartManager {
+public class FileChartManager implements Runnable {
 
        public final static int FILE_CHART_HEIGHT = 40;
        public final static int FILE_CHART_FIRST_COLUMN_WIDTH = 125;
@@ -58,6 +60,8 @@ public class FileChartManager {
 
        public static double chartPixel = DEFAULT_PIXEL;
        private static int scale = 1;
+       private LogListQueue logListQueue = null;
+       private Thread updateLogThread = null;
 
        private final int TYPE_OPEN = 1;
        private final int TYPE_CLOSE = 2;
@@ -85,6 +89,51 @@ public class FileChartManager {
                return instance;
        }
 
+       public LogListQueue getLogListQueue() {
+               if (null == logListQueue) {
+                       logListQueue = new LogListQueue();
+               }
+               return logListQueue;
+       }
+
+       public void startUpdateLogThread() {
+               if (null == updateLogThread || !updateLogThread.isAlive()) {
+                       updateLogThread = new Thread(null, new FileChartManager(),
+                                       AnalyzerConstants.FILE_CHART_MANAGER_THREAD);
+                       updateLogThread.start();
+               }
+       }
+
+       public void stopUpdateLogThread() {
+               if (null != updateLogThread && updateLogThread.isAlive()) {
+                       updateLogThread.interrupt();
+               }
+       }
+
+       /*** make file data thread ***/
+       @Override
+       public void run() {
+               LogListQueue logListQueue = getInstance().getLogListQueue();
+               while (true) {
+
+                       try {
+                               if (!logListQueue.isEmpty()) {
+                                       List<List<String>> logs = logListQueue.getFirst();
+                                       getInstance().makeData(logs);
+                               } else {
+                                       Thread.sleep(AnalyzerConstants.LOG_CHECK_INTERVAL);
+                               }
+                       } catch (InterruptedException e) {
+                               /** thread stop by interrupt */
+                               break;
+                       }
+               }
+
+               /* log for debug */
+               System.out.println("file manager thread end!!"); //$NON-NLS-1$
+
+       }
+
        public static Color getFileOpenStartColor() {
                if (ResourceCommunicator.isRunning()) {
                        return ColorResources.FILE_OPEN_START_RUN;
@@ -158,14 +207,14 @@ public class FileChartManager {
                return fileRegister;
        }
 
-       public HashMap<String, FileChartItemData> getFDRegister() {
+       private HashMap<String, FileChartItemData> getFDRegister() {
                if (null == fdRegister) {
                        fdRegister = new HashMap<String, FileChartItemData>();
                }
                return fdRegister;
        }
 
-       public void makeData(List<List<String>> inputs) {
+       private void makeData(List<List<String>> inputs) {
                int size = inputs.size();
                for (int i = 0; i < size; i++) {
                        List<String> input = inputs.get(i);
@@ -186,8 +235,7 @@ public class FileChartManager {
                                        .get(LogCenterConstants.RESOURCE_FILE_PATH_INDEX);
                        String fd = input.get(LogCenterConstants.RESOURCE_FDVALUE_INDEX);
                        String err = input.get(LogCenterConstants.ERROR_INDEX);
-                       //int errno = Integer.parseInt(err);
-                       Long errno = Long.parseLong( err );
+                       int errno = Integer.parseInt(err);
                        String name = input.get(LogCenterConstants.APINAME_INDEX);
 
                        // error check
index 333293b..591b2d0 100644 (file)
@@ -137,4 +137,9 @@ public class CallstackView extends DAView {
                return callstackTableComp;
        }
 
+       @Override
+       public void setSelection(List<String> data) {
+               updateView();
+       }
+
 }
index 34a041f..fc2ab4b 100644 (file)
@@ -151,4 +151,14 @@ public class DAPageComposite extends Composite implements ViewAction {
        public String getViewName() {
                return name;
        }
+
+       @Override
+       public void setSelection(List<String> data) {
+               int size = views.size();
+               for (int i = 0; i < size; i++) {
+                       if (null != views.get(i)) {
+                               views.get(i).setSelection(data);
+                       }
+               }
+       }
 }
index ebcfbbd..e7f5c04 100644 (file)
@@ -26,6 +26,8 @@
 
 package org.tizen.dynamicanalyzer.ui.page;
 
+import java.util.List;
+
 import org.eclipse.swt.widgets.Control;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
 import org.tizen.dynamicanalyzer.logparser.LogPackage;
@@ -46,4 +48,6 @@ public interface ViewAction {
        public void otherViewSelectionOccured();
        
        public String getViewName();
+       
+       public void setSelection(List<String> data);
 }
index 9c900dd..b02a583 100644 (file)
@@ -74,7 +74,7 @@ public class FailedApiListView extends DAView {
 
                ViewContainer viewContainer = new ViewContainer(this, true);
                viewContainer
-                               .setTitleText(SummaryLabels.FAILED_API_LIST_VIEW_FAILED_API_LIST);
+                               .setTitleText(SummaryLabels.FAILED_API_LIST_VIEW_TITLE);
                setMaxWeight(innerMaxWeight, outerMaxWeight);
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.WINDOW_BG_COLOR);
index 7496d1f..4f94f90 100644 (file)
@@ -29,17 +29,27 @@ package org.tizen.dynamicanalyzer.ui.summary.failed;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.nebula.widgets.grid.Grid;
 import org.eclipse.nebula.widgets.grid.GridItem;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Composite;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
 import org.tizen.dynamicanalyzer.error.ErrorCodeManager;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.model.TableInput;
+import org.tizen.dynamicanalyzer.ui.file.FilePage;
+import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
+import org.tizen.dynamicanalyzer.ui.thread.ThreadPage;
+import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
+import org.tizen.dynamicanalyzer.ui.userinterface.UserInterfacePage;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
+import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 import org.tizen.dynamicanalyzer.utils.Formatter;
 
 public class FailedApiTable extends DATableComposite {
@@ -48,7 +58,6 @@ public class FailedApiTable extends DATableComposite {
 
        public FailedApiTable(Composite parent, int style, int tableStyle) {
                super(parent, style, tableStyle);
-//             setComparator(new FailedApiComparator());
                table.addSelectionListener(new SelectionListener() {
 
                        @Override
@@ -65,6 +74,61 @@ public class FailedApiTable extends DATableComposite {
                        public void widgetDefaultSelected(SelectionEvent e) {
                        }
                });
+
+               table.addMouseListener(new MouseListener() {
+
+                       @Override
+                       public void mouseUp(MouseEvent e) {
+                               // TODO Auto-generated method stub
+
+                       }
+
+                       @Override
+                       public void mouseDown(MouseEvent e) {
+                               // TODO Auto-generated method stub
+
+                       }
+
+                       @Override
+                       public void mouseDoubleClick(MouseEvent e) {
+                               if (ToolbarArea.getInstance().getSourceViewToggleState()
+                                               || !(e.widget instanceof Grid)) {
+                                       return;
+                               }
+                               Grid grid = (Grid) e.widget;
+                               GridItem item = grid.getItem(new Point(e.x, e.y));
+                               if (null == item) {
+                                       return;
+                               }
+                               DATableDataFormat tableData = (DATableDataFormat) item
+                                               .getData();
+                               List<String> failedData = tableData.getData();
+                               String logId = failedData.get(LogCenterConstants.ID_INDEX);
+                               int id = Integer.parseInt(logId);
+                               String pageId = null;
+                               if (id == LogCenterConstants.LOG_RESOURCE) {
+                                       String fdType = failedData
+                                                       .get(LogCenterConstants.RESOURCE_FDTYPE_INDEX);
+                                       int type = Integer.parseInt(fdType);
+                                       if (type == LogCenterConstants.FD_TYPE_FILE) {
+                                               pageId = FilePage.ID;
+                                       } else {
+                                               // TODO: pageId = NetworkPage.ID;
+                                       }
+                               } else if (id == LogCenterConstants.LOG_THREAD) {
+                                       pageId = ThreadPage.ID;
+                               } else if (id == LogCenterConstants.LOG_CONTROL) {
+                                       pageId = UserInterfacePage.ID;
+                               } else {
+                                       return;
+                               }
+
+                               AnalyzerUtil.changePage(pageId);
+                               DAPageComposite page = (DAPageComposite) AnalyzerUtil
+                                               .getTabPage(pageId);
+                               page.setSelection(failedData);
+                       }
+               });
        }
 
        protected List<TableInput> makeTableInput() {
index 0bb9448..c35ef83 100644 (file)
@@ -30,29 +30,38 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 
+import org.eclipse.nebula.widgets.grid.Grid;
 import org.eclipse.nebula.widgets.grid.GridItem;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.MouseEvent;
 import org.eclipse.swt.events.MouseListener;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
+import org.tizen.dynamicanalyzer.model.LogCenter;
 import org.tizen.dynamicanalyzer.model.TreeInput;
 import org.tizen.dynamicanalyzer.nl.SummaryLabels;
+import org.tizen.dynamicanalyzer.sql.SqlManager;
+import org.tizen.dynamicanalyzer.ui.file.FilePage;
+import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
+import org.tizen.dynamicanalyzer.ui.thread.ThreadPage;
+import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
+import org.tizen.dynamicanalyzer.ui.userinterface.UserInterfacePage;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite;
+import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 import org.tizen.dynamicanalyzer.utils.Formatter;
 
 public class LeakTable extends DATreeComposite {
 
        public LeakTable(Composite parent, int compStyle, int tableStyle) {
                super(parent, compStyle, tableStyle);
-//             setSelValueIndex(LeakData.LEAK_SEQ_INDEX);
 
                tree.addListener(SWT.Expand, new Listener() {
 
@@ -104,21 +113,78 @@ public class LeakTable extends DATreeComposite {
 
                        @Override
                        public void mouseDoubleClick(MouseEvent e) {
-                               GridItem[] items = (GridItem[]) tree.getSelection();
-                               if (null == items || items.length == 0) {
+
+                               if (ToolbarArea.getInstance().getSourceViewToggleState()
+                                               || !(e.widget instanceof Grid)) {
+                                       return;
+                               }
+                               Grid grid = (Grid) e.widget;
+                               GridItem item = grid.getItem(new Point(e.x, e.y));
+                               if (null == item) {
                                        return;
                                }
-                               GridItem item = items[0];
-                               if (item.isExpanded()) {
-                                       setExpand(item, false);
+                               DATableDataFormat tableData = (DATableDataFormat) item
+                                               .getData();
+                               List<String> data = tableData.getData();
+                               String logId = data.get(LeakData.ID_INDEX);
+                               String seq = data.get(LeakData.SEQUENCE_INDEX);
+                               int id = Integer.parseInt(logId);
+
+                               List<String> logData = getLogData(id, seq);
+                               if (null == logData || logData.isEmpty()) {
+                                       return;
+                               } else {
+                                       logData.remove(0);
+                               }
+
+                               String pageId = null;
+                               if (id == LogCenterConstants.LOG_RESOURCE) {
+                                       String fdType = logData
+                                                       .get(LogCenterConstants.RESOURCE_FDTYPE_INDEX);
+                                       int type = Integer.parseInt(fdType);
+                                       if (type == LogCenterConstants.FD_TYPE_FILE) {
+                                               pageId = FilePage.ID;
+                                       } else {
+                                               // TODO: pageId = NetworkPage.ID;
+                                       }
+                               } else if (id == LogCenterConstants.LOG_THREAD) {
+                                       pageId = ThreadPage.ID;
+                               } else if (id == LogCenterConstants.LOG_CONTROL) {
+                                       pageId = UserInterfacePage.ID;
                                } else {
-                                       setExpand(item, true);
+                                       return;
                                }
-                               updateTree();
+
+                               AnalyzerUtil.changePage(pageId);
+                               DAPageComposite page = (DAPageComposite) AnalyzerUtil
+                                               .getTabPage(pageId);
+                               page.setSelection(logData);
+
+                               /* for double click extension */
+                               // GridItem[] items = (GridItem[]) tree.getSelection();
+                               // if (null == items || items.length == 0) {
+                               // return;
+                               // }
+                               // GridItem item = items[0];
+                               // if (item.isExpanded()) {
+                               // setExpand(item, false);
+                               // } else {
+                               // setExpand(item, true);
+                               // }
+                               // updateTree();
                        }
                });
        }
 
+       private List<String> getLogData(int logCenterId, String seq) {
+               LogCenter logc = AnalyzerManager.getLogCenterById(logCenterId);
+               String dbName = logc.getName();
+
+               String query = "select * from " + dbName + " where seqnumber =" + seq
+                               + " ;";
+               return SqlManager.executeSelectQuery(query, logc);
+       }
+
        // !! recursive!!
        public void makeChildTree(List<LeakData> children, TreeInput parent,
                        String parentName) {
index fc1ff4e..13d9c1a 100644 (file)
@@ -68,7 +68,7 @@ public class LeakView extends DAView {
                this.setLayout(new FillLayout());
 
                ViewContainer viewContainer = new ViewContainer(this, true);
-               viewContainer.setTitleText(SummaryLabels.LEAK_VIEW_LEAK_VIEW);
+               viewContainer.setTitleText(SummaryLabels.LEAK_VIEW_TITLE);
                setMaxWeight(innerMaxWeight, outerMaxWeight);
 
                Composite contents = viewContainer.getContentArea();
@@ -85,6 +85,7 @@ public class LeakView extends DAView {
                treeComp.setColumns(columnNames);
                treeComp.setColumnSize(columnSizes);
                treeComp.setColumnVisibility(columnVisibility);
+               treeComp.setTableName(SummaryLabels.LEAK_VIEW_TITLE);
        }
 
        @Override
index c3d0575..47961ec 100644 (file)
@@ -88,6 +88,7 @@ public class FunctionUsageProfilingView extends DAView {
                treeComp.setColumnSize(columnSizes);
                treeComp.setColumnVisibility(columnVisibility);
                treeComp.setTableToolTipEnable(false);
+               treeComp.setTableName(SummaryLabels.FUNCTION_USER_PROFILING_VIEW_TITLE);
        }
 
        @Override
index 06fa3fd..a8a2a8f 100644 (file)
@@ -63,7 +63,7 @@ public class WarningListView extends DAView {
 
                ViewContainer viewContainer = new ViewContainer(this, true);
                viewContainer
-                               .setTitleText(SummaryLabels.WARNING_LIST_VIEW_WARNING_LIST);
+                               .setTitleText(SummaryLabels.WARNING_LIST_VIEW_TITLE);
                setMaxWeight(innerMaxWeight, outerMaxWeight);
 
                Composite contents = viewContainer.getContentArea();
@@ -71,12 +71,12 @@ public class WarningListView extends DAView {
                contents.setLayout(new FillLayout());
                tableComp = new WarningTable(contents, SWT.NONE, SWT.SINGLE
                                | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
-               tableComp.setTableName("Warning List");
                tableComp.setComparator(new TableComparator());
                tableComp.setSortTypes(sortTypes);
                tableComp.setSourceColumns(sourceColumns);
                tableComp.setColumns(columnNames);
                tableComp.setColumnSize(columnSizes);
+               tableComp.setTableName(SummaryLabels.WARNING_LIST_VIEW_TITLE);
        }
 
        @Override
index e2bfd00..01fb93f 100644 (file)
@@ -29,17 +29,27 @@ package org.tizen.dynamicanalyzer.ui.summary.warning;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.nebula.widgets.grid.Grid;
 import org.eclipse.nebula.widgets.grid.GridItem;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Composite;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.model.TableInput;
 import org.tizen.dynamicanalyzer.nl.SummaryLabels;
+import org.tizen.dynamicanalyzer.ui.file.FilePage;
+import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
+import org.tizen.dynamicanalyzer.ui.thread.ThreadPage;
+import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
+import org.tizen.dynamicanalyzer.ui.userinterface.UserInterfacePage;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
+import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 
 public class WarningTable extends DATableComposite {
 
@@ -63,6 +73,61 @@ public class WarningTable extends DATableComposite {
 
                        }
                });
+               
+               table.addMouseListener(new MouseListener() {
+
+                       @Override
+                       public void mouseUp(MouseEvent e) {
+                               // TODO Auto-generated method stub
+
+                       }
+
+                       @Override
+                       public void mouseDown(MouseEvent e) {
+                               // TODO Auto-generated method stub
+
+                       }
+
+                       @Override
+                       public void mouseDoubleClick(MouseEvent e) {
+                               if (ToolbarArea.getInstance().getSourceViewToggleState()
+                                               || !(e.widget instanceof Grid)) {
+                                       return;
+                               }
+                               Grid grid = (Grid) e.widget;
+                               GridItem item = grid.getItem(new Point(e.x, e.y));
+                               if (null == item) {
+                                       return;
+                               }
+                               DATableDataFormat tableData = (DATableDataFormat) item
+                                               .getData();
+                               List<String> data = tableData.getData();
+                               String logId = data.get(LogCenterConstants.ID_INDEX);
+                               int id = Integer.parseInt(logId);
+                               String pageId = null;
+                               if (id == LogCenterConstants.LOG_RESOURCE) {
+                                       String fdType = data
+                                                       .get(LogCenterConstants.RESOURCE_FDTYPE_INDEX);
+                                       int type = Integer.parseInt(fdType);
+                                       if (type == LogCenterConstants.FD_TYPE_FILE) {
+                                               pageId = FilePage.ID;
+                                       } else {
+                                               // TODO: pageId = NetworkPage.ID;
+                                       }
+                               } else if (id == LogCenterConstants.LOG_THREAD) {
+                                       pageId = ThreadPage.ID;
+                               } else if (id == LogCenterConstants.LOG_CONTROL) {
+                                       pageId = UserInterfacePage.ID;
+                               } else {
+                                       return;
+                               }
+
+                               AnalyzerUtil.changePage(pageId);
+                               DAPageComposite page = (DAPageComposite) AnalyzerUtil
+                                               .getTabPage(pageId);
+                               page.setSelection(data);
+                       }
+               });
        }
 
        protected List<TableInput> makeTableInput() {
index 0ed3968..a219e9b 100644 (file)
@@ -33,6 +33,8 @@ import org.eclipse.nebula.widgets.grid.Grid;
 import org.eclipse.nebula.widgets.grid.GridColumn;
 import org.eclipse.nebula.widgets.grid.GridItem;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.events.PaintEvent;
 import org.eclipse.swt.events.PaintListener;
 import org.eclipse.swt.events.SelectionEvent;
@@ -61,6 +63,8 @@ import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 
 public class OpenTraceDialog extends DAMessageBox {
+       private static boolean opened = false;
+
        private Grid saveTable = null;
        private Grid tempTable = null;
        private Grid selectedTable = null;
@@ -72,10 +76,24 @@ public class OpenTraceDialog extends DAMessageBox {
        }
 
        protected int run() {
+               if (opened) {
+                       result = -1;
+                       return result;
+               }
                shell.setLayout(new FormLayout());
                shell.setSize(400, 410);
                shell.setText(AnalyzerLabels.OPEN_TRACE);
 
+               shell.addDisposeListener(new DisposeListener() {
+
+                       @Override
+                       public void widgetDisposed(DisposeEvent e) {
+                               // TODO Auto-generated method stub
+                               System.out.println("shell disposed!");
+                               opened = false;
+                       }
+               });
+
                Composite tableComp = new Composite(shell, SWT.NONE);
                tableComp.setLayout(new FormLayout());
                FormData data = new FormData();
@@ -209,7 +227,8 @@ public class OpenTraceDialog extends DAMessageBox {
                okButton.setFont(FontResources.DIALOG_BUTTON_FONT);
                FormData okData = new FormData();
                okData.top = new FormAttachment(0, 7);
-               okData.left = new FormAttachment(50, -(DesignConstants.DA_BUTTON_WIDTH + 4));
+               okData.left = new FormAttachment(50,
+                               -(DesignConstants.DA_BUTTON_WIDTH + 4));
                okData.width = DesignConstants.DA_BUTTON_WIDTH;
                okData.height = DesignConstants.DA_BUTTON_HEIGHT;
                okButton.setLayoutData(okData);
@@ -225,6 +244,7 @@ public class OpenTraceDialog extends DAMessageBox {
                cancelData.height = DesignConstants.DA_BUTTON_HEIGHT;
                cancelButton.setLayoutData(cancelData);
 
+               opened = true;
                return result;
        }
 
@@ -240,8 +260,8 @@ public class OpenTraceDialog extends DAMessageBox {
                                GridItem selection = selections[0];
                                String openPath = null;
                                if ((Integer) selection.getData() == 1) {
-                                       openPath = AnalyzerPaths.TEMP_FOLDER_PATH
-                                                       + File.separator + selection.getText();
+                                       openPath = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator
+                                                       + selection.getText();
                                } else {
                                        openPath = AnalyzerPaths.DYNAMIC_ANALYZER_SAVE_PATH
                                                        + File.separator + selection.getText();
index 008f36e..d86a99b 100644 (file)
@@ -35,6 +35,7 @@ import org.tizen.dynamicanalyzer.handlers.StopHandler;
 import org.tizen.dynamicanalyzer.logparser.LogParser;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
+import org.tizen.dynamicanalyzer.ui.file.chart.FileChartManager;
 import org.tizen.dynamicanalyzer.ui.info.range.StateManager;
 import org.tizen.dynamicanalyzer.uirecorder.UIRecorderTool;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
@@ -111,6 +112,7 @@ public class RecordStartStopThread implements Runnable {
                ResourceCommunicator.sendStartMessage();
                ToolbarArea.getInstance().startTimer();
                LogParser.startLogParser();
+               FileChartManager.getInstance().startUpdateLogThread();
 
                /* Timeline */
                UpdateViewTimer.start();
index d008eb3..a2d1af8 100755 (executable)
@@ -373,8 +373,6 @@ public class ToolbarArea {
                                                OpenTraceDialog dialog = new OpenTraceDialog(shell);
                                                dialog.open();
                                                System.out.println("open trace"); //$NON-NLS-1$
-                                               button.setEnabled(false);
-                                               button.setEnabled(true);
                                        }
                                });
 
@@ -420,9 +418,10 @@ public class ToolbarArea {
                                        public void handleClickEvent(DACustomButton button) {
 
                                                String[] testLogs = {
-                                                               "5|7`,1002`,snapshot1`,5997316521`,5383`,5383`,testLog, 1, 0`,17`,0`,0`,1`",
-                                                               "5|7`,1003`,snapshot2`,5997316521`,5383`,5383`,testLog, 1, 0`,17`,0`,0`,1`"};
-
+                                                               "5|8`,3601`,snapshot1`,1076601`,5478`,5478`,testLog1`, 1`, 0`,17`,0`,0`,Scene Name1`, Form Name1`, 4545`, Panel Name1`, 454, 12",
+                                                               "5|8`,3602`,snapshot2`,1076602`,5479`,5479`,testLog2`, 1`, 0`,17`,0`,0`,Scene Name2`, Form Name2`, 4546`, Panel Name2`, 455`, 13"};
+//                                                             "5|7`,1002`,snapshot1`,5997316521`,5383`,5383`,testLog, 1, 0`,17`,0`,0`,1`",
+//                                                             "5|7`,1003`,snapshot2`,5997316521`,5383`,5383`,testLog, 1, 0`,17`,0`,0`,1`"};
                                                for (int i = 0; i < testLogs.length; i++) {
                                                        MessageProcess.getInstance().processMessage(
                                                                        testLogs[i]);
index 82cf098..1ef9a70 100644 (file)
@@ -73,7 +73,7 @@ public class UserInterfacePage extends DAPageComposite {
                        tabView.addView(currentView);
                }
 
-               upperForm.setWeights(new int[] { 40, 35, 25 });
+               upperForm.setWeights(new int[] { 37, 40, 23 });
                
                bottomForm = new SashForm(baseForm, SWT.HORIZONTAL);
                UserInterfaceFunctionProfilingView bottomLeftFirst = new UserInterfaceFunctionProfilingView(bottomForm, SWT.NONE);
index 52bbe98..8757b0f 100644 (file)
@@ -103,7 +103,7 @@ public class UserInterfacePageDataManager {
        
        public void setSceneTransformDataTFromLogPackage(LogPackage logPack) {
 
-               Logs logs = logPack.getLogs(LogCenterConstants.LOG_UI_SCENE);
+               Logs logs = logPack.getLogs(LogCenterConstants.LOG_SCENE);
                if (null == logs || logs.getLogs().size() == 0) {
                        return ;
                }
@@ -121,7 +121,7 @@ public class UserInterfacePageDataManager {
        
        public void setControlDataTFromLogPackage(LogPackage logPack) {
 
-               Logs logs = logPack.getLogs(LogCenterConstants.LOG_UI_CONTROL);
+               Logs logs = logPack.getLogs(LogCenterConstants.LOG_CONTROL);
                if (null == logs || logs.getLogs().size() == 0) {
                        return ;
                }
index 75bc99b..2117fd8 100644 (file)
@@ -26,7 +26,6 @@
 
 package org.tizen.dynamicanalyzer.ui.userinterface.profiling;
 
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
@@ -39,12 +38,14 @@ import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
 
 public class UserInterfaceFunctionProfilingView extends DAView {
 
-       public static final String ID = UserInterfaceFunctionProfilingView.class.getName();
+       public static final String ID = UserInterfaceFunctionProfilingView.class
+                       .getName();
 
-       int[] innerMaxWeight = { 100, 0 };
+       int[] innerMaxWeight = { 100 };
        int[] outerMaxWeight = { 0, 100 };
-       
-       private String[] columnNames = { UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_0,
+
+       private String[] columnNames = {
+                       UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_0,
                        UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_1,
                        UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_2,
                        UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_3,
@@ -52,42 +53,43 @@ public class UserInterfaceFunctionProfilingView extends DAView {
                        UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_5,
                        UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_6,
                        UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_7,
-                       UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_8
-                       };
+                       UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_8 };
        private int[] columnSizes = { 280, 85, 85, 85, 85, 85, 85, 85, 85 };
        UserInterfaceFunctionProfilingTable treeComp = null;
-       private boolean[] columnVisibility = { true, true, true, true, true, true, true, true, true };
+       private boolean[] columnVisibility = { true, true, true, true, true, true,
+                       true, true, true };
        int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NONE,
-                       AnalyzerConstants.SORT_TYPE_NUM,
                        AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
                        AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
                        AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
-                       AnalyzerConstants.SORT_TYPE_NUM};
-       int[] sourceColumns = { UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_API_NAME
-                       ,UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_EXCL_CPU_TIME
-                       ,UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_INCL_CPU_TIME
-                       ,UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_INCL_ESAPSED_TIME 
-                       ,UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_EXCL_ESAPSED_TIME
-                       ,UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_EXCL_CPU_AVG_TIME
-                       ,UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_INCL_CPU_AVG_TIME
-                       ,UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_INCL_ESAPSED_AVG_TIME
-                       ,UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_EXCL_ESAPSED_AVG_TIME
-                       };
-       
+                       AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM };
+       int[] sourceColumns = {
+                       UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_API_NAME,
+                       UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_EXCL_CPU_TIME,
+                       UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_INCL_CPU_TIME,
+                       UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_INCL_ESAPSED_TIME,
+                       UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_EXCL_ESAPSED_TIME,
+                       UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_EXCL_CPU_AVG_TIME,
+                       UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_INCL_CPU_AVG_TIME,
+                       UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_INCL_ESAPSED_AVG_TIME,
+                       UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_EXCL_ESAPSED_AVG_TIME };
+
        public UserInterfaceFunctionProfilingView(Composite parent, int style) {
                super(parent, style);
                this.setLayout(new FillLayout());
 
                ViewContainer viewContainer = new ViewContainer(this, true);
-               viewContainer.setTitleText(UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME);
-               
+               viewContainer
+                               .setTitleText(UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME);
+
                setMaxWeight(innerMaxWeight, outerMaxWeight);
-               
+
                Composite contents = viewContainer.getContentArea();
                contents.setBackground(ColorResources.WINDOW_BG_COLOR);
                contents.setLayout(new FillLayout());
-               treeComp = new UserInterfaceFunctionProfilingTable(contents, SWT.NONE, SWT.SINGLE
-                               | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
+               treeComp = new UserInterfaceFunctionProfilingTable(contents, SWT.NONE,
+                               SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL
+                                               | SWT.V_SCROLL);
                /*** setTree set first!!! ***/
                treeComp.setTableName(UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME);
                treeComp.setTree(true);
index 120cbb9..77d15e4 100644 (file)
@@ -44,12 +44,13 @@ public class DAMessageBox {
 
        public int open() {
                block = true;
-               run();
-               shell.open();
-               if (block) {
-                       runEventLoop(shell);
+               result = run();
+               if (result >= 0) {
+                       shell.open();
+                       if (block) {
+                               runEventLoop(shell);
+                       }
                }
-
                shell.dispose();
                return result;
        }
index 7ea4459..5923cbe 100644 (file)
@@ -100,7 +100,7 @@ public class DATabComposite extends DAView {
                }
 
                String ID = child.getClass().getName();
-               String title = ((ViewAction)child).getViewName();
+               String title = ((ViewAction) child).getViewName();
 
                final DACustomButton tabButton = new DACustomButton(tabComposite,
                                ColorResources.TAB_NORMAL_COLOR_START,
@@ -289,4 +289,13 @@ public class DATabComposite extends DAView {
        public Composite getTab(String ID) {
                return childrenMap.get(ID);
        }
+
+       @Override
+       public void setSelection(List<String> data) {
+               int size = getTabChildren().size();
+               for (int i = 0; i < size; i++) {
+                       ((ViewAction) getTabChildren().get(i)).setSelection(data);
+               }
+       }
+
 }
index 4443d0f..5f618fd 100644 (file)
@@ -228,6 +228,20 @@ public class FindDialog extends DAMessageBox {
 
                @Override
                public void keyReleased(KeyEvent e) {
+                       // if (null != textBox.getText() && !textBox.getText().isEmpty()) {
+                       // findButton.setEnabled(true);
+                       //
+                       // if (e.keyCode == ENTER_KEY_CODE) {
+                       // findProperty.setLastSearch(textBox.getText());
+                       // executeFindCommand();
+                       // }
+                       // } else {
+                       // findButton.setEnabled(false);
+                       // }
+               }
+
+               @Override
+               public void keyPressed(KeyEvent e) {
                        if (null != textBox.getText() && !textBox.getText().isEmpty()) {
                                findButton.setEnabled(true);
 
@@ -239,11 +253,6 @@ public class FindDialog extends DAMessageBox {
                                findButton.setEnabled(false);
                        }
                }
-
-               @Override
-               public void keyPressed(KeyEvent e) {
-
-               }
        };
 
        private DACustomButtonClickEventListener forwardButtonListener = new DACustomButtonClickEventListener() {
index 782218d..4e53004 100644 (file)
@@ -275,6 +275,9 @@ public abstract class DATableComposite extends Composite {
                table.removeAll();
 
                List<TableInput> input = makeTableInput();
+               if (null == input) {
+                       return;
+               }
                if (null != comparator) {
                        Collections.sort(input, comparator);
                }
@@ -314,6 +317,7 @@ public abstract class DATableComposite extends Composite {
                                table.setFocusItem(table.getItem(focusIndex));
                        }
                }
+               table.update();
        }
 
        protected abstract List<TableInput> makeTableInput();