[SRADA-824] Support searching to tables on each pages
authorjoon.c.baek <joon.c.baek@samsung.com>
Wed, 22 Jun 2016 10:15:16 +0000 (19:15 +0900)
committerdongkyu6 lee <dongkyu6.lee@samsung.com>
Thu, 23 Jun 2016 02:05:17 +0000 (11:05 +0900)
Support searching dialog to all of tables
on each pages.

Known issues:
'Ctrl+f' doesn't work,
Right side tables doesn't supported,

Change-Id: I294c509a8d95475122eeab0489b88f7676a46f01
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/view/DAPageComposite.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FilePage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/GLPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/BaseView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/TimelinePage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/Toolbar.java

index a8db86d..efe12f9 100644 (file)
@@ -123,6 +123,10 @@ public abstract class DAPageComposite extends DABaseComposite {
                return isToplevel;\r
        }\r
 \r
+       public Composite getTopTable() {\r
+               return null;\r
+       }\r
+\r
        @Override\r
        public void updateView() {\r
                for (Map.Entry<String, DABaseComposite> entry : childMap.entrySet()) {\r
index 788f9dd..3b935f1 100644 (file)
@@ -37,8 +37,10 @@ import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
 import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
 import org.tizen.dynamicanalyzer.ui.file.manager.FileDataManager;
 import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView;
+import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
 import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
 
 public class FilePage extends DAPageComposite {
        // page and view IDs
@@ -51,6 +53,9 @@ public class FilePage extends DAPageComposite {
        SashForm topForm;
        SashForm bottomForm;
 
+       private DATabComposite fileAPITableView = null;
+       private DATabComposite fileDetailTableView = null;
+
        public FilePage(Composite parent, int style) {
                super(parent, style);
                setTitle(AnalyzerLabels.COOLBAR_AREA_FILE);
@@ -79,7 +84,7 @@ public class FilePage extends DAPageComposite {
                bottomRightForm.setForeground(ColorResources.TAB_SELECTED_COLOR_START);
                bottomRightForm.setLayout(new FillLayout());
                
-               DATabComposite fileAPITableView = new DATabComposite(bottomLeftForm, SWT.NONE, false, true);
+               fileAPITableView = new DATabComposite(bottomLeftForm, SWT.NONE, false, true);
                {
                        FileApiListView fileApiListView = new FileApiListView(fileAPITableView.getContentComposite(), SWT.NONE);
                        fileAPITableView.addView(fileApiListView);
@@ -87,7 +92,7 @@ public class FilePage extends DAPageComposite {
                }
                addView(fileAPITableView);
                
-               DATabComposite fileDetailTableView = new DATabComposite(bottomRightForm, SWT.NONE, false, true);
+               fileDetailTableView = new DATabComposite(bottomRightForm, SWT.NONE, false, true);
                {       
                        FileDetailInfoView fileDetailInfoView = new FileDetailInfoView(fileDetailTableView.getContentComposite(), SWT.NONE);
                        fileDetailTableView.addView(fileDetailInfoView);
@@ -106,6 +111,14 @@ public class FilePage extends DAPageComposite {
        }
 
        @Override
+       public Composite getTopTable() {
+               DAViewComposite view = (DAViewComposite)this.fileAPITableView.getTopComposite();
+               Composite comp = (Composite)view.getControl();
+               Logger.debug(comp.toString());
+               return comp;
+       }
+
+       @Override
        protected void onResized(int width, int height) {
                int hrate = (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height);
                baseForm.setWeights(new int[] { 100 - hrate, hrate });
index 1c4c5f9..4c2a847 100644 (file)
@@ -36,8 +36,10 @@ import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
 import org.tizen.dynamicanalyzer.ui.memory.data.HeapDataManager;
 import org.tizen.dynamicanalyzer.ui.memory.data.MemoryDataManager;
 import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView;
+import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
 import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
 
 public class MemoryPage extends DAPageComposite {
        public static final String pageID = MemoryPage.class.getName();
@@ -50,6 +52,8 @@ public class MemoryPage extends DAPageComposite {
        SashForm bottomRightForm;
        SashForm bottomLeftForm;
        
+       private DATabComposite memoryTabView = null;
+
        MemoryChartView memoryChartView;
        MemoryDetailsTableView memoryDetailsTableView;
        MemoryStatisticsTableView memoryStatisticsTableView;
@@ -82,7 +86,7 @@ public class MemoryPage extends DAPageComposite {
                bottomRightForm.setForeground(ColorResources.TAB_SELECTED_COLOR_START);
                bottomRightForm.setLayout(new FillLayout());
                
-               DATabComposite memoryTabView = new DATabComposite(bottomLeftForm, SWT.NONE, false, true);
+               memoryTabView = new DATabComposite(bottomLeftForm, SWT.NONE, false, true);
                {
                        memoryDetailsTableView = new MemoryDetailsTableView(memoryTabView.getContentComposite(), SWT.NONE);
                        memoryTabView.addView(memoryDetailsTableView, false);
@@ -122,6 +126,14 @@ public class MemoryPage extends DAPageComposite {
        }
 
        @Override
+       public Composite getTopTable() {
+               DAViewComposite view = (DAViewComposite)this.memoryTabView.getTopComposite();
+               Composite comp = (Composite)view.getControl();
+               Logger.debug(comp.toString());
+               return comp;
+       }
+
+       @Override
        protected void onResized(int width, int height) {
                int hrate = (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height);
                baseForm.setWeights(new int[] { 100 - hrate, hrate });
index fc606fb..209d800 100644 (file)
@@ -37,8 +37,10 @@ import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
 import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
 import org.tizen.dynamicanalyzer.ui.network.data.NetworkDataManager;
 import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView;
+import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
 import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
 
 public class NetworkPage extends DAPageComposite {
        public static final String pageID = NetworkPage.class.getName();
@@ -47,6 +49,8 @@ public class NetworkPage extends DAPageComposite {
        public static final String detailViewID = NetworkDetailView.class
                        .getName();
 
+       private DATabComposite networkAPITableView = null;
+
        SashForm baseForm;
        SashForm topForm;
        SashForm bottomForm;
@@ -79,7 +83,7 @@ public class NetworkPage extends DAPageComposite {
                bottomRightForm.setForeground(ColorResources.WHITE);
                bottomRightForm.setLayout(new FillLayout());
                
-               DATabComposite networkAPITableView = new DATabComposite(bottomLeftForm, SWT.NONE, false, true);
+               networkAPITableView = new DATabComposite(bottomLeftForm, SWT.NONE, false, true);
                {
                        NetworkAPIListView networkApiListView = new NetworkAPIListView(networkAPITableView.getContentComposite(), SWT.NONE);
                        networkAPITableView.addView(networkApiListView);
@@ -106,6 +110,14 @@ public class NetworkPage extends DAPageComposite {
        }
 
        @Override
+       public Composite getTopTable() {
+               DAViewComposite view = (DAViewComposite)this.networkAPITableView.getTopComposite();
+               Composite comp = (Composite)view.getControl();
+               Logger.debug(comp.toString());
+               return comp;
+       }
+
+       @Override
        protected void onResized(int width, int height) {
                int hrate = (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height);
                baseForm.setWeights(new int[] { 100 - hrate, hrate });
index 050919b..5a039a5 100644 (file)
@@ -44,8 +44,10 @@ import org.tizen.dynamicanalyzer.ui.opengl.table.state.GLRedundantTableView;
 import org.tizen.dynamicanalyzer.ui.opengl.table.state.GLStatisticsTableView;
 import org.tizen.dynamicanalyzer.ui.opengl.table.state.GLTextureTableView;
 import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView;
+import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
 import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 
 public class GLPage extends DAPageComposite {
@@ -64,6 +66,9 @@ public class GLPage extends DAPageComposite {
 
        public static final int RIGHT_TAB_WIDTH = 97;
 
+       private DATabComposite glLeftTableView = null;
+       private DATabComposite glRightTableView = null;
+
        SashForm baseForm;
        SashForm topForm;
        SashForm bottomForm;
@@ -94,7 +99,7 @@ public class GLPage extends DAPageComposite {
                addView(glChartView);
                
                bottomForm = new SashForm(baseForm, SWT.HORIZONTAL);
-               DATabComposite glLeftTableView = new DATabComposite(bottomForm, SWT.NONE, false, true);
+               glLeftTableView = new DATabComposite(bottomForm, SWT.NONE, false, true);
                {
                        GLStatisticsTableView glStatisticsView = new GLStatisticsTableView(glLeftTableView.getContentComposite(), SWT.NONE);
                        glLeftTableView.addView(glStatisticsView);
@@ -106,7 +111,7 @@ public class GLPage extends DAPageComposite {
                }
                addView(glLeftTableView);
                
-               DATabComposite glRightTableView = new DATabComposite(bottomForm, SWT.NONE, false, true);
+               glRightTableView = new DATabComposite(bottomForm, SWT.NONE, false, true);
                {
                        GLRedundantTableView glRedundantView = new GLRedundantTableView(glRightTableView.getContentComposite(), SWT.NONE);
                        glRightTableView.addView(glRedundantView);
@@ -133,6 +138,14 @@ public class GLPage extends DAPageComposite {
        }
 
        @Override
+       public Composite getTopTable() {
+               DAViewComposite view = (DAViewComposite)this.glLeftTableView.getTopComposite();
+               Composite comp = (Composite)view.getControl();
+               Logger.debug(comp.toString());
+               return comp;
+       }
+
+       @Override
        protected void onResized(int width, int height) {
                int hrate = (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height);
                baseForm.setWeights(new int[] { 100 - hrate, hrate });
index b2ed760..fbb2c78 100644 (file)
@@ -207,6 +207,10 @@ public class BaseView extends ViewPart {
                return topComposite;
        }
 
+       public DAPageComposite getTopPage() {
+               return getTopComposite();
+       }
+
        @UIMethod
        public void clear() {
                tabView.clear();
index 17c8fd0..a01d8c0 100644 (file)
@@ -40,8 +40,10 @@ import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
 import org.tizen.dynamicanalyzer.ui.thread.chart.ThreadChartView;
 import org.tizen.dynamicanalyzer.ui.thread.data.ThreadDataManager;
 import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView;
+import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
 import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
 
 public class ThreadPage extends DAPageComposite {
        public static final String pageID = ThreadPage.class.getName();
@@ -49,6 +51,9 @@ public class ThreadPage extends DAPageComposite {
        public static final String listViewID = ThreadAPIListView.class.getName();
        public static final String detailViewID = ThreadDetailInfoView.class.getName();
 
+       private DATabComposite threadApiTableView = null;
+       private DATabComposite threadDetailTableView = null;
+
        SashForm baseForm;
        SashForm topForm;
        SashForm bottomForm;
@@ -81,7 +86,7 @@ public class ThreadPage extends DAPageComposite {
                bottomRightForm.setForeground(ColorResources.TAB_SELECTED_COLOR_START);
                bottomRightForm.setLayout(new FillLayout());
 
-               DATabComposite threadApiTableView = new DATabComposite(bottomLeftForm, SWT.NONE, false, true);
+               threadApiTableView = new DATabComposite(bottomLeftForm, SWT.NONE, false, true);
                {
                        ThreadAPIListView threadAPIListView = new ThreadAPIListView(threadApiTableView.getContentComposite(),
                                        SWT.NONE);
@@ -90,7 +95,7 @@ public class ThreadPage extends DAPageComposite {
                }
                addView(threadApiTableView);
 
-               DATabComposite threadDetailTableView = new DATabComposite(bottomRightForm, SWT.NONE, false, true);
+               threadDetailTableView = new DATabComposite(bottomRightForm, SWT.NONE, false, true);
                {
                        ThreadDetailInfoView threadDetailInfoView = new ThreadDetailInfoView(
                                        threadDetailTableView.getContentComposite(), SWT.NONE);
@@ -110,6 +115,14 @@ public class ThreadPage extends DAPageComposite {
        }
 
        @Override
+       public Composite getTopTable() {
+               DAViewComposite view = (DAViewComposite)this.threadApiTableView.getTopComposite();
+               Composite comp = (Composite)view.getControl();
+               Logger.debug(comp.toString());
+               return comp;
+       }
+
+       @Override
        protected void onResized(int width, int height) {
                int hrate = (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height);
                baseForm.setWeights(new int[] { 100 - hrate, hrate });
index 455cf66..8e9fb0c 100644 (file)
@@ -49,8 +49,10 @@ import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineChartView;
 import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView;
 import org.tizen.dynamicanalyzer.ui.timeline.dlog.DLogDataManager;
 import org.tizen.dynamicanalyzer.ui.toolbar.replay.data.ReplayDataManager;
+import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
 import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
 
 public class TimelinePage extends DAPageComposite {
        public static final String pageID = TimelinePage.class.getName();
@@ -120,6 +122,14 @@ public class TimelinePage extends DAPageComposite {
                DataManagerRegistry.registerPageDataManager(SummaryDataManager.getInstance());
        }
        
+       @Override
+       public Composite getTopTable() {
+               DAViewComposite view= (DAViewComposite)this.timelineTableView.getTopComposite();
+               Composite comp = (Composite)view.getControl();
+               Logger.debug(comp.toString());
+               return comp;
+       }
+
        public TimelineChartView getTimelineChartView() {
                return timelineChartView;
        }
index b8122db..5e1e379 100644 (file)
@@ -84,6 +84,7 @@ import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
 import org.tizen.dynamicanalyzer.ui.toolbar.opentrace.OpenTraceDialog;
 import org.tizen.dynamicanalyzer.ui.toolbar.replayEditor.ReplayEditDialog;
 import org.tizen.dynamicanalyzer.ui.toolbar.setting.PreferencesDialog;
+import org.tizen.dynamicanalyzer.ui.widgets.SearchDialog;
 import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
@@ -541,7 +542,11 @@ public enum Toolbar {
 
                        @Override
                        public void handleClickEvent(DACustomButton button) {
-                               /// Search Event
+                               Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
+                               BaseView baseView = (BaseView)WorkbenchUtil.getViewPart(BaseView.ID);
+                               Composite comp = baseView.getTopPage().getTopTable();
+                               SearchDialog dialog = new SearchDialog(shell, comp);
+                               dialog.open();
                        }
                });
                
@@ -1666,7 +1671,7 @@ public enum Toolbar {
                viewSourceButton.setButtonEnabled(enabled);
                configButton.setButtonEnabled(enabled);
                aboutButton.setButtonEnabled(enabled);
-               searchButton.setButtonEnabled(false);
+               searchButton.setButtonEnabled(enabled);
        }
        
        private void setScreenShotButtonEnable(boolean enabled) {