INTERNAL: refactor clear() function of each page data manager 21/37021/1
authorgreatim <jaewon81.lim@samsung.com>
Wed, 18 Mar 2015 08:15:55 +0000 (17:15 +0900)
committergreatim <jaewon81.lim@samsung.com>
Wed, 18 Mar 2015 08:15:55 +0000 (17:15 +0900)
refactor clear() function of each page data manager and caller of clear()

Change-Id: I57f8cae046d7bba76c20f7712ad0842b780ed845
Signed-off-by: greatim <jaewon81.lim@samsung.com>
26 files changed:
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/PageDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FilePage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/manager/FileDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/screenshot/ScreenshotDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/screenshot/ScreenshotView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/kernel/KernelPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/kernel/data/KernelDataMaker.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkChartView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/data/NetworkDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/data/GLDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/SummaryDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/SummaryPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiDataMaker.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakDataMaker.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfiler.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/chart/ThreadChartView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/data/ThreadDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/data/ThreadLoadDataMaker.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/TimelinePage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/replay/data/ReplayDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/UIPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/control/UIControlListView.java

index 8476130..f2da79d 100755 (executable)
@@ -127,7 +127,6 @@ public class AnalyzerManager {
                swapCallstackManager.clear();
 
                // UserFunctionManager.getInstance().clear();
-               FunctionUsageProfiler.getInstance().clear();
                FunctionUsageProfiler.getInstance().stopNormal();
                ProfilingData.clear(); // reset internal sequence number
                RangeDataManager.getInstance().initRange();
index e20c72b..70428a9 100644 (file)
@@ -141,10 +141,6 @@ public abstract class PageDataManager extends DataThread<LogPackage> {
                pushEOQ_toInserter();
        }
 
-       public void clear() {
-
-       }
-
        protected abstract void makeData(LogPackage pack);
 
        protected void onThreadStop() {
index b5526d3..dc0f4ad 100644 (file)
@@ -108,4 +108,11 @@ public class FilePage extends DAPageComposite {
                baseForm.setWeights(new int[] { 100 - wrate, wrate });
                rightForm.setWeights(new int[] { hrate, 100 - hrate });
        }
+       
+       @Override
+       public void clear() {
+               super.clear();
+               
+               FileDataManager.getInstance().clear();
+       }
 }
index 7a27382..100101e 100644 (file)
@@ -82,10 +82,6 @@ public class FileDataManager extends PageDataManager {
        }
        
        public void clear() {
-               accessDB = null;
-               apiDB = null;
-               statusDB = null;
-               accessorDB = null;
                selectedData = null;
        }
        
index a153eed..f8323ec 100644 (file)
@@ -76,6 +76,10 @@ public class ScreenshotDataManager extends PageDataManager {
                }
                return instance;
        }
+       
+       public void clear() {
+               // do nothing
+       }
 
        public List<Long> getLastCpuRate() {
                return lastCpuRate;
index 1bc3639..1d16453 100644 (file)
@@ -436,6 +436,7 @@ public class ScreenshotView extends DAViewComposite {
 
        @Override
        public void clear() {
+               dataManager.clear();
                cpuUsage.clear();
                maxMem = 100;
                processMem = 0;
index 80fa285..9a9eabc 100755 (executable)
@@ -40,16 +40,11 @@ import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
 
 public class KernelPage extends DAPageComposite {
        public static final String pageID = KernelPage.class.getName();
-       public static final String contextViewID = ContextSwitchingChartView.class
-                       .getName();
+       public static final String contextViewID = ContextSwitchingChartView.class.getName();
        public static final String callflowTabID = "CallFlowTab.id";
-       public static final String callflowViewID = CallFlowChartView.class
-                       .getName();
+       public static final String callflowViewID = CallFlowChartView.class.getName();
        public static final String listViewID = KernelListView.class.getName();
-       public static final String statViewID = KernelStatisticInfoView.class
-                       .getName();
-
-       private KernelDataManager kdataManager;
+       public static final String statViewID = KernelStatisticInfoView.class.getName();
 
        SashForm baseForm;
        SashForm leftForm;
@@ -57,52 +52,48 @@ public class KernelPage extends DAPageComposite {
 
        public KernelPage(Composite parent, int style) {
                super(parent, style);
-               kdataManager = KernelDataManager.getInstance();
 
                setTitle(AnalyzerLabels.COOLBAR_AREA_KERNEL);
-               this.setData(DAPageComposite.KEY_TOOLTIP,
-                               ShortCutManager.COOLBAR_AREA_KERNEL_TOOLTIP);
+               this.setData(DAPageComposite.KEY_TOOLTIP, ShortCutManager.COOLBAR_AREA_KERNEL_TOOLTIP);
                this.setLayout(new FillLayout());
 
                baseForm = new SashForm(this, SWT.HORIZONTAL);
                baseForm.setLayout(new FillLayout());
 
                leftForm = new SashForm(baseForm, SWT.VERTICAL);
-               ContextSwitchingChartView kernelChartView = new ContextSwitchingChartView(
-                               leftForm, SWT.NONE);
+               ContextSwitchingChartView kernelChartView = new ContextSwitchingChartView(leftForm,
+                               SWT.NONE);
                addView(kernelChartView);
-               DATabComposite lefttabView = new DATabComposite(leftForm,
-                               SWT.NONE, false);
+               DATabComposite lefttabView = new DATabComposite(leftForm, SWT.NONE, false);
                addView(callflowTabID, lefttabView);
                {
                        CallFlowChartView callflowView = new CallFlowChartView(
                                        lefttabView.getContentComposite(), SWT.NONE);
                        lefttabView.addView(callflowView, false);
 
-                       KernelListView kernelListView = new KernelListView(
-                                       lefttabView.getContentComposite(), SWT.NONE);
+                       KernelListView kernelListView = new KernelListView(lefttabView.getContentComposite(),
+                                       SWT.NONE);
                        lefttabView.addView(kernelListView, false);
                }
 
                leftForm.setWeights(new int[] { 60, 40 });
 
                rightForm = new SashForm(baseForm, SWT.VERTICAL);
-               ScreenshotTabComposite tabView = new ScreenshotTabComposite(rightForm,
-                               SWT.NONE, KernelPage.pageID);
+               ScreenshotTabComposite tabView = new ScreenshotTabComposite(rightForm, SWT.NONE,
+                               KernelPage.pageID);
                tabView.setObservingViews(ScreenshotTabComposite.screenshotViewID,
                                new String[] { KernelPage.listViewID });
                tabView.setObservingViews(ScreenshotTabComposite.callstackViewID,
                                new String[] { KernelPage.listViewID });
                addView(tabView);
 
-               KernelStatisticInfoView statInfo = new KernelStatisticInfoView(
-                               rightForm, SWT.NONE);
+               KernelStatisticInfoView statInfo = new KernelStatisticInfoView(rightForm, SWT.NONE);
                addView(statInfo);
 
                rightForm.setWeights(new int[] { 50, 50 });
                baseForm.setWeights(new int[] { 75, 25 });
-               
-               DataManagerRegistry.registerPageDataManager(kdataManager);
+
+               DataManagerRegistry.registerPageDataManager(KernelDataManager.getInstance());
        }
 
        @Override
@@ -123,7 +114,6 @@ public class KernelPage extends DAPageComposite {
        @Override
        public void clear() {
                super.clear();
-               if (kdataManager != null)
-                       kdataManager.clear();
+               KernelDataManager.getInstance().clear();
        }
 }
index af14ca7..9354b6d 100755 (executable)
@@ -55,19 +55,14 @@ public class KernelDataMaker {
 
        // 'threads' may be necessary to synchronize but i didn't
        // because i think that it does not make critical error
-       private ArrayList<KernelDataPerThread> threads;
+       private List<KernelDataPerThread> threads;
 
-       private ArrayList<List<Object>> contextDataList;
-       private ArrayList<List<Object>> functionDataList;
        private DBInserter contextDBInserter = null;
        private DBInserter functionDBInserter = null;
 
        public KernelDataMaker(DBInserter cDBInserter, DBInserter fDBInserter) {
                threads = new ArrayList<KernelDataPerThread>();
 
-               contextDataList = new ArrayList<List<Object>>();
-               functionDataList = new ArrayList<List<Object>>();
-               
                contextDBInserter = cDBInserter;
                functionDBInserter = fDBInserter;
        }
@@ -89,6 +84,9 @@ public class KernelDataMaker {
                Stack<ProfileData> prefunc;
                Stack<Integer> prefunc_type;
 
+               List<List<Object>> contextDataList = new ArrayList<List<Object>>();
+               List<List<Object>> functionDataList = new ArrayList<List<Object>>();
+
                int size = inputs.size();
                for (int i = 0; i < size; i++) {
                        LogData input = (LogData) inputs.get(i);
@@ -292,22 +290,17 @@ public class KernelDataMaker {
                        }
                }
 
-               @SuppressWarnings("unchecked")
-               List<List<Object>> clist = (List<List<Object>>) contextDataList.clone();
-               contextDataList.clear();
-
-               @SuppressWarnings("unchecked")
-               List<List<Object>> flist = (List<List<Object>>) functionDataList.clone();
-               functionDataList.clear();
+               if (!contextDataList.isEmpty()) {
+                       contextDBInserter.pushData(contextDataList);
+               }
 
-               contextDBInserter.pushData(clist);
-               functionDBInserter.pushData(flist);
+               if (!functionDataList.isEmpty()) {
+                       functionDBInserter.pushData(functionDataList);
+               }
        }
 
        public void clear() {
                threads.clear();
-               contextDataList.clear();
-               functionDataList.clear();
        }
 
        public List<List<Object>> getContextDataFromDB(long start, long end) {
index f582268..10c50b7 100644 (file)
@@ -185,7 +185,6 @@ public class NetworkChartView extends DAViewComposite {
        @Override
        public void clear() {
                networkChartBoard.clear();
-               NetworkDataManager.getInstance().clear();
        }
 
        @Override
index 1044d48..1db2df4 100644 (file)
@@ -107,4 +107,11 @@ public class NetworkPage extends DAPageComposite {
                baseForm.setWeights(new int[] { 100 - wrate, wrate });
                rightForm.setWeights(new int[] { hrate, 100 - hrate });
        }
+       
+       @Override
+       public void clear() {
+               super.clear();
+               
+               NetworkDataManager.getInstance().clear();
+       }
 }
index eadb800..d116aff 100644 (file)
@@ -125,24 +125,6 @@ public class NetworkDataManager extends PageDataManager {
        }
 
        public void saveData(Map<String, String> dataMap) {
-               stopProcess();
-       }
-
-       public void openData(Map<String, String> dataMap) {
-               openProcess();
-       }
-
-       public void openProcess() {
-               // set series list from DB
-               if (null == seriesList) {
-                       return;
-               }
-               if (seriesList.size() == 0) {
-                       seriesList = seriesDBManager.select(0, MAX_CHART_TIME);
-               }
-       }
-
-       public void stopProcess() {
                if (null == seriesList || null == seriesDBManager) {
                        return;
                }
@@ -154,8 +136,14 @@ public class NetworkDataManager extends PageDataManager {
                }
        }
 
-       @Override
-       protected void onThreadStop() {
+       public void openData(Map<String, String> dataMap) {
+               // set series list from DB
+               if (null == seriesList) {
+                       return;
+               }
+               if (seriesList.size() == 0) {
+                       seriesList = seriesDBManager.select(0, MAX_CHART_TIME);
+               }
        }
 
        public List<NetworkSeriesType> getSeriesList() {
index 5abb548..89331cc 100644 (file)
@@ -123,14 +123,14 @@ public class GLDataManager extends PageDataManager {
        }
 
        public void saveData(Map<String, String> dataMap) {
-               stopProcess();
+               if (null != stateDataManager) {
+                       stateProgramDBTable.insertProgramData();
+                       stateTextureDBTable.insertTextureData();
+                       statisticsDataManger.insertRedundantData();
+               }
        }
 
        public void openData(Map<String, String> dataMap) {
-               openProcess();
-       }
-
-       public void openProcess() {
                if (null != stateDataManager) {
                        updateFrameTimeChartEndTimeAtOpen();
                        stateProgramDBTable.initProgramDataAtOpen();
@@ -140,19 +140,6 @@ public class GLDataManager extends PageDataManager {
                }
        }
 
-       public void stopProcess() {
-               if (null != stateDataManager) {
-                       stateProgramDBTable.insertProgramData();
-                       stateTextureDBTable.insertTextureData();
-                       statisticsDataManger.insertRedundantData();
-               }
-       }
-
-       @Override
-       protected void onThreadStop() {
-
-       }
-
        @Override
        protected void makeData(LogPackage pack) {
                Logs glesLogs = pack.getLogs(DataChannelConstants.MSG_PROBE_GLES20);
index b295759..deac92a 100644 (file)
@@ -68,8 +68,7 @@ public class SummaryDataManager extends PageDataManager {
 
                leakDataMaker = new LeakDataMaker(makeInserter(memoryAllocationDataTable),
                                makeInserter(freeDataTable));
-               failedApiDataMaker = new FailedApiDataMaker(
-                               makeInserter(failedApiDataTable));
+               failedApiDataMaker = new FailedApiDataMaker(makeInserter(failedApiDataTable));
                warningDataMaker = new WarningDataMaker(warningDataDBTable);
        }
 
@@ -114,6 +113,7 @@ public class SummaryDataManager extends PageDataManager {
 
        public void clear() {
                leakDataMaker.clear();
+               failedApiDataMaker.clear();
                warningDataMaker.clear();
        }
 
@@ -151,7 +151,7 @@ public class SummaryDataManager extends PageDataManager {
                        CurrentLeakData newLeakData = new CurrentLeakData(seqNum, allocValue, pid);
                        leakDetector.addCurrentLeakData(newLeakData);
                }
-               
+
                warningDataMaker.selectDBWhenOpen();
        }
 }
index 97efc10..d04d9f1 100644 (file)
@@ -48,12 +48,9 @@ public class SummaryPage extends DAPageComposite {
        public static final String pageID = SummaryPage.class.getName();
        public static final String failedViewID = FailedApiListView.class.getName();
        public static final String leakViewID = LeakView.class.getName();
-       public static final String profilingViewID = FunctionUsageProfilingView.class
-                       .getName();
-       public static final String warningListViewID = WarningListView.class
-                       .getName();
-       public static final String warningDetailViewID = WarningDetailView.class
-                       .getName();
+       public static final String profilingViewID = FunctionUsageProfilingView.class.getName();
+       public static final String warningListViewID = WarningListView.class.getName();
+       public static final String warningDetailViewID = WarningDetailView.class.getName();
 
        public final static int FAILED_APILIST_VIEW_INDEX = 0;
        public final static int LEAK_VIEW_INDEX = 1;
@@ -61,8 +58,6 @@ public class SummaryPage extends DAPageComposite {
        public final static int FUNCTION_PROFILING_VIEW_INDEX = 3;
        public final static int WARNING_VIEW_INDEX = 4;
        public final static int WARNING_VIEW_DETAIL_INDEX = 5;
-       
-       private SummaryDataManager summaryDataManager;
 
        SashForm upperForm;
        SashForm bottomForm;
@@ -71,12 +66,9 @@ public class SummaryPage extends DAPageComposite {
 
        public SummaryPage(Composite parent, int style) {
                super(parent, style);
-               
-               summaryDataManager = SummaryDataManager.getInstance();
-               
+
                setTitle(AnalyzerLabels.COOLBAR_AREA_SUMMARY);
-               this.setData(DAPageComposite.KEY_TOOLTIP,
-                               ShortCutManager.COOLBAR_AREA_SUMMARY_TOOLTIP);
+               this.setData(DAPageComposite.KEY_TOOLTIP, ShortCutManager.COOLBAR_AREA_SUMMARY_TOOLTIP);
                this.setLayout(new FillLayout());
 
                baseForm = new SashForm(this, SWT.VERTICAL);
@@ -85,8 +77,7 @@ public class SummaryPage extends DAPageComposite {
                upperForm = new SashForm(baseForm, SWT.HORIZONTAL);
 
                // FAILED_APILIST_VIEW_INDEX = 0;
-               FailedApiListView failedApiListView = new FailedApiListView(upperForm,
-                               SWT.NONE);
+               FailedApiListView failedApiListView = new FailedApiListView(upperForm, SWT.NONE);
                addView(failedApiListView);
 
                // LEAK_VIEW_INDEX = 1;
@@ -94,14 +85,12 @@ public class SummaryPage extends DAPageComposite {
                addView(leakView);
 
                // INFO_VIEW_INDEX = 2;
-               ScreenshotTabComposite tabView = new ScreenshotTabComposite(upperForm,
-                               SWT.NONE, SummaryPage.pageID);
-               tabView.setObservingViews(ScreenshotTabComposite.screenshotViewID,
-                               new String[] { SummaryPage.failedViewID,
-                                               SummaryPage.leakViewID, SummaryPage.warningListViewID });
-               tabView.setObservingViews(ScreenshotTabComposite.callstackViewID,
-                               new String[] { SummaryPage.failedViewID,
-                                               SummaryPage.leakViewID, SummaryPage.warningListViewID });
+               ScreenshotTabComposite tabView = new ScreenshotTabComposite(upperForm, SWT.NONE,
+                               SummaryPage.pageID);
+               tabView.setObservingViews(ScreenshotTabComposite.screenshotViewID, new String[] {
+                               SummaryPage.failedViewID, SummaryPage.leakViewID, SummaryPage.warningListViewID });
+               tabView.setObservingViews(ScreenshotTabComposite.callstackViewID, new String[] {
+                               SummaryPage.failedViewID, SummaryPage.leakViewID, SummaryPage.warningListViewID });
                addView(tabView);
 
                upperForm.setWeights(new int[] { 37, 40, 23 });
@@ -116,13 +105,11 @@ public class SummaryPage extends DAPageComposite {
                bottomForm.setWeights(new int[] { 70, 30 });
 
                // WARNING_VIEW_INDEX = 4;
-               WarningListView warningListView = new WarningListView(warningForm,
-                               SWT.NONE);
+               WarningListView warningListView = new WarningListView(warningForm, SWT.NONE);
                addView(warningListView);
 
                // WARNING_VIEW_DETAIL_INDEX = 5;
-               WarningDetailView warningDetailView = new WarningDetailView(
-                               warningForm, SWT.NONE);
+               WarningDetailView warningDetailView = new WarningDetailView(warningForm, SWT.NONE);
                addView(warningDetailView);
                warningForm.setWeights(new int[] { 70, 30 });
 
@@ -131,9 +118,8 @@ public class SummaryPage extends DAPageComposite {
                upperForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
                warningForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
 
-               DataManagerRegistry.registerPageDataManager(FunctionUsageProfiler
-                               .getInstance());
-               DataManagerRegistry.registerPageDataManager(summaryDataManager);
+               DataManagerRegistry.registerPageDataManager(FunctionUsageProfiler.getInstance());
+               DataManagerRegistry.registerPageDataManager(SummaryDataManager.getInstance());
        }
 
        @Override
@@ -150,11 +136,12 @@ public class SummaryPage extends DAPageComposite {
                upperForm.setWeights(new int[] { 37, 100 - 37 - wrate, wrate });
                baseForm.setWeights(new int[] { hrate, 100 - hrate });
        }
-       
+
        @Override
        public void clear() {
                super.clear();
-               if (summaryDataManager != null) 
-                       summaryDataManager.clear();
+
+               FunctionUsageProfiler.getInstance().clear();
+               SummaryDataManager.getInstance().clear();
        }
 }
index f454307..54aadb9 100644 (file)
@@ -41,25 +41,24 @@ import org.tizen.dynamicanalyzer.util.Logger;
 
 public class FailedApiDataMaker {
        private static final String query_withTime = "where %s >= %s and %s <= %s order by %s";
-       
-       private ArrayList<List<Object>> failedApiDataList;
-       
+
        private DBInserter failedAPI_DBInserter = null;
-       
+
        public FailedApiDataMaker(DBInserter inserter) {
-               failedApiDataList = new ArrayList<List<Object>>();
                failedAPI_DBInserter = inserter;
        }
-       
+
        public void makeData(List<LogData> inputs) {
+               List<List<Object>> failedApiDataList = new ArrayList<List<Object>>();
+
                int size = inputs.size();
                for (int i = 0; i < size; i++) {
                        LogData input = (LogData) inputs.get(i);
                        ProbeCommonData pData = (ProbeCommonData) input;
-                       
+
                        if (failChecker(pData)) {
                                ArrayList<Object> dbFailedData = new ArrayList<Object>();
-                               
+
                                dbFailedData.add(Long.valueOf(pData.getSeq()));
                                dbFailedData.add(Integer.valueOf(pData.getApiId()));
                                dbFailedData.add(Integer.valueOf(pData.getPid()));
@@ -70,26 +69,23 @@ public class FailedApiDataMaker {
                                dbFailedData.add(Long.valueOf(pData.getCallerPcAddr()));
                                dbFailedData.add(String.valueOf(pData.getLibName()));
                                dbFailedData.add(Integer.valueOf(pData.getMsgID()));
-                               
+
                                failedApiDataList.add(dbFailedData);
                        }
                }
-               
+
                if (failedApiDataList.size() > 0) {
-                       @SuppressWarnings("unchecked")
-                       List<List<Object>> fList = (List<List<Object>>) failedApiDataList.clone();
-                       failedApiDataList.clear();
-                       
-                       failedAPI_DBInserter.pushData(fList);
+                       failedAPI_DBInserter.pushData(failedApiDataList);
                }
        }
-       
+
        public void makeData(LogData input) {
                ProbeCommonData pData = (ProbeCommonData) input;
-               
+
                if (failChecker(pData)) {
-                       ArrayList<Object> dbFailedData = new ArrayList<Object>();
-                       
+                       List<List<Object>> failedApiDataList = new ArrayList<List<Object>>();
+                       List<Object> dbFailedData = new ArrayList<Object>();
+
                        dbFailedData.add(Long.valueOf(pData.getSeq()));
                        dbFailedData.add(Integer.valueOf(pData.getApiId()));
                        dbFailedData.add(Integer.valueOf(pData.getPid()));
@@ -100,17 +96,13 @@ public class FailedApiDataMaker {
                        dbFailedData.add(Long.valueOf(pData.getCallerPcAddr()));
                        dbFailedData.add(String.valueOf(pData.getLibName()));
                        dbFailedData.add(Integer.valueOf(pData.getMsgID()));
-                       
+
                        failedApiDataList.add(dbFailedData);
-                       
-                       @SuppressWarnings("unchecked")
-                       List<List<Object>> mList = (List<List<Object>>) failedApiDataList.clone();
-                       failedApiDataList.clear();
-                       
-                       failedAPI_DBInserter.pushData(mList);
+
+                       failedAPI_DBInserter.pushData(failedApiDataList);
                }
        }
-       
+
        private boolean failChecker(ProbeCommonData log) {
                if (log.isInternal()) {
                        return false;
@@ -118,11 +110,11 @@ public class FailedApiDataMaker {
                        return true;
                }
        }
-       
+
        public void clear() {
-               failedApiDataList.clear();
+               // do nothing
        }
-       
+
        public List<List<Object>> getFailedApiDataFromDB() {
                DBTable table = SummaryDataManager.getInstance().getFailedApiDataDBTable();
                List<String> columns = new ArrayList<String>();
@@ -136,7 +128,7 @@ public class FailedApiDataMaker {
                columns.add(FailedApiDataDBTable.CALLER_PC_ADDRESS);
                columns.add(FailedApiDataDBTable.CALLER_LIBRARY_NAME);
                columns.add(FailedApiDataDBTable.MESSAGE_ID);
-               
+
                return table.selectData(columns, null, new IResultSet() {
                        @Override
                        public List<Object> extractDataFromResultSet(ResultSet rs) {
@@ -156,16 +148,16 @@ public class FailedApiDataMaker {
                                        Logger.exception(e);
                                        return null;
                                }
-                               
+
                                return row;
                        }
                });
        }
-       
+
        public List<List<Object>> getFailedApiDataFromDBForRange(Long startTime, Long endTime) {
                String where = String.format(query_withTime, FailedApiDataDBTable.START_TIME,
-                               startTime.toString(), FailedApiDataDBTable.START_TIME,
-                               endTime.toString(), FailedApiDataDBTable.START_TIME);
+                               startTime.toString(), FailedApiDataDBTable.START_TIME, endTime.toString(),
+                               FailedApiDataDBTable.START_TIME);
                DBTable table = SummaryDataManager.getInstance().getFailedApiDataDBTable();
                List<String> columns = new ArrayList<String>();
                columns.add(FailedApiDataDBTable.SEQUENCE_NUMBER);
@@ -178,7 +170,7 @@ public class FailedApiDataMaker {
                columns.add(FailedApiDataDBTable.CALLER_PC_ADDRESS);
                columns.add(FailedApiDataDBTable.CALLER_LIBRARY_NAME);
                columns.add(FailedApiDataDBTable.MESSAGE_ID);
-               
+
                return table.selectData(columns, where, new IResultSet() {
                        @Override
                        public List<Object> extractDataFromResultSet(ResultSet rs) {
@@ -198,7 +190,7 @@ public class FailedApiDataMaker {
                                        Logger.exception(e);
                                        return null;
                                }
-                               
+
                                return row;
                        }
                });
index 91aa813..083b122 100644 (file)
@@ -52,19 +52,17 @@ public class LeakDataMaker {
 
        private ArrayList<List<Object>> memoryAllocDataList;
        private ArrayList<List<Object>> freeDataList;
-       private ArrayList<List<Object>> leakDataList;
        private List<List<Object>> rangeDataList;
        private NewLeakDetector leakDetector = AnalyzerManager.getNewLeakDetector();
-       
+
        private DBInserter allocDBInserter = null;
        private DBInserter freeDBInserter = null;
 
        public LeakDataMaker(DBInserter alloc_inserter, DBInserter free_inserter) {
                memoryAllocDataList = new ArrayList<List<Object>>();
                freeDataList = new ArrayList<List<Object>>();
-               leakDataList = new ArrayList<List<Object>>();
                rangeDataList = new ArrayList<List<Object>>();
-               
+
                allocDBInserter = alloc_inserter;
                freeDBInserter = free_inserter;
        }
@@ -73,8 +71,10 @@ public class LeakDataMaker {
                int size = inputs.size();
                for (int i = 0; i < size; i++) {
                        LogData input = (LogData) inputs.get(i);
-                       if (input == null)      continue;
-                       if (isHeapMemoryOverflow())     break;
+                       if (input == null)
+                               continue;
+                       if (isHeapMemoryOverflow())
+                               break;
                        switch (leakDetector.runLeakDetect(input)) {
                        case LogCenterConstants.MEMORY_API_ALLOC: // alloc, realloc
                                makeAllocData(input);
@@ -107,16 +107,24 @@ public class LeakDataMaker {
 
        public void makeData() {
                Map<Integer, CurrentLeakData> leaks = leakDetector.getLeakHash();
+               List<List<Object>> leakDataList = new ArrayList<List<Object>>();
+
                for (Integer key : leaks.keySet()) {
-                       makeLeakData(leaks.get(key));
+                       CurrentLeakData input = leaks.get(key);
+                       if (input == null) {
+                               continue;
+                       }
+
+                       List<Object> dbLeakData = new ArrayList<Object>();
+                       dbLeakData.add(Long.valueOf(input.getSequenceNumber()));
+                       dbLeakData.add(Long.valueOf(input.getAllocatedValue()));
+                       dbLeakData.add(Integer.valueOf(input.getPid()));
+
+                       leakDataList.add(dbLeakData);
                }
 
                if (leakDataList.size() > 0) {
-                       @SuppressWarnings("unchecked")
-                       List<List<Object>> lList = (List<List<Object>>) leakDataList.clone();
-                       leakDataList.clear();
-
-                       SummaryDataManager.getInstance().getLeakDataDBTable().insertData(lList);
+                       SummaryDataManager.getInstance().getLeakDataDBTable().insertData(leakDataList);
                }
        }
 
@@ -180,18 +188,6 @@ public class LeakDataMaker {
                freeDataList.add(dbFreeData);
        }
 
-       public void makeLeakData(CurrentLeakData input) {
-               ArrayList<Object> dbLeakData = new ArrayList<Object>();
-
-               if (input == null)
-                       return;
-               dbLeakData.add(Long.valueOf(input.getSequenceNumber()));
-               dbLeakData.add(Long.valueOf(input.getAllocatedValue()));
-               dbLeakData.add(Integer.valueOf(input.getPid()));
-
-               leakDataList.add(dbLeakData);
-       }
-
        public void clear() {
                memoryAllocDataList.clear();
                freeDataList.clear();
index 658c2b3..b78477b 100644 (file)
@@ -60,24 +60,24 @@ public class FunctionUsageProfiler extends PageDataManager {
 
        private static FunctionUsageProfiler instance = null;
        private boolean isSetSamplePeriod = false;
-       
+
        private ProfilingDataDBTable profilingDataTable = null;
        private ProfilingChildDataDBTable profilingChildDataTable = null;
        private FunctionSampleDBTable functionSampleTable = null;
-       
+
        private HashMap<Integer, ProfileDataMaker> profileDataMakerMap = null;
-       
+
        private long lastSampleSeq = -1;
        private Object sampleSeqLock = new Object();
-       
+
        public void setLastSampleSeq(long seq) {
-               synchronized(sampleSeqLock) {
+               synchronized (sampleSeqLock) {
                        lastSampleSeq = seq;
                }
        }
-       
+
        public long getLastSampleSeq() {
-               synchronized(sampleSeqLock) {
+               synchronized (sampleSeqLock) {
                        return lastSampleSeq;
                }
        }
@@ -87,22 +87,22 @@ public class FunctionUsageProfiler extends PageDataManager {
                profilingChildDataTable = new ProfilingChildDataDBTable();
                functionSampleTable = new FunctionSampleDBTable();
        }
-       
+
        public ProfilingDataDBTable getProfilingDataTable() {
                return profilingDataTable;
        }
-       
+
        public ProfilingChildDataDBTable getProfilingChildDataTable() {
                return profilingChildDataTable;
        }
-       
+
        public FunctionSampleDBTable getFunctionSampleTable() {
                return functionSampleTable;
-       }       
-       
+       }
+
        /**
-        * key: symbol(child) or file path (parent) - value : ID of
-        * profiling data. all parent and child data is in
+        * key: symbol(child) or file path (parent) - value : ID of profiling data. all parent and child
+        * data is in
         */
 
        public List<Integer> getPidsOfProfileDataMakerMap() {
@@ -121,8 +121,7 @@ public class FunctionUsageProfiler extends PageDataManager {
        public ProfileDataMaker getProfileDataMakerByPid(int pid) {
                ProfileDataMaker profileDataMaker = getProfileDataMakerMap().get(pid);
                if (null == profileDataMaker) {
-                       profileDataMaker = new ProfileDataMaker(
-                                       AnalyzerManager.getCallstackManager());
+                       profileDataMaker = new ProfileDataMaker(AnalyzerManager.getCallstackManager());
                        profileDataMaker.setPid(pid);
                        getProfileDataMakerMap().put(pid, profileDataMaker);
                }
@@ -137,19 +136,19 @@ public class FunctionUsageProfiler extends PageDataManager {
        }
 
        public void clear() {
+               lastSampleSeq = -1;
                isSetSamplePeriod = false;
                if (profileDataMakerMap != null) {
-                       profileDataMakerMap.clear();                    
+                       profileDataMakerMap.clear();
                }
        }
-       
+
        public void saveProfilingData() {
                List<Integer> pids = getPidsOfProfileDataMakerMap();
                int size = pids.size();
                for (int i = 0; i < size; i++) {
                        ProfileDataMaker profiler = getProfileDataMakerByPid(pids.get(i));
-                       Map<Integer, ProfilingData> profilingDataMap = profiler
-                                       .getProfilingDataMap();
+                       Map<Integer, ProfilingData> profilingDataMap = profiler.getProfilingDataMap();
                        List<ProfilingData> pDataList = new ArrayList<ProfilingData>();
                        pDataList.addAll(profilingDataMap.values());
 
@@ -159,8 +158,8 @@ public class FunctionUsageProfiler extends PageDataManager {
                        for (int j = 0; j < count; j++) {
                                List<Object> insertRowData = new ArrayList<Object>();
                                ProfilingData pData = pDataList.get(j);
-                               
-                               try {                           
+
+                               try {
                                        insertRowData.add(new Integer(pData.getProfilingDataID()));
                                        String key = pData.getKey();
                                        byte type;
@@ -182,7 +181,7 @@ public class FunctionUsageProfiler extends PageDataManager {
                                                                .getBinaryInfo(pData.getName());
                                                insertRowData.add(new Integer(binInfo.getID()));
                                        } else { // function
-                                               insertRowData.add(new Integer(pData.getFunctionId()));                                          
+                                               insertRowData.add(new Integer(pData.getFunctionId()));
                                                insertRowData.add(new Integer(-1)); // -1 for null library path
                                        }
                                        insertRowData.add(new Integer(pids.get(i)));
@@ -190,10 +189,10 @@ public class FunctionUsageProfiler extends PageDataManager {
                                        insertRowData.add(new Integer(pData.getInCount()));
                                        insertRowData.add(new Integer(pData.getCallCount()));
                                        insertRowData.add(new Long(pData.getElapsedTime()));
-                                       insertRowData.add(new Long(pData.getExclusiveElapsedTime()));                           
+                                       insertRowData.add(new Long(pData.getExclusiveElapsedTime()));
                                } catch (ArrayIndexOutOfBoundsException e) {
                                        Logger.exception(e);
-                               }                               
+                               }
                                insertData.add(insertRowData);
                        }
                        if (insertData.size() > 0) {
@@ -207,8 +206,7 @@ public class FunctionUsageProfiler extends PageDataManager {
                int size = pids.size();
                for (int i = 0; i < size; i++) {
                        ProfileDataMaker profiler = getProfileDataMakerByPid(pids.get(i));
-                       Map<String, ProfilingChildData> profilingDataMap = profiler
-                                       .getChildListMap();
+                       Map<String, ProfilingChildData> profilingDataMap = profiler.getChildListMap();
                        List<ProfilingChildData> pDataList = new ArrayList<ProfilingChildData>();
                        pDataList.addAll(profilingDataMap.values());
 
@@ -218,7 +216,7 @@ public class FunctionUsageProfiler extends PageDataManager {
                                ProfilingChildData data = pDataList.get(j);
                                List<Integer> childList = data.getChildren();
                                try {
-                                       List<Object> insertRowData = new ArrayList<Object>();                                           
+                                       List<Object> insertRowData = new ArrayList<Object>();
                                        insertRowData.add(Integer.valueOf(data.getProfilingDataID()));
                                        insertRowData.add(new Integer(data.getPid()));
                                        insertRowData.add(childList);
@@ -236,39 +234,39 @@ public class FunctionUsageProfiler extends PageDataManager {
        @Override
        protected void makeData(LogPackage pack) {
                TargetData target = SettingDataManager.getInstance().getConnectedTarget();
-               
+
                // TODO: will get sample_time from Project.java
                if (!isSetSamplePeriod) {
-                       SAMPLE_TIME = target.getSelectedFeatureValue(
-                                       SettingConstants.FEATURE_NAME_INDEX_FUNCTION_PROFILING_SAMPLING_RATE);
+                       SAMPLE_TIME = target
+                                       .getSelectedFeatureValue(SettingConstants.FEATURE_NAME_INDEX_FUNCTION_PROFILING_SAMPLING_RATE);
                        if (SAMPLE_TIME < 0) {
-                               SAMPLE_TIME = SettingDataManager.getInstance().getFeatureData(
-                                               SettingConstants.FEATURE_NAME_INDEX_FUNCTION_PROFILING_SAMPLING_RATE).getDefaultValue();
+                               SAMPLE_TIME = SettingDataManager
+                                               .getInstance()
+                                               .getFeatureData(
+                                                               SettingConstants.FEATURE_NAME_INDEX_FUNCTION_PROFILING_SAMPLING_RATE)
+                                               .getDefaultValue();
                        }
                }
 
                if (target.isSelectedFeature(SettingConstants.FEATURE_NAME_INDEX_FUNCTION_SAMPLING)) {
-                       
+
                        Logs logs = pack.getLogs(DataChannelConstants.MSG_DATA_SAMPLE);
                        if (null != logs && logs.getRawLogs().size() != 0) {
-                               List<List<Object>> insertData = new ArrayList<List<Object>>();                          
+                               List<List<Object>> insertData = new ArrayList<List<Object>>();
                                List<LogData> sample = logs.getLogs();
                                int size = sample.size();
                                for (int i = 0; i < size; i++) {
                                        List<Object> insertRowData = new ArrayList<Object>();
                                        ProfileData sampleLog = (ProfileData) sample.get(i);
-                                       getInstance().getProfileDataMakerByPid(
-                                                       sample.get(i).getPid())
+                                       getInstance().getProfileDataMakerByPid(sample.get(i).getPid())
                                                        .makeFunctionUsageProfileData(sampleLog);
                                        // set LastSampleSeq
-                                       NavigableMap<Long, Long> seqByTimeMap = 
-                                                       AnalyzerManager.getCallstackManager()
+                                       NavigableMap<Long, Long> seqByTimeMap = AnalyzerManager.getCallstackManager()
                                                        .getSeqTimeByTidMap(sampleLog.getTid());
-                                       // find the time of callstackdata which was made 
+                                       // find the time of callstackdata which was made
                                        // right before the current sample time
-                                       // callstackdatas made before that time is needless                                             
-                                       Long lastTime = seqByTimeMap
-                                                       .floorKey(sampleLog.getTime());
+                                       // callstackdatas made before that time is needless
+                                       Long lastTime = seqByTimeMap.floorKey(sampleLog.getTime());
                                        if (lastTime != null) {
                                                Long lastSeq = seqByTimeMap.get(lastTime);
                                                setLastSampleSeq(lastSeq);
index d147e4e..c734aaa 100644 (file)
@@ -106,4 +106,11 @@ public class ThreadPage extends DAPageComposite {
                baseForm.setWeights(new int[] { 100 - wrate, wrate });
                rightForm.setWeights(new int[] { hrate, 100 - hrate });
        }
+       
+       @Override
+       public void clear() {
+               super.clear();
+               
+               ThreadDataManager.getInstance().clear();
+       }
 }
index b2d1726..c491157 100644 (file)
@@ -43,7 +43,6 @@ import org.tizen.dynamicanalyzer.ui.common.SetRangeMarkerMouseMoveListener;
 import org.tizen.dynamicanalyzer.ui.common.UICommonConstants;
 import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
 import org.tizen.dynamicanalyzer.ui.thread.ThreadPage;
-import org.tizen.dynamicanalyzer.ui.thread.data.ThreadDataManager;
 import org.tizen.dynamicanalyzer.ui.thread.type.ThreadPageThreadData;
 import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
 import org.tizen.dynamicanalyzer.ui.timeline.logparser.LifecycleLogParser;
@@ -361,7 +360,6 @@ public class ThreadChartView extends DAViewComposite {
 
        @Override
        public void clear() {
-               ThreadDataManager.getInstance().clear();
                syncChartBoard.contentsClear();
                syncChartBoard.clear();
                threadChartBoard.contentsClear();
index 4ed3e14..4f91480 100644 (file)
@@ -118,6 +118,7 @@ public class ThreadDataManager extends PageDataManager {
        }
 
        public void clear() {
+               loadManager.clear();
                tManager.clear();
                sManager.clear();
        }
index 1f61f10..07bf221 100644 (file)
@@ -80,4 +80,8 @@ public class ThreadLoadDataMaker {
                }
                ThreadDataManager.getInstance().insertThreadEventData(insertThreadEventList, true);
        }
+       
+       public void clear() {
+               // do nothing
+       }
 }
index 4bdc317..4fa3a87 100644 (file)
@@ -54,8 +54,7 @@ public class TimelinePage extends DAPageComposite {
        public TimelinePage(Composite parent, int style) {
                super(parent, style);
                setTitle(AnalyzerLabels.COOLBAR_AREA_TIMELINE);
-               this.setData(DAPageComposite.KEY_TOOLTIP,
-                               ShortCutManager.COOLBAR_AREA_TIMELINE_TOOLTIP);
+               this.setData(DAPageComposite.KEY_TOOLTIP, ShortCutManager.COOLBAR_AREA_TIMELINE_TOOLTIP);
                this.setLayout(new FillLayout());
 
                leftForm = new SashForm(this, SWT.HORIZONTAL);
@@ -67,8 +66,8 @@ public class TimelinePage extends DAPageComposite {
                rightForm = new SashForm(leftForm, SWT.VERTICAL);
 
                // index 1 : INFO_INDEX
-               ScreenshotTabComposite tabView = new ScreenshotTabComposite(rightForm,
-                               SWT.NONE, TimelinePage.pageID);
+               ScreenshotTabComposite tabView = new ScreenshotTabComposite(rightForm, SWT.NONE,
+                               TimelinePage.pageID);
                tabView.setObservingViews(ScreenshotTabComposite.screenshotViewID,
                                new String[] { TimelinePage.timelineViewID });
                tabView.setObservingViews(ScreenshotTabComposite.callstackViewID,
@@ -84,11 +83,10 @@ public class TimelinePage extends DAPageComposite {
 
                leftForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
                rightForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
-               
-               TimelineChartManager.getInstance().clear();
+
                DataManagerRegistry.registerPageDataManager(TimelineChartManager.getInstance());
                DataManagerRegistry.registerPageDataManager(ReplayDataManager.getInstance());
-               DataManagerRegistry.registerPageDataManager(CallTraceDataManager.getInstance());                
+               DataManagerRegistry.registerPageDataManager(CallTraceDataManager.getInstance());
        }
 
        @Override
@@ -105,4 +103,14 @@ public class TimelinePage extends DAPageComposite {
                leftForm.setWeights(new int[] { 100 - wrate, wrate });
                rightForm.setWeights(new int[] { hrate, 100 - hrate });
        }
+
+       @Override
+       public void clear() {
+               super.clear();
+
+               // clear data managers
+               TimelineChartManager.getInstance().clear();
+               ReplayDataManager.getInstance().clear();
+               CallTraceDataManager.getInstance().clear();
+       }
 }
index fd3a7f2..615315e 100644 (file)
@@ -218,8 +218,6 @@ public class TimelineView extends DAViewComposite {
        public void clear() {
                chartBoard.contentsClear();
                chartBoard.clear();
-               timelineChartManager.clear();
-               // SnapshotData.getInstance().clear();
                initializeCharts();
        }
 
index 48bef95..4edc09d 100644 (file)
@@ -56,11 +56,6 @@ public class ReplayDataManager extends PageDataManager {
        }
 
        public void clear() {
-               if(null != instance)
-               {
-                       instance = null;
-               }
-               replayDBManager = null;
                rid = 0;
        }
 
@@ -79,8 +74,7 @@ public class ReplayDataManager extends PageDataManager {
                        int dataRowSize = inputs.size();
                        for (int i = 0; i < dataRowSize; i++) {
                                ReplayData replayData = (ReplayData) inputs.get(i);
-                               List<RecordEventObject> events = replayData
-                                               .getRecordEvent();
+                               List<RecordEventObject> events = replayData.getRecordEvent();
                                for (int ii = 0; ii < replayData.getObjectCount(); ii++) {
                                        RecordEventObject reo = events.get(ii);
                                        List<Object> insertObject = new ArrayList<Object>();
index 20a79a2..ce4cfbe 100644 (file)
@@ -43,12 +43,9 @@ import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
 
 public class UIPage extends DAPageComposite {
        public static final String pageID = UIPage.class.getName();
-       public static final String controlListViewID = UIControlListView.class
-                       .getName();
-       public static final String sceneListViewID = UISceneListView.class
-                       .getName();
-       public static final String profilingViewID = UIFunctionProfilingView.class
-                       .getName();
+       public static final String controlListViewID = UIControlListView.class.getName();
+       public static final String sceneListViewID = UISceneListView.class.getName();
+       public static final String profilingViewID = UIFunctionProfilingView.class.getName();
 
        SashForm baseForm;
        SashForm upperForm;
@@ -57,37 +54,31 @@ public class UIPage extends DAPageComposite {
        public UIPage(Composite parent, int style) {
                super(parent, style);
                setTitle(AnalyzerLabels.COOLBAR_AREA_UI);
-               this.setData(DAPageComposite.KEY_TOOLTIP,
-                               ShortCutManager.COOLBAR_AREA_UI_TOOLTIP);
+               this.setData(DAPageComposite.KEY_TOOLTIP, ShortCutManager.COOLBAR_AREA_UI_TOOLTIP);
                this.setLayout(new FillLayout());
                baseForm = new SashForm(this, SWT.VERTICAL);
                baseForm.setLayout(new FillLayout());
 
                upperForm = new SashForm(baseForm, SWT.HORIZONTAL);
 
-               UIControlListView topLeftFirst = new UIControlListView(upperForm,
-                               SWT.NONE);
+               UIControlListView topLeftFirst = new UIControlListView(upperForm, SWT.NONE);
                addView(topLeftFirst);
 
-               UISceneListView topLeftSencond = new UISceneListView(upperForm,
-                               SWT.NONE);
+               UISceneListView topLeftSencond = new UISceneListView(upperForm, SWT.NONE);
                addView(topLeftSencond);
 
-               ScreenshotTabComposite tabView = new ScreenshotTabComposite(upperForm,
-                               SWT.NONE, UIPage.pageID);
-               tabView.setObservingViews(
-                               ScreenshotTabComposite.screenshotViewID,
-                               new String[] { UIPage.sceneListViewID, UIPage.controlListViewID });
-               tabView.setObservingViews(
-                               ScreenshotTabComposite.callstackViewID,
-                               new String[] { UIPage.sceneListViewID, UIPage.controlListViewID });
+               ScreenshotTabComposite tabView = new ScreenshotTabComposite(upperForm, SWT.NONE,
+                               UIPage.pageID);
+               tabView.setObservingViews(ScreenshotTabComposite.screenshotViewID, new String[] {
+                               UIPage.sceneListViewID, UIPage.controlListViewID });
+               tabView.setObservingViews(ScreenshotTabComposite.callstackViewID, new String[] {
+                               UIPage.sceneListViewID, UIPage.controlListViewID });
                addView(tabView);
 
                upperForm.setWeights(new int[] { 37, 40, 23 });
 
                bottomForm = new SashForm(baseForm, SWT.HORIZONTAL);
-               UIFunctionProfilingView bottomLeftFirst = new UIFunctionProfilingView(
-                               bottomForm, SWT.NONE);
+               UIFunctionProfilingView bottomLeftFirst = new UIFunctionProfilingView(bottomForm, SWT.NONE);
                addView(bottomLeftFirst);
                bottomForm.setWeights(new int[] { 100 });
 
@@ -95,8 +86,7 @@ public class UIPage extends DAPageComposite {
                upperForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
                bottomForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
 
-               DataManagerRegistry
-                               .registerPageDataManager(UIDataManager.getInstance());
+               DataManagerRegistry.registerPageDataManager(UIDataManager.getInstance());
        }
 
        @Override
@@ -114,4 +104,9 @@ public class UIPage extends DAPageComposite {
                baseForm.setWeights(new int[] { hrate, 100 - hrate });
        }
 
+       @Override
+       public void clear() {
+               super.clear();
+               UIDataManager.getInstance().clear();
+       }
 }
\ No newline at end of file
index d7d537f..df4a50a 100644 (file)
@@ -111,7 +111,6 @@ public class UIControlListView extends DAViewComposite {
        @Override
        public void clear() {
                treeComp.clear();
-               UIDataManager.getInstance().clear();
        }
 
        @Override