Common : modify init table to stackLayout
authorheeyoung <heeyoung1008.hwang@samsung.com>
Mon, 14 Sep 2015 10:55:31 +0000 (19:55 +0900)
committerheeyoung <heeyoung1008.hwang@samsung.com>
Mon, 14 Sep 2015 10:55:31 +0000 (19:55 +0900)
when the table is re-created from setting dialog, check current project(application) state

Change-Id: Ib5d8b0f698727d2a7359930f832a3eb8821b2cd5
Signed-off-by: heeyoung <heeyoung1008.hwang@samsung.com>
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/appStartup/AppStartupView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfilingView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/CallTraceView.java

index a872c2b..944f80a 100644 (file)
@@ -32,7 +32,9 @@ 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.common.Global;
 import org.tizen.dynamicanalyzer.nl.InformationViewLabels;
+import org.tizen.dynamicanalyzer.project.Project;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
@@ -66,7 +68,13 @@ public class AppStartupView extends DAViewComposite {
                webTable = new WebAppStartupTable(contents, SWT.NONE, SWT.MULTI 
                                | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
                
-               stackLayout.topControl = nativeTable;
+               // select native or web table
+               Project currentProject = Global.getProject();
+               if (currentProject == null) {
+                       stackLayout.topControl = nativeTable;                   
+               } else {
+                       changeTable(currentProject.isWebApplication());
+               }
                
                // set data manager
                DataManagerRegistry.registerPageDataManager(AppStartupDataManager.getInstance());
index ad0532b..bc7305c 100644 (file)
@@ -32,7 +32,9 @@ import org.eclipse.swt.custom.StackLayout;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
+import org.tizen.dynamicanalyzer.common.Global;
 import org.tizen.dynamicanalyzer.nl.SummaryLabels;
+import org.tizen.dynamicanalyzer.project.Project;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
@@ -63,7 +65,13 @@ public class FunctionUsageProfilingView extends DAViewComposite {
                webTable = new WebProfilingTable(contents, SWT.NONE, SWT.SINGLE
                                | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
                
-               stackLayout.topControl = nativeTable;
+               // select native or web table
+               Project currentProject = Global.getProject();
+               if (currentProject == null) {
+                       stackLayout.topControl = nativeTable;                   
+               } else {
+                       changeTable(currentProject.isWebApplication());
+               }
        }
 
        @Override
index 7216e1e..ba3c646 100644 (file)
@@ -37,8 +37,10 @@ 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.common.Global;
 import org.tizen.dynamicanalyzer.database.SqlConnectionManager;
 import org.tizen.dynamicanalyzer.nl.TimelinePageLabels;
+import org.tizen.dynamicanalyzer.project.Project;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.ui.info.callstack.CallstackView;
 import org.tizen.dynamicanalyzer.ui.interactive.InteractivePage;
@@ -78,7 +80,13 @@ public class CallTraceView extends DAViewComposite {
                webTable = new WebCallTraceTable(contents, SWT.NONE, SWT.MULTI
                                | SWT.BORDER | SWT.FULL_SELECTION);
                
-               stackLayout.topControl = nativeTable;
+               // select native or web table
+               Project currentProject = Global.getProject();
+               if (currentProject == null) {
+                       stackLayout.topControl = nativeTable;                   
+               } else {
+                       changeTable(currentProject.isWebApplication());
+               }
        }
 
        @Override