[Title] page tab changed, table tooltip refactoring
authorLee <jy.exe.lee@samsung.com>
Wed, 14 Nov 2012 02:29:23 +0000 (11:29 +0900)
committerLee <jy.exe.lee@samsung.com>
Wed, 14 Nov 2012 02:29:23 +0000 (11:29 +0900)
[Desc.] main tab refactoring  and table tooltip key changed
[Issue] redmine #7429, #7015

46 files changed:
org.tizen.dynamicanalyzer/plugin.xml
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StartHandler.java [new file with mode: 0644]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StopHandler.java [new file with mode: 0644]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/TableTooltipListener.java
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/ui/file/FileApiListTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FilePage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallstackView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/RangeView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/StateManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/SnapshotView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/AbstractEffectFrame.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/BaseView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/DAEffectFrame.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/SummaryPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfilingTableCellRenderer.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfilingView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningDetailView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadAPIListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/DATimelineTabComposite.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/TimelinePage.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/toolbar/OpenTraceInputReader.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/UserInterfaceFormBasedLeakListView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/UserInterfacePage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/UserInterfaceSceneTransformListView.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
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/table/DATreeComposite.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/table/DAWindowingTableComposite.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/table/WindowingTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/utils/AnalyzerUtil.java

index 7c0f795..a27e84e 100644 (file)
       </category>
       <command
             categoryId="org.tizen.dynamicanalyzer.commands"
-            id="org.tizen.dynamicanalyzer.handlers.StartStopTraceHandler"
-            name="%StartStopTrace">
-      </command>
-      <command
-            categoryId="org.tizen.dynamicanalyzer.commands"
             id="org.tizen.dynamicanalyzer.handlers.SaveTraceHandler"
             name="%SaveTrace">
       </command>
       </command>
       <command
             categoryId="org.tizen.dynamicanalyzer.commands"
-            id="org.tizen.dynamicanalyzer.handlers.BatteryPerspectiveHandler"
-            name="%Battery">
-      </command>
-      <command
-            categoryId="org.tizen.dynamicanalyzer.commands"
-            id="org.tizen.dynamicanalyzer.views.hold.TestInputHandler"
-            name="testInput">
-      </command>
-      <command
-            categoryId="org.tizen.dynamicanalyzer.commands"
             id="org.tizen.dynamicanalyzer.handlers.ExitHandler"
             name="%Exit">
       </command>
             name="%OpenTraceComplete">
       </command>
       <command
+            categoryId="org.tizen.dynamicanalyzer.commands"
             id="org.tizen.dynamicanalyzer.handlers.ClearHandler"
             name="%Clear">
       </command>
+      <command
+            categoryId="org.tizen.dynamicanalyzer.commands"
+            id="org.tizen.dynamicanalyzer.handlers.StopHandler"
+            name="Stop">
+      </command>
+      <command
+            categoryId="org.tizen.dynamicanalyzer.commands"
+            id="org.tizen.dynamicanalyzer.handlers.StartHandler"
+            name="Start">
+      </command>
    </extension>
    <extension
          point="org.eclipse.ui.handlers">
             class="org.tizen.dynamicanalyzer.handlers.ClearHandler"
             commandId="org.tizen.dynamicanalyzer.handlers.ClearHandler">
       </handler>
+      <handler
+            class="org.tizen.dynamicanalyzer.handlers.StartHandler"
+            commandId="org.tizen.dynamicanalyzer.handlers.StartHandler">
+      </handler>
+      <handler
+            class="org.tizen.dynamicanalyzer.handlers.StopHandler"
+            commandId="org.tizen.dynamicanalyzer.handlers.StopHandler">
+      </handler>
    </extension>
    <extension
          point="org.eclipse.ui.perspectiveExtensions">
index 4bbb31f..a917fe5 100755 (executable)
@@ -34,6 +34,7 @@ import java.util.HashMap;
 import java.util.List;
 
 import org.tizen.dynamicanalyzer.handlers.ClearHandler;
+import org.tizen.dynamicanalyzer.handlers.StartHandler;
 import org.tizen.dynamicanalyzer.model.BaseLogCenter;
 import org.tizen.dynamicanalyzer.model.ImageInfo;
 import org.tizen.dynamicanalyzer.model.LeakCheckList;
@@ -401,6 +402,7 @@ public class AnalyzerManager {
                project.init();
                leakDetector = new LeakDetector();
 
+               AnalyzerUtil.executeCommand(StartHandler.ID);
                return true;
        }
 
@@ -434,16 +436,6 @@ public class AnalyzerManager {
                return null;
        }
 
-       public static DAPageComposite getCurrentPage() {
-               BaseView bv = (BaseView) AnalyzerUtil.getView(BaseView.ID);
-               return bv.getTopComposite();
-       }
-
-       public static List<DAPageComposite> getAllPage() {
-               BaseView bv = (BaseView) AnalyzerUtil.getView(BaseView.ID);
-               return bv.getMainView().getComposites();
-       }
-
        public static LeakCheckList getLeakCheckList() {
                String path = AnalyzerPaths.DYNAMIC_ANALYZER_INSTALL_PATH
                                + File.separator + AnalyzerConstants.XML_FOLDER_NAME;
@@ -487,4 +479,9 @@ public class AnalyzerManager {
        public static boolean isAppInfoArrived() {
                return appInfoArrived;
        }
+
+       public static DAPageComposite getCurrentPage() {
+               BaseView bv = (BaseView) AnalyzerUtil.getView(BaseView.ID);
+               return bv.getTopComposite();
+       }
 }
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StartHandler.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StartHandler.java
new file mode 100644 (file)
index 0000000..e4fbecc
--- /dev/null
@@ -0,0 +1,31 @@
+package org.tizen.dynamicanalyzer.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.nebula.widgets.grid.Grid;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
+import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakView;
+import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfilingView;
+
+public class StartHandler extends AbstractHandler {
+
+       public final static String ID = StartHandler.class.getName();
+       
+       @Override
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               System.out.println("start handler called!!");
+               
+//             FunctionUsageProfilingView view = (FunctionUsageProfilingView) AnalyzerManager
+//                             .getView(FunctionUsageProfilingView.ID);
+//             Grid tree = (Grid)view.getControl();
+//             tree.setSelectionEnabled(false);
+//             
+//             LeakView leakView = (LeakView) AnalyzerManager
+//                             .getView(FunctionUsageProfilingView.ID);
+//             Grid leakTree = (Grid)leakView.getControl();
+//             leakTree.setSelectionEnabled(false);
+               return null;
+       }
+
+}
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StopHandler.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StopHandler.java
new file mode 100644 (file)
index 0000000..daae03e
--- /dev/null
@@ -0,0 +1,29 @@
+package org.tizen.dynamicanalyzer.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.nebula.widgets.grid.Grid;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
+import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakView;
+import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfilingView;
+
+public class StopHandler extends AbstractHandler {
+
+       public final static String ID = StopHandler.class.getName();
+
+       @Override
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+//             FunctionUsageProfilingView view = (FunctionUsageProfilingView) AnalyzerManager
+//                             .getView(FunctionUsageProfilingView.ID);
+//             Grid tree = (Grid)view.getControl();
+//             tree.setSelectionEnabled(true);
+//             
+//             LeakView leakView = (LeakView) AnalyzerManager
+//                             .getView(FunctionUsageProfilingView.ID);
+//             Grid leakTree = (Grid)leakView.getControl();
+//             leakTree.setSelectionEnabled(true);
+               return null;
+       }
+
+}
index 7f01293..9beb891 100644 (file)
@@ -65,7 +65,7 @@ public class TableTooltipListener implements Listener {
        private Grid grid = null;\r
        private Shell tooltip;\r
        private Object oldItem;\r
-       private boolean sourceButtonToggle;\r
+       private boolean enabled = true;\r
 \r
        private static final int MARGIN = 5;\r
        private static final int SPACING = 0;\r
@@ -74,51 +74,50 @@ public class TableTooltipListener implements Listener {
        private static final int TOOLTIP_OFFSET = 5;\r
        private static final Cursor sourceCursor = new Cursor(null,\r
                        ImageResources.VIEW_SOURCE_CURSOR.getImageData(), 0, 0);\r
-       private static final Cursor defaultCursor = new Cursor(null,\r
-                       SWT.CURSOR_ARROW);\r
+       private static Cursor defaultCursor = null;\r
 \r
-       public TableTooltipListener(Grid table, boolean toggle) {\r
+       public TableTooltipListener(Grid table) {\r
                this.grid = table;\r
-               this.sourceButtonToggle = toggle;\r
+               defaultCursor = grid.getCursor();\r
        }\r
 \r
        public void handleEvent(Event event) {\r
                if (!ToolbarArea.getInstance().getSourceViewEnable()) {\r
                        return;\r
                }\r
+\r
+               int columnHeight = grid.getHeaderHeight();\r
+               boolean isHeader = false;\r
+               if (event.y < columnHeight) {\r
+                       isHeader = true;\r
+               }\r
+\r
+               boolean isToggled = ToolbarArea.getInstance()\r
+                               .getSourceViewToggleState();\r
+               if (enabled && !isHeader) {\r
+                       setViewCursor(isToggled);\r
+               }\r
+\r
                GridItem gridItem = null;\r
                switch (event.type) {\r
                case SWT.Dispose:\r
                        disposeTooltip();\r
                        break;\r
                case SWT.KeyDown:\r
-\r
-                       disposeTooltip();\r
-                       if (!sourceButtonToggle) {\r
-                               if (SWT.CTRL == event.keyCode) {\r
-                                       grid.setCursor(sourceCursor);\r
-                                       ToolbarArea.getInstance().setSourceViewState(true);\r
-                               }\r
-                       }\r
                        break;\r
                case SWT.KeyUp:\r
-                       if (!sourceButtonToggle) {\r
-                               if (SWT.CTRL == event.keyCode) {\r
-                                       grid.setCursor(defaultCursor);\r
-                                       ToolbarArea.getInstance().setSourceViewState(false);\r
+                       if (SWT.F2 == event.keyCode) {\r
+                               isToggled = !isToggled;\r
+                               if (enabled && !isHeader) {\r
+                                       setViewCursor(isToggled);\r
                                }\r
-\r
-                               disposeTooltip();\r
+                               ToolbarArea.getInstance().setSourceViewState(isToggled);\r
                        }\r
                        break;\r
                case SWT.MouseEnter:\r
-                       // grid.setFocus();\r
-                       if (sourceButtonToggle) {\r
+                       grid.setFocus();\r
+                       if (isToggled && enabled) {\r
                                createTooltip(event);\r
-                       } else {\r
-                               if (SWT.CTRL == event.stateMask) {\r
-                                       createTooltip(event);\r
-                               }\r
                        }\r
                        break;\r
                case SWT.MouseExit:\r
@@ -142,30 +141,34 @@ public class TableTooltipListener implements Listener {
                        }\r
                        break;\r
                case SWT.MouseDoubleClick:\r
-                       if (sourceButtonToggle) {\r
+                       if (isToggled && enabled) {\r
                                openIDE(event);\r
-                       } else {\r
-                               if (SWT.CTRL == event.stateMask) {\r
-                                       openIDE(event);\r
-                               }\r
                        }\r
                        break;\r
                case SWT.MouseHover:\r
                        grid.setFocus();\r
-                       if (sourceButtonToggle) {\r
+                       if (isToggled && enabled) {\r
                                createTooltip(event);\r
-                       } else {\r
-                               if (SWT.CTRL == event.stateMask) {\r
-                                       createTooltip(event);\r
-                               }\r
                        }\r
                        break;\r
-\r
                default:\r
                        break;\r
                }\r
        }\r
 \r
+       public void setEnable(boolean enabled) {\r
+               this.enabled = enabled;\r
+       }\r
+\r
+       private void setViewCursor(boolean toggled) {\r
+               if (!toggled) {\r
+                       grid.setCursor(defaultCursor);\r
+                       disposeTooltip();\r
+               } else {\r
+                       grid.setCursor(sourceCursor);\r
+               }\r
+       }\r
+\r
        private void createErrorPopup(String message) {\r
                Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell();\r
                DADialog warning = new DADialog(shell, SWT.NONE);\r
@@ -410,13 +413,4 @@ public class TableTooltipListener implements Listener {
                                Integer.toString(sl.getLineNumber()));\r
        }\r
 \r
-       public void setSourceButtonToggle(boolean toggle) {\r
-               this.sourceButtonToggle = toggle;\r
-               if (sourceButtonToggle) {\r
-                       grid.setCursor(sourceCursor);\r
-               } else {\r
-                       grid.setCursor(defaultCursor);\r
-               }\r
-       }\r
-\r
 }\r
index b3fc63d..0c509c3 100644 (file)
@@ -38,8 +38,9 @@ import org.tizen.dynamicanalyzer.model.LogCenter;
 import org.tizen.dynamicanalyzer.project.Project;
 import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackManager;
 import org.tizen.dynamicanalyzer.ui.info.range.StateManager;
-import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
+import org.tizen.dynamicanalyzer.ui.page.BaseView;
 import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
+import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 import org.tizen.dynamicanalyzer.utils.SymbolNameDemangler;
 
 public class LogParser implements Runnable {
@@ -219,11 +220,8 @@ public class LogParser implements Runnable {
                LogInserter.getInsertLogQueue().push(logPack);
                LogInserter.startInsertLogThread();
 
-               List<DAPageComposite> pages = AnalyzerManager.getAllPage();
-               int size = pages.size();
-               for (int i = 0; i < size; i++) {
-                       pages.get(i).updateLog(logPack);
-               }
+               BaseView bv = (BaseView) AnalyzerUtil.getView(BaseView.ID);
+               bv.getMainTab().updateLog(logPack);
        }
 
        private void setFuncName(String[] input) {
index 82e4586..8b0b58a 100644 (file)
@@ -32,8 +32,8 @@ import org.tizen.dynamicanalyzer.common.DASelectionData;
 import org.tizen.dynamicanalyzer.logparser.LogPackage;
 import org.tizen.dynamicanalyzer.ui.page.ViewAction;
 
-
 public class DAView extends Composite implements ViewAction {
+       protected String name = null;
 
        public DAView(Composite parent, int style) {
                super(parent, style);
@@ -59,12 +59,6 @@ public class DAView extends Composite implements ViewAction {
        }
 
        @Override
-       public void setSourceView(boolean enable) {
-               // TODO Auto-generated method stub
-
-       }
-
-       @Override
        public Control getControl() {
                // TODO Auto-generated method stub
                return null;
@@ -73,12 +67,16 @@ public class DAView extends Composite implements ViewAction {
        @Override
        public void updateView(DASelectionData data) {
                // TODO Auto-generated method stub
-               
+
        }
 
        @Override
        public void otherViewSelectionOccured() {
                // TODO Auto-generated method stub
-               
+
+       }
+       @Override
+       public String getViewName() {
+               return name;
        }
 }
index 45225df..3d1409a 100644 (file)
@@ -85,7 +85,7 @@ public class FileApiListTable extends DATableComposite {
 
        @Override
        public void updateTable() {
-               ViewAction va = AnalyzerManager.getCurrentPage().getViews()
+               ViewAction va = AnalyzerManager.getCurrentPage().getViewMap()
                                .get(FileChartView.ID);
                Grid fileChart = ((DAFileChart) va.getControl()).getTree();
                GridItem[] selectedItem = fileChart.getSelection();
index 0d868a6..67f1188 100644 (file)
@@ -31,7 +31,6 @@ import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
-import org.tizen.dynamicanalyzer.listeners.TableTooltipListener;
 import org.tizen.dynamicanalyzer.model.DAView;
 import org.tizen.dynamicanalyzer.nl.FilePageLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
@@ -67,14 +66,6 @@ public class FileApiListView extends DAView {
                                | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
                tableComp.setColumns(columnNames);
                tableComp.setColumnSize(columnSizes);
-
-               tableComp.setTableToolTipListener(new TableTooltipListener(tableComp
-                               .getTable(), false));
-       }
-
-       @Override
-       public void setSourceView(boolean enable) {
-               tableComp.setSourceView(enable);
        }
 
        @Override
index 2b5dbe3..46bd384 100644 (file)
@@ -33,14 +33,16 @@ import org.eclipse.swt.events.ControlListener;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
+import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.common.DesignConstants;
-import org.tizen.dynamicanalyzer.nl.InformationViewLabels;
+import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.ui.info.callstack.CallstackView;
 import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
 import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite;
 
-
 public class FilePage extends DAPageComposite {
+       public static final String ID = FilePage.class.getName();
+       public static final String TAB_ID = ID + CommonConstants.UNDERBAR + "tab";
 
        public final static int FILECHART_INDEX = 0;
        public final static int FILE_API_LIST_INDEX = 1;
@@ -58,6 +60,7 @@ public class FilePage extends DAPageComposite {
 
        public FilePage(Composite parent, int style) {
                super(parent, style);
+               name = AnalyzerLabels.COOLBAR_AREA_FILE;
                this.setLayout(new FillLayout());
 
                baseForm = new SashForm(this, SWT.HORIZONTAL);
@@ -77,12 +80,13 @@ public class FilePage extends DAPageComposite {
 
                rightForm = new SashForm(baseForm, SWT.VERTICAL);
                // INFO_VIEW_INDEX = 2;
-               DATabComposite tabView = new DATabComposite(rightForm, SWT.NONE);
+               DATabComposite tabView = new DATabComposite(rightForm, SWT.NONE, TAB_ID);
                addView(tabView);
                {
                        CallstackView callstack = new CallstackView(
                                        tabView.getContentComposite(), SWT.NONE);
-                       tabView.addView(callstack, InformationViewLabels.CALLSTACK_VIEW_TITLE);
+                       callstack.setObservingViews(new String[]{FileApiListView.ID});
+                       tabView.addView(callstack);
                }
 
                // FILE_DETAIL = 3;
index 297fb04..333293b 100644 (file)
 
 package org.tizen.dynamicanalyzer.ui.info.callstack;
 
+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;
 import org.eclipse.swt.widgets.Control;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
-import org.tizen.dynamicanalyzer.listeners.TableTooltipListener;
+import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.model.DAView;
 import org.tizen.dynamicanalyzer.nl.InformationViewLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.ui.page.ViewAction;
 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;
 
 public class CallstackView extends DAView {
        public static final String ID = CallstackView.class.getName();
+
        private DATableComposite callstackTableComp = null;
        private String[] columnNames = {
                        InformationViewLabels.CALLSTACK_VIEW_FUNCTION,
@@ -47,10 +56,12 @@ public class CallstackView extends DAView {
                        InformationViewLabels.CALLSTACK_VIEW_BINARY_PATH };
        private int[] columnSizes = { 120, 70, 400 };
        private boolean[] columnVisibility = { true, true, true };
+       private String[] observingViews = null;
        Composite contents = null;
 
        public CallstackView(Composite parent, int style) {
                super(parent, style);
+               name = InformationViewLabels.CALLSTACK_VIEW_TITLE;
                this.setLayout(new FillLayout());
                ViewContainer viewContainer = new ViewContainer(this, false);
                viewContainer.setTitleText(InformationViewLabels.CALLSTACK_VIEW_TITLE);
@@ -64,9 +75,51 @@ public class CallstackView extends DAView {
                callstackTableComp.setColumns(columnNames);
                callstackTableComp.setColumnSize(columnSizes);
                callstackTableComp.setColumnVisibility(columnVisibility);
+       }
+
+       public void setObservingViews(String[] viewIds) {
+               observingViews = viewIds;
+       }
 
-               callstackTableComp.setTableToolTipListener(new TableTooltipListener(
-                               callstackTableComp.getTable(), false));
+       public String[] getObservingViews() {
+               return observingViews;
+       }
+
+       @Override
+       public void updateView() {
+               if (null == observingViews) {
+                       return;
+               }
+               int size = observingViews.length;
+               for (int i = 0; i < size; i++) {
+                       ViewAction view = AnalyzerManager.getCurrentPage().getView(
+                                       observingViews[i]);
+                       Control control = view.getControl();
+                       Grid table = null;
+                       if (control instanceof DATableComposite) {
+                               table = ((DATableComposite) control).getTable();
+                       } else if (control instanceof DATreeComposite) {
+                               table = ((DATreeComposite) control).getTable();
+                       } else {
+                               continue;
+                       }
+                       if (table.getSelectionCount() > 0) {
+                               GridItem[] selection = table.getSelection();
+                               List<String> startData = ((DATableDataFormat) selection[0]
+                                               .getData()).getData();
+                               List<String> endData = ((DATableDataFormat) selection[selection.length - 1]
+                                               .getData()).getData();
+                               long startTime = Long.parseLong(startData
+                                               .get(LogCenterConstants.TIME_INDEX));
+                               long endTime = Long.parseLong(endData
+                                               .get(LogCenterConstants.TIME_INDEX));
+                               DASelectionData data = new DASelectionData(observingViews[i],
+                                               startTime, endTime, selection, table);
+                               updateView(data);
+                               return;
+                       }
+               }
+               clear();
        }
 
        @Override
@@ -84,8 +137,4 @@ public class CallstackView extends DAView {
                return callstackTableComp;
        }
 
-       @Override
-       public void setSourceView(boolean enable) {
-               callstackTableComp.setSourceView(enable);
-       }
 }
index 1045e89..59cf56c 100644 (file)
@@ -38,6 +38,8 @@ import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
 
 public class RangeView extends DAView {
 
+       public static final String ID = RangeView.class.getName();
+
        private DATableComposite tableComp = null;
        private String[] columnNames = { InformationViewLabels.RANGE_VIEW_NAME,
                        InformationViewLabels.RANGE_VIEW_START,
@@ -48,7 +50,6 @@ public class RangeView extends DAView {
        private int[] columnSizes = { 85, 60, 60, 60, 60, 60 };
        private boolean[] columnVisibility = { true, true, true, true, true, true };
 
-       public static final String ID = RangeView.class.getName();
        public static final int STATE_INIT = 0;
        public static final int STATE_RANGE = 1;
        public static final int STATE_NO_RANGE = 2;
@@ -57,7 +58,7 @@ public class RangeView extends DAView {
 
        public RangeView(Composite parent, int style) {
                super(parent, style);
-               // TODO Auto-generated constructor stub
+               name = InformationViewLabels.RANGE_VIEW_TITLE;
                this.setLayout(new FillLayout());
 
                ViewContainer viewContainer = new ViewContainer(this, false);
@@ -72,6 +73,7 @@ public class RangeView extends DAView {
                tableComp.setSelValueIndex(-1);
                tableComp.setColumnSize(columnSizes);
                tableComp.setColumnVisibility(columnVisibility);
+               tableComp.setTableToolTipEnable(false);
        }
 
        @Override
@@ -85,26 +87,17 @@ public class RangeView extends DAView {
 
        @Override
        public void clear() {
-               // TODO Auto-generated method stub
                lastTime = 0;
                tableComp.clear();
        }
 
        @Override
-       public void setSourceView(boolean enable) {
-               // TODO Auto-generated method stub
-
-       }
-
-       @Override
        public Control getControl() {
-               // TODO Auto-generated method stub
                return null;
        }
 
        @Override
        public void updateView(DASelectionData data) {
-               // TODO Auto-generated method stub
                tableComp.updateTable();
        }
 
index 00209c4..73fd27c 100644 (file)
@@ -27,6 +27,7 @@ package org.tizen.dynamicanalyzer.ui.info.range;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Shell;
+import org.tizen.dynamicanalyzer.ui.summary.SummaryPage;
 import org.tizen.dynamicanalyzer.ui.widgets.StopProgressDialog;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 
@@ -94,7 +95,7 @@ public class StateManager {
        public void stopTrace() {
                if (null != dialog) {
                        dialog.setProcessSelection(100);
-                       AnalyzerUtil.changePage(1);
+                       AnalyzerUtil.changePage(SummaryPage.ID);
                        dialog.close();
                        state = STOP_PROCESS_END;
                }
index 7b35136..c07c091 100644 (file)
@@ -58,7 +58,7 @@ import org.tizen.dynamicanalyzer.widgets.graph.circular.CircularGraph;
 public class SnapshotView extends DAView {
 
        public static final String ID = SnapshotView.class.getName();
-
+       
        Composite iconComp;
        ImageViewer snapshot;
        // CircularGraph cpuGrp;
@@ -107,6 +107,7 @@ public class SnapshotView extends DAView {
 
        public SnapshotView(Composite parent, int style, boolean title) {
                super(parent, style);
+               name = InformationViewLabels.SNAPSHOT_VIEW_TITLE;
                this.setLayout(new FillLayout());
 
                ViewContainer viewContainer = new ViewContainer(this, title);
index 64ae29b..26d1434 100644 (file)
 
 package org.tizen.dynamicanalyzer.ui.page;
 
+import java.util.HashMap;
+import java.util.List;
+
 import org.eclipse.nebula.effects.stw.Transition;
 import org.eclipse.nebula.effects.stw.TransitionListener;
 import org.eclipse.nebula.effects.stw.TransitionManager;
+import org.eclipse.nebula.effects.stw.Transitionable;
 import org.eclipse.nebula.effects.stw.transitions.CubicRotationTransition;
 import org.eclipse.nebula.effects.stw.transitions.FadeTransition;
 import org.eclipse.nebula.effects.stw.transitions.SlideTransition;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
 
 public abstract class AbstractEffectFrame {
 
-       public static final String[] DIRECTIONS_NAMES = { "Left", "Right", "Up", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-                       "Down", "Right/Left", "Down/Up", "Random right and left", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-                       "Random up and down", "Random" }; //$NON-NLS-1$ //$NON-NLS-2$
-
        public static final int DIR_LEFT = 0;
        public static final int DIR_RIGHT = 1;
        public static final int DIR_UP = 2;
@@ -50,28 +56,79 @@ public abstract class AbstractEffectFrame {
        public static final int DIR_RANDOM_RIGHT_AND_LEFT = 6;
        public static final int DIR_RANDOM_UP_AND_DOWN = 7;
        public static final int DIR_RANDOM = 8;
+       
+//     private boolean effectLock = false; // temporary block variable
+
+       public static final String[] DIRECTIONS_NAMES = { "Left", "Right", "Up", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                       "Down", "Right/Left", "Down/Up", "Random right and left", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+                       "Random up and down", "Random" }; //$NON-NLS-1$ //$NON-NLS-2$
+       protected Transition[] transitions = null;
+
+       private HashMap<String, DAPageComposite> pages = null;
+       List<Image> images = null;
 
        @SuppressWarnings("unused")
        private int selectedDirection = DIR_RANDOM;
 
        protected Composite containerComposite = null;
+       private StackLayout containerLayout = null;
        protected TransitionManager tm = null;
 
        public static final int TRANSITION_FADE = 1;
        public static final int TRANSITION_SLIDE = 0;
        public static final int TRANSITION_CUBIC_ROTATION = 2;
 
-       protected Transition[] transitions;
-
-       public void init(Composite parent) {
+       public AbstractEffectFrame(Composite parent) {
+               parent.setLayout(new FillLayout());
                containerComposite = new Composite(parent, SWT.NONE);
+               containerLayout = new StackLayout();
+               containerComposite.setLayout(containerLayout);
+               pages = new HashMap<String, DAPageComposite>();
+
+               initTransitions();
+               
                init();
-               // linux supports only two effect
-               transitions = new Transition[] { new SlideTransition(tm),
-                               new FadeTransition(tm), // };
-                               new CubicRotationTransition(tm) };
-               transitions[0].setFPS(60);
-               transitions[0].setTotalTransitionTime(1000);
+               containerLayout.topControl = getPage(TimelinePage.ID);
+               containerComposite.layout();
+       }
+
+       private void initTransitions() {
+               tm = new TransitionManager(new Transitionable() {
+
+                       @Override
+                       public void setSelection(int index) {
+                       }
+
+                       @Override
+                       public int getSelection() {
+                               return 0;
+                       }
+
+                       @Override
+                       public double getDirection(int toIndex, int fromIndex) {
+                               if (toIndex > fromIndex) {
+                                       return Transition.DIR_LEFT;
+                               } else if (toIndex < fromIndex) {
+                                       return Transition.DIR_RIGHT;
+                               }
+                               return Transition.DIR_UP;
+                       }
+
+                       @Override
+                       public Control getControl(int index) {
+//                             return comps.get(index);
+                               return null;
+                       }
+
+                       @Override
+                       public Composite getComposite() {
+                               return containerComposite;
+                       }
+
+                       @Override
+                       public void addSelectionListener(SelectionListener listener) {
+                       }
+               });
                tm.setTransition(transitions[TRANSITION_CUBIC_ROTATION]);
                tm.addTransitionListener(new TransitionListener() {
                        @Override
@@ -79,6 +136,11 @@ public abstract class AbstractEffectFrame {
                                System.out.println("transition finish"); //$NON-NLS-1$
                        }
                });
+
+               transitions = new Transition[] { new SlideTransition(tm),
+                               new FadeTransition(tm), new CubicRotationTransition(tm) };
+               transitions[0].setFPS(60);
+               transitions[0].setTotalTransitionTime(1000);
        }
 
        protected abstract void init();
@@ -145,4 +207,95 @@ public abstract class AbstractEffectFrame {
        public void setTransitionFPS(long fps) {
                tm.getTransition().setFPS(fps);
        }
+
+       public HashMap<String, DAPageComposite> getDAPages() {
+               return pages;
+       }
+       
+       public void addPage(String ID, DAPageComposite page)
+       {
+               pages.put(ID, page);
+       }
+       
+       public DAPageComposite getPage(String ID)
+       {
+               return pages.get(ID);
+       }
+       
+       
+//     public void effect(int fromIndex, int toIndex) {
+//             effectLock = true;
+//             ToolbarArea.getInstance().getMainButton().setEnabled(false);
+//             ToolbarArea.getInstance().getAnalysisButton().setEnabled(false);
+//             try {
+//                     Control from = containerLayout.topControl;
+//                     Rectangle rect = from.getBounds();
+//                     Image imgFrom = new Image(from.getDisplay(), rect.width,
+//                                     rect.height);
+//                     Image prevImage = images.get(fromIndex);
+//                     images.set(fromIndex, imgFrom);
+//                     prevImage.dispose();
+//
+//                     GC gcfrom = new GC(from);
+//                     from.update();
+//                     gcfrom.copyArea(imgFrom, 0, 0);
+//                     gcfrom.dispose();
+//
+//                     Canvas canvas = new Canvas(containerComposite, SWT.DOUBLE_BUFFERED);
+//                     canvas.moveAbove(null);
+//                     canvas.setBounds(rect);
+//
+//                     GC gcOn = new GC(canvas);
+//                     tm.getTransition().start(
+//                                     imgFrom,
+//                                     images.get(toIndex),
+//                                     gcOn,
+//                                     tm.getTransitionable().getDirection(selectedStack,
+//                                                     currentStack));
+//                     containerLayout.topControl = comps.get(selectedStack);
+//                     containerComposite.layout();
+//                     currentStack = selectedStack;
+//             } catch (Exception e) {
+//                     System.out.println(" application exit..."); //$NON-NLS-1$
+//             }
+//
+//             effectLock = false;
+//             ToolbarArea.getInstance().getMainButton().setEnabled(true);
+//             ToolbarArea.getInstance().getAnalysisButton().setEnabled(true);
+//     }
+//
+//     public void createCaptures(int initial) {
+//             images = new ArrayList<Image>();
+//             Rectangle rect = containerLayout.topControl.getBounds();
+//             for (int i = 0; i < comps.size(); i++) {
+//                     containerLayout.topControl = comps.get(i);
+//                     containerComposite.layout();
+//                     Image img = ImageCapture.getImage(containerLayout.topControl,
+//                                     rect.width, rect.height, true);
+//                     images.add(img);
+//             }
+//
+//             containerLayout.topControl = comps.get(initial);
+//             containerComposite.layout();
+//     }
+//
+//     public void excuteEffect(int select) {
+//             selectedStack = select;
+//             effect(currentStack, selectedStack);
+//     }
+//
+//     public void setTopComposite(int select) {
+//             selectedStack = select;
+//             // if (AnalyzerUtil.isWin()) {
+//             // effect(currentStack, selectedStack);
+//             // } else {
+//             containerLayout.topControl = comps.get(selectedStack);
+//             containerComposite.layout();
+//             currentStack = selectedStack;
+//             ((DAPageComposite) containerLayout.topControl).updatePage();
+//             ((DAPageComposite) containerLayout.topControl)
+//                             .setSourceView(ToolbarArea.getInstance()
+//                                             .getSourceViewToggleState());
+//             // }
+//     }
 }
index bb7ce92..d3f7f27 100644 (file)
 
 package org.tizen.dynamicanalyzer.ui.page;
 
+import java.util.HashMap;
+
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.part.ViewPart;
+import org.tizen.dynamicanalyzer.model.DAView;
+import org.tizen.dynamicanalyzer.ui.file.FilePage;
+import org.tizen.dynamicanalyzer.ui.summary.SummaryPage;
+import org.tizen.dynamicanalyzer.ui.thread.ThreadPage;
+import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
+import org.tizen.dynamicanalyzer.ui.userinterface.UserInterfacePage;
+import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite;
 
 public class BaseView extends ViewPart {
 
        public static final String ID = BaseView.class.getName();
-       Composite contentsComposite;
        DAEffectFrame mainView = null;
        DAPageComposite topComposite = null;
+       DATabComposite tabView = null;
+
+       private HashMap<String, DAView> views = null;
 
        @Override
        public void createPartControl(Composite parent) {
+               tabView = new DATabComposite(parent, SWT.DOUBLE_BUFFERED, null);
+               tabView.setTabWidth(120);
+               {
+                       TimelinePage timelinePage = new TimelinePage(
+                                       tabView.getContentComposite(), SWT.NONE);
+                       tabView.addView(timelinePage);
+                       SummaryPage summaryPage = new SummaryPage(
+                                       tabView.getContentComposite(), SWT.NONE);
+                       tabView.addView(summaryPage);
+                       FilePage filePage = new FilePage(tabView.getContentComposite(),
+                                       SWT.NONE);
+                       tabView.addView(filePage);
 
-               contentsComposite = new Composite(parent, SWT.NONE);
-               contentsComposite.setLayout(new FillLayout());
+                       ThreadPage threadPage = new ThreadPage(
+                                       tabView.getContentComposite(), SWT.NONE);
+                       tabView.addView(threadPage);
 
-               mainView = new DAEffectFrame();
-               mainView.init(contentsComposite);
-               mainView.getContainerComposite().setVisible(true);
+                       UserInterfacePage uiPage = new UserInterfacePage(
+                                       tabView.getContentComposite(), SWT.NONE);
+                       tabView.addView(uiPage);
+               }
        }
 
        @Override
@@ -56,29 +79,25 @@ public class BaseView extends ViewPart {
                // TODO Auto-generated method stub
        }
 
-       public void createCaptures() {
-               mainView.createCaptures(0);
-       }
-
-       public DAEffectFrame getMainView() {
-               return mainView;
+       public DATabComposite getMainTab() {
+               return tabView;
        }
 
        public DAPageComposite getTopComposite() {
                Display.getDefault().syncExec(new Runnable() {
                        @Override
                        public void run() {
-                               Composite container = mainView.getContainerComposite();
-                               StackLayout stack = (StackLayout) container.getLayout();
-                               topComposite = (DAPageComposite) stack.topControl;
+                               topComposite = (DAPageComposite) tabView.getTopComposite();
                        }
                });
                return topComposite;
        }
 
        public void clear() {
-               for (DAPageComposite mc : mainView.comps) {
-                       mc.clear();
-               }
+               tabView.clear();
+       }
+
+       public HashMap<String, DAView> getAllViewHash() {
+               return views;
        }
 }
index 48443de..1a80475 100644 (file)
@@ -55,6 +55,11 @@ import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener
 
 public class DAEffectFrame extends AbstractEffectFrame {
 
+       public DAEffectFrame(Composite parent) {
+               super(parent);
+               // TODO Auto-generated constructor stub
+       }
+
        final int MAIN_INDEX = 0;
        final int ANALYSIS_INDEX = 1;
        final int FILE_INDEX = 2;
@@ -295,9 +300,6 @@ public class DAEffectFrame extends AbstractEffectFrame {
                containerComposite.layout();
                currentStack = selectedStack;
                ((DAPageComposite) containerLayout.topControl).updatePage();
-               ((DAPageComposite) containerLayout.topControl)
-                               .setSourceView(ToolbarArea.getInstance()
-                                               .getSourceViewToggleState());
                // }
        }
 
index fb27118..34a041f 100644 (file)
@@ -31,85 +31,64 @@ import java.util.HashMap;
 import java.util.List;
 
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
 import org.tizen.dynamicanalyzer.logparser.LogPackage;
 
+public class DAPageComposite extends Composite implements ViewAction {
 
-public class DAPageComposite extends Composite {
-
-       List<String> viewNames;
-       HashMap<String, ViewAction> views;
+       private HashMap<String, ViewAction> viewMap = null;
+       private List<ViewAction> views = null;
+       protected String name = null;
 
        public DAPageComposite(Composite parent, int style) {
                super(parent, style);
-               // TODO Auto-generated constructor stub
+               viewMap = new HashMap<String, ViewAction>();
+               views = new ArrayList<ViewAction>();
        }
 
-       public List<String> getViewNames() {
-               if (viewNames == null) {
-                       viewNames = new ArrayList<String>();
-               }
-               return viewNames;
+       public List<ViewAction> getViews() {
+               return views;
        }
 
-       public HashMap<String, ViewAction> getViews() {
-               if (views == null) {
-                       views = new HashMap<String, ViewAction>();
-               }
-               return views;
+       public HashMap<String, ViewAction> getViewMap() {
+               return viewMap;
        }
 
        public void updatePage() {
-               int size = getViewNames().size();
+               int size = views.size();
                for (int i = 0; i < size; i++) {
-                       String key = getViewNames().get(i);
-                       ViewAction view = getViews().get(key);
-                       if (null != view) {
-                               view.updateView();
+                       if (null != views.get(i)) {
+                               views.get(i).updateView();
                        }
                }
        }
 
        public void updateLog(LogPackage logPack) {
-               int size = getViewNames().size();
+               int size = views.size();
                for (int i = 0; i < size; i++) {
-                       String key = getViewNames().get(i);
-                       ViewAction view = getViews().get(key);
-                       if (null != view) {
-                               view.updateLog(logPack);
+                       if (null != views.get(i)) {
+                               views.get(i).updateLog(logPack);
                        }
                }
        }
 
        public void clear() {
-               int size = getViewNames().size();
+               int size = views.size();
                for (int i = 0; i < size; i++) {
-                       String key = getViewNames().get(i);
-                       ViewAction view = getViews().get(key);
-                       if (null != view) {
-                               view.clear();
-                       }
-               }
-       }
-
-       public void setSourceView(boolean enable) {
-               int size = getViewNames().size();
-               for (int i = 0; i < size; i++) {
-                       String key = getViewNames().get(i);
-                       ViewAction view = getViews().get(key);
-                       if (null != view) {
-                               view.setSourceView(enable);
+                       if (null != views.get(i)) {
+                               views.get(i).clear();
                        }
                }
        }
 
        public void updatePage(DASelectionData data) {
                String viewId = data.getViewId();
-               int size = getViewNames().size();
+               int size = views.size();
                for (int i = 0; i < size; i++) {
-                       String key = getViewNames().get(i);
+                       String key = views.get(i).getClass().getName();
                        if (key != null && !key.equals(viewId)) {
-                               ViewAction view = getViews().get(key);
+                               ViewAction view = viewMap.get(key);
                                if (null != view) {
                                        view.updateView(data);
                                }
@@ -118,35 +97,58 @@ public class DAPageComposite extends Composite {
        }
 
        public void updateSelectedViews(DASelectionData data, List<String> viewNames) {
-               String viewId = data.getViewId();
                int size = viewNames.size();
                for (int i = 0; i < size; i++) {
-                       String key = viewNames.get(i);
-                       if (key != null && !key.equals(viewId)) {
-                               ViewAction view = getViews().get(key);
-                               if (null != view) {
-                                       view.updateView(data);
-                               }
-                       }
+                       viewMap.get(viewNames.get(i)).updateView(data);
                }
        }
-       
-       
+
        public void addView(ViewAction view) {
-               getViews().put(view.getClass().getName(), view);
-               getViewNames().add(view.getClass().getName());
+               viewMap.put(view.getClass().getName(), view);
+               views.add(view);
        }
 
        public void controlSelection(String viewId) {
-               int size = getViewNames().size();
+               int size = views.size();
                for (int i = 0; i < size; i++) {
-                       String key = getViewNames().get(i);
+                       String key = views.get(i).getClass().getName();
                        if (key != null && !key.equals(viewId)) {
-                               ViewAction view = getViews().get(key);
+                               ViewAction view = viewMap.get(key);
                                if (null != view) {
                                        view.otherViewSelectionOccured();
                                }
                        }
                }
        }
+
+       public ViewAction getView(String viewId) {
+               return viewMap.get(viewId);
+       }
+
+       @Override
+       public void updateView() {
+               updatePage();
+       }
+
+       @Override
+       public Control getControl() {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       @Override
+       public void updateView(DASelectionData data) {
+               updatePage(data);
+       }
+
+       @Override
+       public void otherViewSelectionOccured() {
+               // TODO Auto-generated method stub
+
+       }
+
+       @Override
+       public String getViewName() {
+               return name;
+       }
 }
index 20d884f..ebcfbbd 100644 (file)
@@ -39,11 +39,11 @@ public interface ViewAction {
 
        public void clear();
 
-       public void setSourceView(boolean enable);
-
        public Control getControl();
 
        public void updateView(DASelectionData data);
        
        public void otherViewSelectionOccured();
+       
+       public String getViewName();
 }
index 359a6dd..1c01415 100644 (file)
@@ -33,8 +33,9 @@ import org.eclipse.swt.events.ControlListener;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
+import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.common.DesignConstants;
-import org.tizen.dynamicanalyzer.nl.SummaryLabels;
+import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.ui.info.callstack.CallstackView;
 import org.tizen.dynamicanalyzer.ui.info.snapshot.SnapshotView;
 import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
@@ -46,7 +47,8 @@ import org.tizen.dynamicanalyzer.ui.summary.warning.WarningListView;
 import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite;
 
 public class SummaryPage extends DAPageComposite {
-
+       public static final String ID = SummaryPage.class.getName();
+       public static final String TAB_ID = ID + CommonConstants.UNDERBAR + "tab";
        public final static int FAILED_APILIST_VIEW_INDEX = 0;
        public final static int LEAK_VIEW_INDEX = 1;
        public final static int INFO_VIEW_INDEX = 2;
@@ -66,6 +68,7 @@ public class SummaryPage extends DAPageComposite {
 
        public SummaryPage(Composite parent, int style) {
                super(parent, style);
+               name = AnalyzerLabels.COOLBAR_AREA_SUMMARY;
                this.setLayout(new FillLayout());
 
                baseForm = new SashForm(this, SWT.VERTICAL);
@@ -83,18 +86,17 @@ public class SummaryPage extends DAPageComposite {
                addView(leakView);
 
                // INFO_VIEW_INDEX = 2;
-               DATabComposite tabView = new DATabComposite(upperForm, SWT.NONE);
+               DATabComposite tabView = new DATabComposite(upperForm, SWT.NONE, TAB_ID);
                addView(tabView);
                {
                        SnapshotView currentView = new SnapshotView(
                                        tabView.getContentComposite(), SWT.NONE, false);
-                       tabView.addView(currentView,
-                                       SummaryLabels.SUMMARY_PAGE_SNAPSHOT_TITLE);
+                       tabView.addView(currentView);
 
                        CallstackView callstack = new CallstackView(
                                        tabView.getContentComposite(), SWT.NONE);
-                       tabView.addView(callstack,
-                                       SummaryLabels.SUMMARY_PAGE_CALLSTACK_TITLE);
+                       callstack.setObservingViews(new String[]{FailedApiListView.ID, LeakView.ID, WarningListView.ID});
+                       tabView.addView(callstack);
                }
                upperForm.setWeights(new int[] { 37, 40, 23 });
 
index be805c7..bbf41e8 100644 (file)
@@ -31,7 +31,6 @@ import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
-import org.tizen.dynamicanalyzer.listeners.TableTooltipListener;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.model.DAView;
 import org.tizen.dynamicanalyzer.nl.SummaryLabels;
@@ -86,9 +85,6 @@ public class FailedApiListView extends DAView {
                tableComp.setColumns(columnNames);
                tableComp.setColumnSize(columnSizes);
                tableComp.setColumnVisibility(columnVisibility);
-
-               tableComp.setTableToolTipListener(new TableTooltipListener(tableComp
-                               .getTable(), false));
        }
 
        @Override
@@ -103,11 +99,6 @@ public class FailedApiListView extends DAView {
        }
 
        @Override
-       public void setSourceView(boolean enable) {
-               tableComp.setSourceView(enable);
-       }
-
-       @Override
        public Control getControl() {
                return tableComp;
        }
index 56362e6..80a33c5 100644 (file)
@@ -31,7 +31,6 @@ import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
-import org.tizen.dynamicanalyzer.listeners.TableTooltipListener;
 import org.tizen.dynamicanalyzer.model.DAView;
 import org.tizen.dynamicanalyzer.nl.SummaryLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
@@ -50,8 +49,7 @@ public class LeakView extends DAView {
        private int[] columnSizes = { 60, 25, 60, 50, 100, 100 };
        private boolean[] columnVisibility = { true, false, true, true, true, true };
        int[] sortTypes = { AnalyzerConstants.SORT_TYPE_GRID,
-                       AnalyzerConstants.SORT_TYPE_NUM,
-                       AnalyzerConstants.SORT_TYPE_GRID,
+                       AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_GRID,
                        AnalyzerConstants.SORT_TYPE_NUM,
                        AnalyzerConstants.SORT_TYPE_STRING,
                        AnalyzerConstants.SORT_TYPE_STRING };
@@ -82,15 +80,11 @@ public class LeakView extends DAView {
                treeComp.setColumns(columnNames);
                treeComp.setColumnSize(columnSizes);
                treeComp.setColumnVisibility(columnVisibility);
-
-               treeComp.setTableToolTipListener(new TableTooltipListener(treeComp
-                               .getTable(), false));
-
        }
 
        @Override
        public void updateView() {
-                treeComp.updateTree();
+               treeComp.updateTree();
        }
 
        @Override
@@ -99,11 +93,6 @@ public class LeakView extends DAView {
        }
 
        @Override
-       public void setSourceView(boolean enable) {
-               treeComp.setSourceView(enable);
-       }
-
-       @Override
        public Control getControl() {
                return treeComp;
        }
index e50ef34..6b766fd 100644 (file)
@@ -177,7 +177,8 @@ public class FunctionUsageProfilingTableCellRenderer extends
                        String rateStr = item.getText(getColumn());
                        String[] splitRateStr = rateStr.split("%"); //$NON-NLS-1$
                        rateStr = new String(splitRateStr[0].trim());
-                       if ( !rateStr.equals("-")) {
+                       String[] splitStr = rateStr.split(":"); //$NON-NLS-1$
+                       if ( (!rateStr.equals("-")) && ( splitStr.length < 1) ) {
                                double rate = Double.parseDouble(rateStr);
                                Rectangle bounds = getBounds();
                                int rectWidth = (int) (bounds.width * (rate / 100));
index 4a3d99d..4d15947 100644 (file)
@@ -84,7 +84,7 @@ public class FunctionUsageProfilingView extends DAView {
                treeComp.setColumns(columnNames);
                treeComp.setColumnSize(columnSizes);
                treeComp.setColumnVisibility(columnVisibility);
-               treeComp.setTableToolTipListener(null);
+               treeComp.setTableToolTipEnable(false);
        }
 
        @Override
index 57cc8c4..6e2f0a1 100644 (file)
@@ -52,11 +52,10 @@ import org.tizen.dynamicanalyzer.ui.widgets.table.TreeDataComparator;
 import org.tizen.dynamicanalyzer.utils.Formatter;
 
 public class ProfilingTable extends DATreeComposite {
-
+       public static final String ID = ProfilingTable.class.getName();
        public ProfilingTable(Composite parent, int compStyle, int tableStyle) {
                super(parent, compStyle, tableStyle);
                setComparator(new TreeDataComparator());
-//             setSelValueIndex(0);
 
                comparator.setType(AnalyzerConstants.SORT_TYPE_NUM);
                comparator.setColumn(2);
index a02ef48..9c96485 100644 (file)
@@ -45,6 +45,8 @@ import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
 
 public class WarningDetailView extends DAView {
 
+       public static final String ID = WarningDetailView.class.getName();
+       
        private Canvas canvas = null;
        private String warningMessage = ""; //$NON-NLS-1$
        private final String titleText = SummaryLabels.FILE_DETAILS_TITLE;
index 65efc29..25d511b 100644 (file)
@@ -31,7 +31,6 @@ import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
-import org.tizen.dynamicanalyzer.listeners.TableTooltipListener;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.model.DAView;
 import org.tizen.dynamicanalyzer.nl.SummaryLabels;
@@ -71,8 +70,6 @@ public class WarningListView extends DAView {
                tableComp.setSourceColumns(sourceColumns);
                tableComp.setColumns(columnNames);
                tableComp.setColumnSize(columnSizes);
-               tableComp.setTableToolTipListener(new TableTooltipListener(tableComp
-                               .getTable(), false));
        }
 
 
@@ -81,8 +78,6 @@ public class WarningListView extends DAView {
                tableComp.updateTable();
        }
 
-       
-
        @Override
        public void clear() {
                tableComp.clear();
@@ -97,6 +92,4 @@ public class WarningListView extends DAView {
        public void otherViewSelectionOccured() {
                tableComp.deselectAll();
        }
-       
-       
 }
index 1edd744..9c5e07a 100644 (file)
@@ -32,19 +32,17 @@ import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
-import org.tizen.dynamicanalyzer.listeners.TableTooltipListener;
 import org.tizen.dynamicanalyzer.model.DAView;
 import org.tizen.dynamicanalyzer.nl.ThreadPageLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.ui.basechart.PageChartGraphSeries;
 import org.tizen.dynamicanalyzer.ui.basechart.PageChartItem;
 import org.tizen.dynamicanalyzer.ui.basechart.table.DAPageAPIListTable;
-import org.tizen.dynamicanalyzer.ui.file.FileApiListView;
 import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
 
 public class ThreadAPIListView extends DAView {
 
-       public static final String ID = FileApiListView.class.getName();
+       public static final String ID = ThreadAPIListView.class.getName();
        private int[] columnSizes = { 30, 80, 120, 250, 0, 100, 0 };
 
        DAPageAPIListTable tableComp = null;
@@ -67,14 +65,6 @@ public class ThreadAPIListView extends DAView {
                tableComp.setColumns(ThreadPageDataManager.getInstance()
                                .getColumnNamesToArray());
                tableComp.setColumnSize(columnSizes);
-
-               tableComp.setTableToolTipListener(new TableTooltipListener(tableComp
-                               .getTable(), false));
-       }
-
-       @Override
-       public void setSourceView(boolean enable) {
-               tableComp.setSourceView(enable);
        }
 
        @Override
@@ -102,7 +92,8 @@ public class ThreadAPIListView extends DAView {
                        }
                        bChartSelect = false;
                } else {
-                       if (tableComp.getTable().getItemCount() < graphSeries.getSize() - graphSeries.getInternalItemSize()) {
+                       if (tableComp.getTable().getItemCount() < graphSeries.getSize()
+                                       - graphSeries.getInternalItemSize()) {
                                for (int j = tableComp.getTable().getItemCount(); j < graphSeries
                                                .getSize(); j++) {
                                        int dataItemIndex = (int) graphSeries.get(j).getY();
index c62e3ad..aba79e2 100644 (file)
@@ -30,17 +30,21 @@ import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.tizen.dynamicanalyzer.logparser.LogPackage;
+import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.ui.basechart.chart.DAPageChart;
 import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
 
 public class ThreadPage extends DAPageComposite {
+       public static final String ID = ThreadPage.class.getName();
        private ThreadChartView threadChartView;
        private ThreadAPIListView threadAPIListView;
 
        // 10 : offset
-//     private final double DEFAULT_WIDTH = DesignConstants.SNAPSHOT_VIEW_WIDTH + 10;
-//     private final double DEFAULT_HEIGHT = DesignConstants.SNAPSHOT_VIEW_HEIGHT
-//                     + 10 + DesignConstants.VIEW_TITLEBAR_HEIGHT;
+       // private final double DEFAULT_WIDTH = DesignConstants.SNAPSHOT_VIEW_WIDTH
+       // + 10;
+       // private final double DEFAULT_HEIGHT =
+       // DesignConstants.SNAPSHOT_VIEW_HEIGHT
+       // + 10 + DesignConstants.VIEW_TITLEBAR_HEIGHT;
 
        SashForm baseForm;
        SashForm leftForm;
@@ -50,6 +54,7 @@ public class ThreadPage extends DAPageComposite {
 
        public ThreadPage(Composite parent, int style) {
                super(parent, style);
+               name = AnalyzerLabels.COOLBAR_AREA_THREAD;
                this.setLayout(new FillLayout());
 
                // baseForm = new SashForm(this, SWT.HORIZONTAL);
@@ -64,10 +69,11 @@ public class ThreadPage extends DAPageComposite {
 
                leftForm.setWeights(new int[] { 60, 40 });
 
-//             tManager.setPageChart((DAPageChart) threadChartView.getControl());      //FIXME
+               // tManager.setPageChart((DAPageChart) threadChartView.getControl());
+               // //FIXME
        }
 
        public void updateLog(LogPackage logPack) {
-//             tManager.parsePageData(logPack);
+               // tManager.parsePageData(logPack);
        }
 }
index 6b915dc..4c9dadc 100644 (file)
@@ -43,26 +43,12 @@ import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite;
 public class DATimelineTabComposite extends DATabComposite {\r
        public static final String ID = DATimelineTabComposite.class.getName();\r
 \r
-       RangeView rangeView = null;\r
-       SnapshotView snapshotView = null;\r
-\r
        public DATimelineTabComposite(Composite parent, int style) {\r
-               super(parent, style);\r
-               // TODO Auto-generated constructor stub\r
-       }\r
-\r
-       public void addRangeView(Composite child, String title) {\r
-               super.addView(child, title);\r
-               rangeView = (RangeView) child;\r
-       }\r
-\r
-       public void addSnapshotView(Composite child, String title) {\r
-               super.addView(child, title);\r
-               snapshotView = (SnapshotView) child;\r
+               super(parent, style, ID);\r
        }\r
 \r
-    public void updateLog(LogPackage logPack) {\r
-       Logs logs = logPack.getLogs(LogCenterConstants.LOG_DEVICE);\r
+       public void updateLog(LogPackage logPack) {\r
+               Logs logs = logPack.getLogs(LogCenterConstants.LOG_DEVICE);\r
                if (null == logs || logs.getLogs().size() == 0) {\r
                        return;\r
                }\r
@@ -70,20 +56,23 @@ public class DATimelineTabComposite extends DATabComposite {
                int lastIndex = inputs.size() - 1;\r
                List<String> input = inputs.get(lastIndex);\r
 \r
-               rangeView.setTimeLast(Long\r
-                               .valueOf(input.get(LogCenterConstants.DEVICE_TIME_INDEX)));\r
-       super.updateLog(logPack);\r
-    }\r
-    \r
+               RangeView rangeView = (RangeView) getTab(RangeView.ID);\r
+               rangeView.setTimeLast(Long.valueOf(input\r
+                               .get(LogCenterConstants.DEVICE_TIME_INDEX)));\r
+               super.updateLog(logPack);\r
+       }\r
+\r
        public void updateView(DASelectionData data) {\r
+\r
+               RangeView rangeView = (RangeView) getTab(RangeView.ID);\r
+               SnapshotView snapshotView = (SnapshotView) getTab(SnapshotView.ID);\r
+\r
                if (ConfigureManager.getInstance()\r
                                .getValue(ConfigureLabels.RANGEAUTOSELECT)\r
                                .equals(ConfigureLabels.ON)) {\r
                        if (TimelineComposite.ID == data.getViewId()) {\r
                                if (data.getEndTime() - data.getStartTime() >= 1000000) {\r
-                                       setEnableTab(rangeView);\r
-                               } else {\r
-                                       // do nothing\r
+                                       setSelectTab(RangeView.ID);\r
                                }\r
                        }\r
                }\r
index 77e5a1d..28cc5cd 100644 (file)
@@ -34,7 +34,7 @@ import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.tizen.dynamicanalyzer.common.DesignConstants;
-import org.tizen.dynamicanalyzer.nl.InformationViewLabels;
+import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.ui.info.callstack.CallstackView;
 import org.tizen.dynamicanalyzer.ui.info.range.RangeView;
 import org.tizen.dynamicanalyzer.ui.info.snapshot.SnapshotView;
@@ -43,6 +43,7 @@ import org.tizen.dynamicanalyzer.ui.timeline.calltrace.CallTraceView;
 import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineComposite;
 
 public class TimelinePage extends DAPageComposite {
+       public static final String ID = TimelinePage.class.getName();
 
        public final static int TIMELINE_INDEX = 0;
        public final static int INFO_INDEX = 1;
@@ -58,6 +59,7 @@ public class TimelinePage extends DAPageComposite {
 
        public TimelinePage(Composite parent, int style) {
                super(parent, style);
+               name = AnalyzerLabels.COOLBAR_AREA_TIMELINE;
                this.setLayout(new FillLayout());
 
                leftForm = new SashForm(this, SWT.HORIZONTAL);
@@ -75,17 +77,16 @@ public class TimelinePage extends DAPageComposite {
                {
                        SnapshotView currentView = new SnapshotView(
                                        tabView.getContentComposite(), SWT.NONE, false);
-                       tabView.addSnapshotView(currentView,
-                                       InformationViewLabels.SNAPSHOT_VIEW_TITLE);
+                       tabView.addView(currentView);
 
                        CallstackView callstack = new CallstackView(
                                        tabView.getContentComposite(), SWT.NONE);
-                       tabView.addView(callstack,
-                                       InformationViewLabels.CALLSTACK_VIEW_TITLE);
+                       callstack.setObservingViews(new String[] {CallTraceView.ID});
+                       tabView.addView(callstack);
 
-                       RangeView stats = new RangeView(tabView.getContentComposite(),
+                       RangeView rangeView = new RangeView(tabView.getContentComposite(),
                                        SWT.NONE);
-                       tabView.addRangeView(stats, InformationViewLabels.RANGE_VIEW_TITLE);
+                       tabView.addView(rangeView);
                }
 
                // index 2 : APILIST_INDEX
@@ -120,8 +121,7 @@ public class TimelinePage extends DAPageComposite {
                });
        }
 
-       public void changeLayout()
-       {
-               
+       public void changeLayout() {
+
        }
 }
index 2d750d4..0fca686 100644 (file)
@@ -72,8 +72,6 @@ public class CallTraceTable extends DATableComposite {
 
                        @Override
                        public void widgetDefaultSelected(SelectionEvent e) {
-                               // TODO Auto-generated method stub
-
                        }
                });
 
index df1e73d..460a96a 100644 (file)
@@ -37,7 +37,6 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
-import org.tizen.dynamicanalyzer.listeners.TableTooltipListener;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.logparser.LogPackage;
 import org.tizen.dynamicanalyzer.logparser.Logs;
@@ -82,8 +81,6 @@ public class CallTraceView extends DAView {
                tableComp.setColumns(columnNames);
                tableComp.setColumnSize(columnSizes);
                tableComp.setColumnVisibility(columnVisibility);
-               tableComp.setTableToolTipListener(new TableTooltipListener(tableComp
-                               .getTable(), false));
        }
 
        @Override
@@ -145,11 +142,6 @@ public class CallTraceView extends DAView {
        }
 
        @Override
-       public void setSourceView(boolean enable) {
-               tableComp.setSourceView(enable);
-       }
-
-       @Override
        public Control getControl() {
                return tableComp;
        }
index 81e00c4..70407b8 100644 (file)
@@ -36,7 +36,7 @@ import org.tizen.dynamicanalyzer.logparser.Logs;
 import org.tizen.dynamicanalyzer.model.LogCenter;
 import org.tizen.dynamicanalyzer.project.Project;
 import org.tizen.dynamicanalyzer.sql.SqlManager;
-import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
+import org.tizen.dynamicanalyzer.ui.page.BaseView;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 
 public class OpenTraceInputReader implements Runnable {
@@ -97,10 +97,7 @@ public class OpenTraceInputReader implements Runnable {
                        return;
                }
 
-               List<DAPageComposite> pages = AnalyzerManager.getAllPage();
-               int size = pages.size();
-               for (int i = 0; i < size; i++) {
-                       pages.get(i).updateLog(logPack);
-               }
+               BaseView bv = (BaseView) AnalyzerUtil.getView(BaseView.ID);
+               bv.getMainTab().updateLog(logPack);
        }
 }
index f6467cd..008f36e 100644 (file)
@@ -31,6 +31,7 @@ import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.communicator.ResourceCommunicator;
+import org.tizen.dynamicanalyzer.handlers.StopHandler;
 import org.tizen.dynamicanalyzer.logparser.LogParser;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
@@ -139,5 +140,7 @@ public class RecordStartStopThread implements Runnable {
                                                AnalyzerLabels.STOP_PROCESS_DLG_SUMMARIZING_DATA);
                        }
                });
+               
+               AnalyzerUtil.executeCommand(StopHandler.ID);
        }
 }
index bf250b7..2c3b887 100755 (executable)
 
 package org.tizen.dynamicanalyzer.ui.toolbar;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
 import org.eclipse.swt.events.ShellEvent;
 import org.eclipse.swt.events.ShellListener;
 import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.layout.FormAttachment;
 import org.eclipse.swt.layout.FormData;
@@ -63,9 +59,9 @@ import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
 import org.tizen.dynamicanalyzer.resources.ImageResources;
 import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
+import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
 import org.tizen.dynamicanalyzer.ui.widgets.ComboButtonRenderer;
 import org.tizen.dynamicanalyzer.ui.widgets.DADialog;
-import org.tizen.dynamicanalyzer.ui.widgets.TabButtonRenderer;
 import org.tizen.dynamicanalyzer.ui.widgets.TitleComboPopupRenderer;
 import org.tizen.dynamicanalyzer.ui.widgets.TitleComboRenderer;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
@@ -103,7 +99,6 @@ public class ToolbarArea {
 
        private List<DACustomButton> pageTab = null;
 
-       private static final int TAB_SIZE = 4;
        private static final int TAB_MAIN = 0;
        private static final int TAB_ANALYSIS = 1;
        private static final int TAB_FILE = 2;
@@ -115,13 +110,10 @@ public class ToolbarArea {
 
        private static final int TIMER_WIDTH = 121;
 
-       private static final int PAGE_BUTTON_WIDTH = 114;
-       private static final int PAGE_BUTTON_HEIGHT = 22;
-
        private static int COMBO_FIRST_INDEX = 0;
 
-       public static boolean bThreadPageWork = true; // FIXME
-       public static boolean bUIPageWork = true; // FIXME
+       public static boolean bThreadPageWork = false; // FIXME
+       public static boolean bUIPageWork = false; // FIXME
        
        public static final int TOOLBAR_STATE_RECORDING = 0;
        public static final int TOOLBAR_STATE_READY = 1;
@@ -230,11 +222,11 @@ public class ToolbarArea {
                createToolbar(toolbarComposite);
 
                // Creates coolbar bottom line.
-               Composite lineComposite = new Composite(baseComposite, SWT.NONE);
-               lineComposite.setLayout(new FormLayout());
-               lineComposite.setBackground(ColorResources.BLACK);
+//             Composite lineComposite = new Composite(baseComposite, SWT.NONE);
+//             lineComposite.setLayout(new FormLayout());
+//             lineComposite.setBackground(ColorResources.BLACK);
 
-               createPageBar(lineComposite);
+//             createPageBar(lineComposite);
                // Sets layout data.
                Control page = configurer.createPageComposite(baseComposite);
 
@@ -245,14 +237,14 @@ public class ToolbarArea {
                data.height = 38;
                toolbarComposite.setLayoutData(data);
 
-               data = new FormData();
-               data.top = new FormAttachment(toolbarComposite, 0, SWT.BOTTOM);
-               data.left = new FormAttachment(0, 0);
-               data.right = new FormAttachment(100, 0);
-               lineComposite.setLayoutData(data);
+//             data = new FormData();
+//             data.top = new FormAttachment(toolbarComposite, 0, SWT.BOTTOM);
+//             data.left = new FormAttachment(0, 0);
+//             data.right = new FormAttachment(100, 0);
+//             lineComposite.setLayoutData(data);
 
                data = new FormData();
-               data.top = new FormAttachment(lineComposite, 0, SWT.BOTTOM);
+               data.top = new FormAttachment(toolbarComposite, 0, SWT.BOTTOM);
                data.left = new FormAttachment(0, 0);
                data.right = new FormAttachment(100, 0);
                data.bottom = new FormAttachment(100, 0);
@@ -439,11 +431,8 @@ public class ToolbarArea {
                                .addClickListener(new DACustomButtonClickEventListener() {
                                        @Override
                                        public void handleClickEvent(DACustomButton button) {
-                                               DACustomToggleButton toggle = (DACustomToggleButton) button;
-
-                                               AnalyzerManager.getCurrentPage().setSourceView(
-                                                               toggle.isToggled());
-
+                                               
+                                               // TODO : use for test code...
                                                // System.out.println(SymbolNameDemangler
                                                // .nameDemangle("_ZN3Osp4Base7Runtime14IEventListenerC1Ev"));
 
@@ -453,6 +442,10 @@ public class ToolbarArea {
                                                // } else {
                                                // AnalyzerManager.setTheme(DAThemeWhite.getInstance());
                                                // }
+//                                             BaseView view = (BaseView) AnalyzerUtil.getView(BaseView.ID);
+//                                             FilePage filePage = new FilePage(view.getMainTab().getContentComposite(),
+//                                                             SWT.NONE);
+//                                             view.getMainTab().addView(filePage, AnalyzerLabels.COOLBAR_AREA_FILE);
                                        }
                                });
        }
@@ -469,7 +462,7 @@ public class ToolbarArea {
 
        public void startTraceButton() {
                System.out.println("Start trace button clicked");//$NON-NLS-1$
-               AnalyzerUtil.changePage(0);
+               AnalyzerUtil.changePage(TimelinePage.ID);
                AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_RECORDING);
                RecordStartStopThread.runStartStopThread();
        }
@@ -665,116 +658,11 @@ public class ToolbarArea {
                addToolbarListeners();
        }
 
-       private void createPageBar(Composite parent) {
-               pageTab = new ArrayList<DACustomButton>();
-
-               for (int i = 0; i <= TAB_SIZE; i++){
-                       pageTab.add(new DACustomButton(parent,
-                                       ColorResources.TAB_NORMAL_COLOR_START,
-                                       ColorResources.TAB_NORMAL_COLOR_END,
-                                       ColorResources.TAB_PUSH_COLOR_START,
-                                       ColorResources.TAB_PUSH_COLOR_END,
-                                       ColorResources.TAB_HOVER_COLOR_START,
-                                       ColorResources.TAB_HOVER_COLOR_END,
-                                       ColorResources.TAB_SELECTED_COLOR_START,
-                                       ColorResources.TAB_SELECTED_COLOR_END));
-                       
-               
-                       pageTab.get(i).setRenderer(new TabButtonRenderer());
-                       pageTab.get(i).setFontColor(DACustomButton.STATE_NORMAL,
-                                       ColorResources.TAB_NORMAL_FONT_COLOR);
-                       pageTab.get(i).setFontColor(DACustomButton.STATE_PUSH,
-                                       ColorResources.TAB_PUSH_FONT_COLOR);
-                       pageTab.get(i).setFontColor(DACustomButton.STATE_HOVER,
-                                       ColorResources.TAB_HOVER_FONT_COLOR);
-                       pageTab.get(i).setFontColor(DACustomButton.STATE_DISABLE,
-                                       ColorResources.TAB_SELECTED_FONT_COLOR);
-                       pageTab.get(i).setOutlineColors(
-                                       ColorResources.TAB_OUTLINE_NORMAL_COLOR,
-                                       ColorResources.TAB_OUTLINE_PUSH_COLOR,
-                                       ColorResources.TAB_OUTLINE_HOVER_COLOR,
-                                       ColorResources.TAB_OUTLINE_SELECTED_COLOR);
-                       
-                       
-                       if ( i ==  TAB_MAIN){
-                               pageTab.get(i).setEnabled(false);
-                               pageTab.get(i).setText(AnalyzerLabels.COOLBAR_AREA_TIMELINE);
-                       }else if ( i ==  TAB_ANALYSIS){
-                               pageTab.get(i).setText(AnalyzerLabels.COOLBAR_AREA_SUMMARY);
-                       }else if ( i ==  TAB_FILE){
-                               pageTab.get(i).setText(AnalyzerLabels.COOLBAR_AREA_FILE);
-                       }else if ( i ==  TAB_THREAD){
-                               pageTab.get(i).setText(AnalyzerLabels.COOLBAR_AREA_THREAD);
-                       }else if ( i ==  TAB_UI){
-                               pageTab.get(i).setText(AnalyzerLabels.COOLBAR_AREA_UI);
-                       }else{
-                               System.out.print("Tab Count Error  - "+ i);
-                       }
-                       pageTab.get(i).setFont(FontResources.TAB_BUTTON_FONT);
-               }
-               
-
-               Composite whiteLine = new Composite(parent, SWT.NONE);
-               whiteLine.setBackground(ColorResources.WHITE);
-               whiteLine.setLayout(new FillLayout());
-               whiteLine.addPaintListener(tabCompositePaintListener);
-
-               FormData data = new FormData();
-               data.left = new FormAttachment(0, 0);
-               data.width = PAGE_BUTTON_WIDTH;
-               data.height = PAGE_BUTTON_HEIGHT;
-               pageTab.get(TAB_MAIN).setLayoutData(data);
-
-               data = new FormData();
-               data.left = new FormAttachment(pageTab.get(TAB_MAIN), 0);
-               data.width = PAGE_BUTTON_WIDTH;
-               data.height = PAGE_BUTTON_HEIGHT;
-               pageTab.get(TAB_ANALYSIS).setLayoutData(data);
-
-               data = new FormData();
-               data.left = new FormAttachment(pageTab.get(TAB_ANALYSIS), 0);
-               data.width = PAGE_BUTTON_WIDTH;
-               data.height = PAGE_BUTTON_HEIGHT;
-               pageTab.get(TAB_FILE).setLayoutData(data);
-
-               // FIXME
-               data = new FormData();
-               data.left = new FormAttachment(pageTab.get(TAB_FILE), 0);
-               if (true == bThreadPageWork) {
-                       data.width = PAGE_BUTTON_WIDTH;
-                       data.height = PAGE_BUTTON_HEIGHT;
-               } else {
-                       data.width = 0;
-                       data.height = 0;
-               }
-               pageTab.get(TAB_THREAD).setLayoutData(data);
-               
-               // FIXME
-               data = new FormData();
-               data.left = new FormAttachment(pageTab.get(TAB_THREAD), 0);
-               if (true == bUIPageWork) {
-                       data.width = PAGE_BUTTON_WIDTH;
-                       data.height = PAGE_BUTTON_HEIGHT;
-               } else {
-                       data.width = 0;
-                       data.height = 0;
-               }
-               pageTab.get(TAB_UI).setLayoutData(data);
-                               
-
-               data = new FormData();
-               data.left = new FormAttachment(pageTab.get(TAB_UI), 0);
-               data.right = new FormAttachment(100, 0);
-               data.bottom = new FormAttachment(100, 0);
-               data.top = new FormAttachment(0, 0);
-               data.bottom = new FormAttachment(100, 0);
-               whiteLine.setLayoutData(data);
-       }
 
        // tab, set selection
 
        public void setSelectionTab(int nTab) {
-               for (int i = 0; i <= TAB_SIZE; i++) {
+               for (int i = 0; i <= TAB_UI; i++) {
                        if (i == nTab)
                                pageTab.get(i).setEnabled(false);
                        else
@@ -909,6 +797,7 @@ public class ToolbarArea {
                initAppCombo();
        }
 
+       // FIXME: rename
        public boolean getSourceViewToggleState() {
                return viewSourceButton.isToggled();
        }
@@ -1047,21 +936,6 @@ public class ToolbarArea {
                return (index < 0) ? false : true;
        }
 
-       private PaintListener tabCompositePaintListener = new PaintListener() {
-
-               @Override
-               public void paintControl(PaintEvent e) {
-                       Composite comp = (Composite) e.widget;
-                       Rectangle rect = comp.getClientArea();
-                       e.gc.setForeground(ColorResources.TAB_BG_COLOR_START);
-                       e.gc.setBackground(ColorResources.TAB_BG_COLOR_END);
-                       e.gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height,
-                                       true);
-                       e.gc.setForeground(ColorResources.TAB_BG_OUTLINE_COLOR);
-                       e.gc.drawRectangle(rect);
-               }
-       };
-
        private boolean checkValidApplication() {
                List<AppDesktopInfo> apps = DACommunicator.getAppListFromTarget();
                if (apps.isEmpty()) {
index cd5991b..2301650 100644 (file)
@@ -5,7 +5,6 @@ import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
-import org.tizen.dynamicanalyzer.listeners.TableTooltipListener;
 import org.tizen.dynamicanalyzer.model.DAView;
 import org.tizen.dynamicanalyzer.nl.UserInterfacePageLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
@@ -43,14 +42,6 @@ public class UserInterfaceFormBasedLeakListView extends DAView {
                                | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
                tableComp.setColumns(columnNames);
                tableComp.setColumnSize(columnSizes);
-
-               tableComp.setTableToolTipListener(new TableTooltipListener(tableComp
-                               .getTable(), false));
-       }
-
-       @Override
-       public void setSourceView(boolean enable) {
-               tableComp.setSourceView(enable);
        }
 
        @Override
index e57acd8..0d5e406 100644 (file)
@@ -31,22 +31,23 @@ import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.tizen.dynamicanalyzer.logparser.LogPackage;
+import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
+import org.tizen.dynamicanalyzer.ui.info.snapshot.SnapshotView;
 import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
 import org.tizen.dynamicanalyzer.ui.timeline.DATimelineTabComposite;
-import org.tizen.dynamicanalyzer.ui.info.snapshot.SnapshotView;
-import org.tizen.dynamicanalyzer.nl.UserInterfacePageLabels;
 
 public class UserInterfacePage extends DAPageComposite {
-       
+       public static final String ID = UserInterfacePage.class.getName();
        SashForm baseForm;
        SashForm upperForm;
        SashForm bottomForm;
 
+       UserInterfacePageDataManager tManager = UserInterfacePageDataManager
+                       .getInstance();
 
-       UserInterfacePageDataManager tManager = UserInterfacePageDataManager.getInstance();
-
-       public UserInterfacePage(Composite parent, int style) { 
+       public UserInterfacePage(Composite parent, int style) {
                super(parent, style);
+               name = AnalyzerLabels.COOLBAR_AREA_UI;
                this.setLayout(new FillLayout());
                System.out.println(" UserInterfacePage");
 
@@ -54,32 +55,37 @@ public class UserInterfacePage extends DAPageComposite {
                baseForm.setLayout(new FillLayout());
 
                upperForm = new SashForm(baseForm, SWT.HORIZONTAL);
-               UserInterfaceControlListView topLeftFirst = new UserInterfaceControlListView(upperForm,SWT.NONE);
+               UserInterfaceControlListView topLeftFirst = new UserInterfaceControlListView(
+                               upperForm, SWT.NONE);
                addView(topLeftFirst);
-       
-               UserInterfaceSceneTransformListView topLeftSecond = new UserInterfaceSceneTransformListView(upperForm, SWT.NONE);
-               addView(topLeftSecond);         
-       
-               DATimelineTabComposite topLeftThird = new DATimelineTabComposite(upperForm, SWT.NONE);
+
+               UserInterfaceSceneTransformListView topLeftSecond = new UserInterfaceSceneTransformListView(
+                               upperForm, SWT.NONE);
+               addView(topLeftSecond);
+
+               DATimelineTabComposite topLeftThird = new DATimelineTabComposite(
+                               upperForm, SWT.NONE);
                addView(topLeftThird);
                {
-                       SnapshotView currentView = new SnapshotView(topLeftThird.getContentComposite(), SWT.NONE, false);
-                       topLeftThird.addSnapshotView(currentView, UserInterfacePageLabels.USERINTERFACE_SNAPSHOT_VIEW_NAME);
+                       SnapshotView currentView = new SnapshotView(
+                                       topLeftThird.getContentComposite(), SWT.NONE, false);
+                       topLeftThird.addView(currentView);
                }
 
                upperForm.setWeights(new int[] { 35, 35, 30 });
-               
+
                bottomForm = new SashForm(baseForm, SWT.HORIZONTAL);
-               UserInterfaceFunctionProfilingView bottomLeftFirst = new UserInterfaceFunctionProfilingView(bottomForm, SWT.NONE);
+               UserInterfaceFunctionProfilingView bottomLeftFirst = new UserInterfaceFunctionProfilingView(
+                               bottomForm, SWT.NONE);
                addView(bottomLeftFirst);
-               
-               UserInterfaceFormBasedLeakListView bottomLeftSecond = new UserInterfaceFormBasedLeakListView(bottomForm, SWT.NONE);
+
+               UserInterfaceFormBasedLeakListView bottomLeftSecond = new UserInterfaceFormBasedLeakListView(
+                               bottomForm, SWT.NONE);
                addView(bottomLeftSecond);
                bottomForm.setWeights(new int[] { 60, 40 });
        }
 
        public void updateLog(LogPackage logPack) {
-//             System.out.println(" updateLog " + logPack.toString());
                tManager.parsePageData(logPack);
        }
 }
\ No newline at end of file
index ba52572..70a0554 100644 (file)
@@ -5,7 +5,6 @@ import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
-import org.tizen.dynamicanalyzer.listeners.TableTooltipListener;
 import org.tizen.dynamicanalyzer.model.DAView;
 import org.tizen.dynamicanalyzer.nl.UserInterfacePageLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
@@ -43,14 +42,6 @@ public class UserInterfaceSceneTransformListView extends DAView {
                                | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
                tableComp.setColumns(columnNames);
                tableComp.setColumnSize(columnSizes);
-
-               tableComp.setTableToolTipListener(new TableTooltipListener(tableComp
-                               .getTable(), false));
-       }
-
-       @Override
-       public void setSourceView(boolean enable) {
-               tableComp.setSourceView(enable);
        }
 
        @Override
index b89d97f..7ea4459 100644 (file)
@@ -27,6 +27,7 @@
 package org.tizen.dynamicanalyzer.ui.widgets;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 
 import org.eclipse.swt.SWT;
@@ -56,15 +57,23 @@ public class DATabComposite extends DAView {
 
        private List<DACustomButton> buttons = null;
        private List<Composite> children = null;
+       private HashMap<String, Composite> childrenMap = null;
+       private HashMap<String, DACustomButton> buttonMap = null;
+
        private Composite tabComposite = null;
        private Composite contentsComposite = null;
        private StackLayout stackLayout = null;
 
-       public DATabComposite(Composite parent, int style) {
+       private int tabWidth = LONG_TAB_WIDTH;
+
+       public DATabComposite(Composite parent, int style, String ID) {
                super(parent, style);
-               tabComposite = new Composite(this, SWT.NONE);
+               childrenMap = new HashMap<String, Composite>();
+               buttonMap = new HashMap<String, DACustomButton>();
+
+               tabComposite = new Composite(this, SWT.DOUBLE_BUFFERED);
                tabComposite.setLayout(new FormLayout());
-               contentsComposite = new Composite(this, SWT.NONE);
+               contentsComposite = new Composite(this, SWT.DOUBLE_BUFFERED);
                stackLayout = new StackLayout();
                contentsComposite.setLayout(stackLayout);
                this.setLayout(new FormLayout());
@@ -76,7 +85,6 @@ public class DATabComposite extends DAView {
                data.height = DesignConstants.VIEW_TITLEBAR_HEIGHT;
                tabComposite.setLayoutData(data);
                tabComposite.addPaintListener(tabCompositePaintListener);
-               // tabComposite.setBackground(ColorResources.RED);
 
                data = new FormData();
                data.top = new FormAttachment(tabComposite, 0);
@@ -86,10 +94,14 @@ public class DATabComposite extends DAView {
                contentsComposite.setLayoutData(data);
        }
 
-       public void addView(Composite child, String title) {
+       public void addView(Composite child) {
                if (!(child instanceof ViewAction)) {
                        return;
                }
+
+               String ID = child.getClass().getName();
+               String title = ((ViewAction)child).getViewName();
+
                final DACustomButton tabButton = new DACustomButton(tabComposite,
                                ColorResources.TAB_NORMAL_COLOR_START,
                                ColorResources.TAB_NORMAL_COLOR_END,
@@ -120,27 +132,33 @@ public class DATabComposite extends DAView {
                if (getButtons().size() > 0) {
                        DACustomButton button1 = getButtons().get(getButtons().size() - 1);
                        data.left = new FormAttachment(button1, 0);
-                       data.width = SHORT_TAB_WIDTH;
+                       data.width = tabWidth; // short
                } else {
                        data.left = new FormAttachment(0, 0);
-                       data.width = LONG_TAB_WIDTH;
+                       data.width = tabWidth; // long
                }
                tabButton.setLayoutData(data);
+
                final Composite tempChild = child;
                DACustomButtonClickEventListener buttonListener = new DACustomButtonClickEventListener() {
 
                        @Override
                        public void handleClickEvent(DACustomButton button) {
                                stackLayout.topControl = tempChild;
-                               ((ViewAction) tempChild).updateView();
                                changeButtonLayout(tabButton);
                                tabComposite.layout();
                                contentsComposite.layout();
+                               ((ViewAction) tempChild).updateView();
                        }
                };
                tabButton.addClickListener(buttonListener);
-               getButtons().add(tabButton);
+
+               childrenMap.put(ID, child);
+               buttonMap.put(ID, tabButton);
+               getButtons().add(tabButton); // TODO : think about button map??
                getTabChildren().add(child);
+
+               // default focus set
                if (getTabChildren().size() == 1) {
                        stackLayout.topControl = child;
                        contentsComposite.layout();
@@ -152,6 +170,7 @@ public class DATabComposite extends DAView {
                }
        }
 
+       // dynamic tab size
        private void changeButtonLayout(DACustomButton button) {
                int size = getButtons().size();
                DACustomButton prev = null;
@@ -167,7 +186,7 @@ public class DATabComposite extends DAView {
                                        data.left = new FormAttachment(prev, 0);
                                }
                                if (sample.equals(button)) {
-                                       data.width = LONG_TAB_WIDTH;
+                                       data.width = tabWidth; // long
                                        // button.setColor(DACustomButton.STATE_DISABLE,
                                        // ColorResources.CPU_CIRCULAR_GRAPH_COLOR);
                                        button.setGradationColor(DACustomButton.STATE_DISABLE,
@@ -176,7 +195,7 @@ public class DATabComposite extends DAView {
                                        // button.setDisableColor(ColorResources.CPU_CIRCULAR_GRAPH_COLOR);
                                        button.setEnabled(false);
                                } else {
-                                       data.width = SHORT_TAB_WIDTH;
+                                       data.width = tabWidth; // short
                                        sample.setEnabled(true);
                                }
                                prev = sample;
@@ -204,26 +223,18 @@ public class DATabComposite extends DAView {
                return contentsComposite;
        }
 
-       public void setEnableTab(Composite tab) {
-               int iButton = -1;
-
-               if (null == tab)
+       public void setSelectTab(String ID) {
+               Composite tab = childrenMap.get(ID);
+               DACustomButton button = buttonMap.get(ID);
+               if (null == tab || null == button) {
+                       System.out.println("tab createion bug!!"); // for log
                        return;
-
-               for (int i = 0; i < children.size(); i++) {
-                       if (children.get(i) == tab) {
-                               iButton = i;
-                               break;
-                       }
                }
-               if (-1 != iButton && null != buttons && iButton < buttons.size()) {
-
-                       stackLayout.topControl = tab;
-                       ((ViewAction) tab).updateView();
 
-                       contentsComposite.layout();
-                       changeButtonLayout(buttons.get(iButton));
-               }
+               stackLayout.topControl = tab;
+               ((ViewAction) tab).updateView();
+               contentsComposite.layout();
+               changeButtonLayout(button);
        }
 
        @Override
@@ -233,7 +244,10 @@ public class DATabComposite extends DAView {
 
        @Override
        public void updateLog(LogPackage logPack) {
-               ((ViewAction) stackLayout.topControl).updateLog(logPack);
+               int size = getTabChildren().size();
+               for (int i = 0; i < size; i++) {
+                       ((ViewAction) getTabChildren().get(i)).updateLog(logPack);
+               }
        }
 
        @Override
@@ -246,17 +260,15 @@ public class DATabComposite extends DAView {
 
        @Override
        public void updateView(DASelectionData data) {
-               ((ViewAction) stackLayout.topControl).updateView(data);
+               ((ViewAction) getTopComposite()).updateView(data);
        }
 
-       @Override
-       public void setSourceView(boolean enable) {
-               if (null != children && !children.isEmpty()) {
-                       int size = children.size();
-                       for (int i = 0; i < size; i++) {
-                               ((ViewAction) children.get(i)).setSourceView(enable);
-                       }
-               }
+       public Composite getTopComposite() {
+               return (Composite) stackLayout.topControl;
+       }
+
+       public void setTabWidth(int size) {
+               tabWidth = size;
        }
 
        private PaintListener tabCompositePaintListener = new PaintListener() {
@@ -273,4 +285,8 @@ public class DATabComposite extends DAView {
                        e.gc.drawRectangle(rect);
                }
        };
+
+       public Composite getTab(String ID) {
+               return childrenMap.get(ID);
+       }
 }
index 0e60ceb..5046339 100644 (file)
@@ -50,6 +50,8 @@ import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButton;
 
 public class FindDialog extends DAMessageBox {
 
+       private final int ENTER_KEY_CODE = 13;
+
        private Text textBox = null;
        private DAButton findButton = null;
        private DACustomButton forwardButton = null;
@@ -218,9 +220,7 @@ public class FindDialog extends DAMessageBox {
                @Override
                public void handleClickEvent(DACustomButton button) {
                        findProperty.setLastSearch(textBox.getText());
-                       if (executeFindCommand()) {
-                               result = AnalyzerConstants.SUCCESS;
-                       }
+                       executeFindCommand();
                }
        };
 
@@ -230,6 +230,11 @@ public class FindDialog extends DAMessageBox {
                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);
                        }
index 6e792b8..835352d 100644 (file)
@@ -99,7 +99,6 @@ public abstract class DATableComposite extends Composite {
                table.setItemHeight(16);
 
                table.addSelectionListener(new SelectionListener() {
-
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                GridItem[] ti = ((Grid) e.widget).getSelection();
@@ -153,8 +152,6 @@ public abstract class DATableComposite extends Composite {
                                                                .getShell();
                                                FindDialog dialog = new FindDialog(shell, me);
                                                dialog.open();
-                                               System.out.println("ctrl + f released!!");
-                                               // FIXME: debug
                                        }
                                }
 
@@ -169,6 +166,7 @@ public abstract class DATableComposite extends Composite {
                });
 
                me = this;
+               setTableToolTipListener(new TableTooltipListener(table));
        }
 
        public void setTree(boolean tree) {
@@ -191,6 +189,10 @@ public abstract class DATableComposite extends Composite {
                table.addListener(SWT.MouseDoubleClick, tableListener);
        }
 
+       public void setTableToolTipEnable(boolean enabled) {
+               tableListener.setEnable(enabled);
+       }
+
        public void setColumns(String[] columnNames) {
                int size = columnNames.length;
                for (int i = 0; i < size; i++) {
@@ -330,12 +332,6 @@ public abstract class DATableComposite extends Composite {
                return selectionIndex;
        }
 
-       public void setSourceView(boolean toggle) {
-               if (null != tableListener) {
-                       tableListener.setSourceButtonToggle(toggle);
-               }
-       }
-
        public void clear() {
                getSelectionIndex().clear();
                getSelections().clear();
index 4e4fe8c..bfc18e7 100644 (file)
@@ -175,10 +175,14 @@ public abstract class DATreeComposite extends Composite {
                                if (SWT.CTRL == e.keyCode) {
                                        ctrlPressed = true;
                                }
+                               if (SWT.SPACE == e.keyCode) {
+                                       System.out.println("space pressed");
+                               }
                        }
                });
 
                me = this;
+               setTableToolTipListener(new TableTooltipListener(tree));
        }
 
        public void setTree(boolean tree) {
@@ -230,6 +234,10 @@ public abstract class DATreeComposite extends Composite {
                tree.addListener(SWT.MouseDoubleClick, tableListener);
        }
 
+       public void setTableToolTipEnable(boolean enabled) {
+               tableListener.setEnable(enabled);
+       }
+
        public void setColumns(String[] columnNames) {
                int size = columnNames.length;
                for (int i = 0; i < size; i++) {
@@ -379,32 +387,32 @@ public abstract class DATreeComposite extends Composite {
                List<TreeInput> input = makeTreeInput();
                createTree(input, tree);
 
-//              tree.setSelection(sels);
-                tree.select(sels);
-//             setSelections();
+               // tree.setSelection(sels);
+               tree.select(sels);
+               // setSelections();
        }
 
-//     private void setSelections() {
-//             if (tree.isFocusControl()) {
-//                     GridItem[] items = tree.getItems();
-//                     List<String> selList = getSelList();
-//                     int size = items.length;
-//                     int selSize = selList.size();
-//
-//                     for (int i = 0; i < size; i++) {
-//                             DATableDataFormat tableData = (DATableDataFormat) items[i]
-//                                             .getData();
-//                             String key = tableData.getSelectionKey();
-//
-//                             for (int ii = 0; ii < selSize; ii++) {
-//                                     if (key.equals(selList.get(ii))) {
-//                                             System.out.println("selection " + i + " key " + key);
-//                                             tree.setSelection(i);
-//                                     }
-//                             }
-//                     }
-//             }
-//     }
+       // private void setSelections() {
+       // if (tree.isFocusControl()) {
+       // GridItem[] items = tree.getItems();
+       // List<String> selList = getSelList();
+       // int size = items.length;
+       // int selSize = selList.size();
+       //
+       // for (int i = 0; i < size; i++) {
+       // DATableDataFormat tableData = (DATableDataFormat) items[i]
+       // .getData();
+       // String key = tableData.getSelectionKey();
+       //
+       // for (int ii = 0; ii < selSize; ii++) {
+       // if (key.equals(selList.get(ii))) {
+       // System.out.println("selection " + i + " key " + key);
+       // tree.setSelection(i);
+       // }
+       // }
+       // }
+       // }
+       // }
 
        public abstract List<TreeInput> makeTreeInput();
 
@@ -431,12 +439,6 @@ public abstract class DATreeComposite extends Composite {
                return itemCount;
        }
 
-       public void setSourceView(boolean toggle) {
-               if (null != tableListener) {
-                       tableListener.setSourceButtonToggle(toggle);
-               }
-       }
-
        public void clear() {
                tree.removeAll();
                getSelectionIndex().clear();
@@ -496,8 +498,8 @@ public abstract class DATreeComposite extends Composite {
                                        tree.getVerticalBar().setSelection(
                                                        getScrollSelectionIndex(i));
                                        System.out.println("select : " + i);
-//                                     tree.setSelection(i);
-                                        tree.select(i);
+                                       // tree.setSelection(i);
+                                       tree.select(i);
                                        System.out.println(tree.getSelectionIndex());
                                        updateTree();
                                        return i;
@@ -509,8 +511,8 @@ public abstract class DATreeComposite extends Composite {
                                        tree.getVerticalBar().setSelection(
                                                        getScrollSelectionIndex(i));
                                        System.out.println("select : " + i);
-//                                     tree.setSelection(i);
-                                        tree.select(i);
+                                       // tree.setSelection(i);
+                                       tree.select(i);
                                        System.out.println(tree.getSelectionIndex());
                                        updateTree();
                                        return i;
index e83e6dd..36de0b0 100644 (file)
@@ -95,7 +95,6 @@ public class DAWindowingTableComposite extends Composite {
 
                table.setEmptyColumnHeaderRenderer(new DATableEmptyColumnHeaderRenderer());
                table.setEmptyCellRenderer(new DATableEmptyCellRenderer());
-               tableListener = new TableTooltipListener(table, false);
                setTableToolTipListener(tableListener);
 
                table.setItemHeight(16);
@@ -336,10 +335,6 @@ public class DAWindowingTableComposite extends Composite {
                return itemCount;
        }
 
-       public void setSourceView(boolean toggle) {
-               tableListener.setSourceButtonToggle(toggle);
-       }
-
        private SelectionListener scrollbarSelectionListener = new SelectionListener() {
 
                @Override
index 2cc3e13..a181270 100644 (file)
@@ -36,19 +36,16 @@ import org.eclipse.nebula.widgets.grid.GridItem;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Cursor;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.ScrollBar;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
-import org.tizen.dynamicanalyzer.listeners.TableTooltipListener;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.model.LogCenter;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
-import org.tizen.dynamicanalyzer.resources.ImageResources;
 import org.tizen.dynamicanalyzer.sql.SqlManager;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 import org.tizen.dynamicanalyzer.utils.Formatter;
@@ -61,7 +58,7 @@ public class WindowingTable extends Composite {
        protected int itemCount = 0;
        protected int type = 0;
        protected List<Integer> columnSize;
-       private TableTooltipListener tableListener;
+//     private TableTooltipListener tableListener;
        protected HashMap<String, String> selection;
        protected List<Integer> selectionIndex;
 
@@ -86,23 +83,6 @@ public class WindowingTable extends Composite {
                initTable();
        }
 
-       public void enableViewSource() {
-               tableListener.setSourceButtonToggle(true);
-
-               Cursor cursor = new Cursor(null,
-                               ImageResources.VIEW_SOURCE_CURSOR.getImageData(), 0, 0);
-               table.setCursor(cursor);
-               cursor.dispose();
-       }
-
-       public void disableViewSource() {
-               tableListener.setSourceButtonToggle(false);
-
-               Cursor cursor = new Cursor(null, SWT.CURSOR_ARROW);
-               table.setCursor(cursor);
-               cursor.dispose();
-       }
-
        private void initBaseComposite() {
                comp = new Composite(this, SWT.V_SCROLL);
                comp.setBackground(ColorResources.WHITE);
@@ -174,16 +154,16 @@ public class WindowingTable extends Composite {
                });
 
                // Creates table listener.
-               tableListener = new TableTooltipListener(table, false);
-               // Adds table listener.
-               table.addListener(SWT.Dispose, tableListener);
-               table.addListener(SWT.KeyDown, tableListener);
-               table.addListener(SWT.KeyUp, tableListener);
-               table.addListener(SWT.MouseEnter, tableListener);
-               table.addListener(SWT.MouseExit, tableListener);
-               table.addListener(SWT.MouseMove, tableListener);
-               table.addListener(SWT.MouseHover, tableListener);
-               table.addListener(SWT.MouseDoubleClick, tableListener);
+//             tableListener = new TableTooltipListener(table, false);
+//             // Adds table listener.
+//             table.addListener(SWT.Dispose, tableListener);
+//             table.addListener(SWT.KeyDown, tableListener);
+//             table.addListener(SWT.KeyUp, tableListener);
+//             table.addListener(SWT.MouseEnter, tableListener);
+//             table.addListener(SWT.MouseExit, tableListener);
+//             table.addListener(SWT.MouseMove, tableListener);
+//             table.addListener(SWT.MouseHover, tableListener);
+//             table.addListener(SWT.MouseDoubleClick, tableListener);
 
                table.setItemHeight(AnalyzerUtil.getTableItemHeight(table));
        }
index dd2eba8..eb85d6b 100644 (file)
@@ -60,16 +60,14 @@ import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.handlers.RealtimePerspectiveHandler;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
-import org.tizen.dynamicanalyzer.model.TableInput;
 import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
 import org.tizen.dynamicanalyzer.ui.file.chart.FileChartManager;
 import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackData;
 import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackManager;
 import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit;
 import org.tizen.dynamicanalyzer.ui.page.BaseView;
-import org.tizen.dynamicanalyzer.ui.page.DAEffectFrame;
 import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineComposite;
-import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
+import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite;
 
 public class AnalyzerUtil {
        private static IWorkbenchWindow window = null;
@@ -478,31 +476,15 @@ public class AnalyzerUtil {
        }
 
        /** stop trace -> change page to summary **/
-       public static void changePage(final int nPage) {
+       public static void changePage(final String pageId) {
                final BaseView baseView = (BaseView) AnalyzerUtil.getView(BaseView.ID);
-               final DAEffectFrame mainView = baseView.getMainView();
                Display.getDefault().syncExec(new Runnable() {
                        @Override
                        public void run() {
-                               mainView.setTopComposite(nPage);
-                               ToolbarArea.getInstance().setSelectionTab(nPage);
+                               DATabComposite tabView = baseView.getMainTab();
+                               tabView.setSelectTab(pageId);
                        }
                });
        }
-       
-       public static List<String> difference(ArrayList<String> base, ArrayList<String> target)
-       {
-               @SuppressWarnings("unchecked")
-               ArrayList<String> result = (ArrayList<String>) base.clone();
-               result.removeAll(target);
-               return result;
-       }
-       
-       public static List<TableInput> differenceDepth2(ArrayList<TableInput> base, ArrayList<TableInput> target)
-       {
-               @SuppressWarnings("unchecked")
-               ArrayList<TableInput> result = (ArrayList<TableInput>) base.clone();
-               result.removeAll(target);
-               return result;
-       }
+
 }