[Title] Open trace bug fix, tree selection bug fix, animation control added
authorLee <jy.exe.lee@samsung.com>
Fri, 23 Nov 2012 07:29:25 +0000 (16:29 +0900)
committerLee <jy.exe.lee@samsung.com>
Fri, 23 Nov 2012 07:29:25 +0000 (16:29 +0900)
[Desc.] animation control added
[Issue] -

32 files changed:
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/CommonConstants.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/DACommunicator.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/OpenTraceHandler.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/MessageProcess.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/OpenTraceProgressManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/resources/ImageResources.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/StopProcessManager.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/toolbar/opentrace/OpenTraceDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/opentrace/SaveFilesTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/opentrace/TempFilesTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/DAAnimation.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/Progress.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/ProgressDialog.java
org.tizen.dynamicanalyzer/theme/black/img/loading_icon_01.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/black/img/loading_icon_02.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/black/img/loading_icon_03.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/black/img/loading_icon_04.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/black/img/loading_icon_05.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/black/img/loading_icon_06.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/black/img/loading_icon_07.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/black/img/loading_icon_08.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/white/img/loading_icon.gif [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/white/img/loading_icon_01.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/white/img/loading_icon_02.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/white/img/loading_icon_03.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/white/img/loading_icon_04.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/white/img/loading_icon_05.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/white/img/loading_icon_06.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/white/img/loading_icon_07.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/theme/white/img/loading_icon_08.png [new file with mode: 0644]

index 0803f5c..344131e 100644 (file)
@@ -65,6 +65,7 @@ public class CommonConstants {
        public static final String EXTENSION_LEAK_CHECK = ".leak"; //$NON-NLS-1$
        public static final String EXTENSION_JPG_IMAGE = ".jpg"; //$NON-NLS-1$
        public static final String EXTENSION_PNG_IMAGE = ".png"; //$NON-NLS-1$
+       public static final String EXTENSION_GIF_IMAGE = ".gif"; //$NON-NLS-1$
 
        /* Arch */
        public static final String ARM_ARCH = "arm"; //$NON-NLS-1$
index 400e394..f34b56d 100644 (file)
@@ -47,10 +47,12 @@ import org.tizen.dynamicanalyzer.common.AnalyzerShellCommands;
 import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.project.AppDesktopInfo;
+import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
 import org.tizen.dynamicanalyzer.ui.info.range.StopProcessManager;
 import org.tizen.dynamicanalyzer.ui.toolbar.StopLogProcessor;
 import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
 import org.tizen.dynamicanalyzer.uirecorder.UIRecorderTool;
+import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 import org.tizen.sdblib.IDevice;
 import org.tizen.sdblib.IShellOutputReceiver;
 import org.tizen.sdblib.MultiLineReceiver;
@@ -743,6 +745,8 @@ public class DACommunicator {
                                System.out.println("Disconnected while DA is running."); //$NON-NLS-1$
                                UIRecorderTool.getInstance().stop();
 
+                               AnalyzerUtil
+                                               .setRecordState(RecordStateSourceProvider.RECORD_READY);
                                Display.getDefault().syncExec(new Runnable() {
                                        @Override
                                        public void run() {
index cdf1b8b..57bfb41 100644 (file)
@@ -93,13 +93,8 @@ public class OpenTraceHandler extends AbstractHandler {
                        System.out.println("invalid save file"); //$NON-NLS-1$\r
                        return null;\r
                }\r
-               Display.getDefault().syncExec(new Runnable() {\r
-                       @Override\r
-                       public void run() {\r
-                               OpenTraceProgressManager.getInstance().openTracePrgressStart(\r
-                                               "Loading xml files..");\r
-                       }\r
-               });\r
+               OpenTraceProgressManager.getInstance().openTracePrgressStart(\r
+                               "Loading xml files..");\r
                int size = pInfo.size();\r
                List<String> logCenterNames = new ArrayList<String>();\r
                for (int i = 0; i < size; i++) {\r
@@ -154,78 +149,71 @@ public class OpenTraceHandler extends AbstractHandler {
                }\r
                p.initLogCenters(logCenterNames);\r
 \r
-               Display.getDefault().syncExec(new Runnable() {\r
-                       @Override\r
-                       public void run() {\r
-                               int percent = OpenTraceProgressManager.getInstance()\r
-                                               .getPercent();\r
-                               OpenTraceProgressManager.getInstance().setProgressPercent(\r
-                                               "Loading appInfo..", percent += 20);\r
-\r
-                               loadAppInfo(p);\r
-                               OpenTraceProgressManager.getInstance().setProgressPercent(\r
-                                               "Loading Callstack data..", percent += 5);\r
-\r
-                               loadCallStackData(p);\r
-                               OpenTraceProgressManager.getInstance().setProgressPercent(\r
-                                               "Loading Callstack APIs..", percent += 5);\r
-\r
-                               loadCallStackApis(p);\r
-                               OpenTraceProgressManager.getInstance().setProgressPercent(\r
-                                               "Loading Profiling data..", percent += 5);\r
-\r
-                               loadProfilingData();\r
-                               OpenTraceProgressManager.getInstance().setProgressPercent(\r
-                                               "Making Profiling tree..", percent += 5);\r
-\r
-                               loadProfilingChildData();\r
-                               OpenTraceProgressManager.getInstance().setProgressPercent(\r
-                                               "Loading Leak data..", percent += 5);\r
-\r
-                               loadLeakData(p);\r
-                               OpenTraceProgressManager.getInstance().setProgressPercent(\r
-                                               "Loading Failed data..", percent += 5);\r
-\r
-                               loadFailedData();\r
-                               OpenTraceProgressManager.getInstance().setProgressPercent(\r
-                                               "Loading Images..", percent += 5);\r
-\r
-                               loadImageSet(p);\r
-                               OpenTraceProgressManager.getInstance().setProgressPercent(\r
-                                               "Toolbar setting...", percent += 5);\r
-                               p.closeConnection();\r
-\r
-                               ToolbarArea.getInstance().setTime(p.getLastTime());\r
-                               ToolbarArea.getInstance().setAppComboText(p.getAppName());\r
-                               ToolbarArea.getInstance().setRepalyButtonEnable(true);\r
-                               if (AnalyzerManager.getProject().getBinaryPath().isEmpty()) {\r
-                                       ToolbarArea.getInstance().setSourceViewEnable(false);\r
-                                       ToolbarArea.getInstance().setSourceViewTooltip(\r
-                                                       AnalyzerLabels.MESSAGE_PROCESS_PG_WARNING);\r
-                               } else {\r
-                                       ToolbarArea.getInstance().setSourceViewEnable(true);\r
-                                       ToolbarArea.getInstance().setSourceViewTooltip(\r
-                                                       AnalyzerLabels.MESSAGE_PROCESS_VIEW_SOURCE);\r
-                               }\r
-\r
-                               OpenTraceProgressManager.getInstance().setProgressPercent(\r
-                                               "Loading data..", percent += 3);\r
+               int percent = OpenTraceProgressManager.getInstance().getPercent();\r
+               OpenTraceProgressManager.getInstance().setProgressPercent(\r
+                               "Loading appInfo..", percent += 20);\r
+\r
+               loadAppInfo(p);\r
+               OpenTraceProgressManager.getInstance().setProgressPercent(\r
+                               "Loading Callstack data..", percent += 5);\r
+\r
+               loadCallStackData(p);\r
+               OpenTraceProgressManager.getInstance().setProgressPercent(\r
+                               "Loading Callstack APIs..", percent += 5);\r
+\r
+               loadCallStackApis(p);\r
+               OpenTraceProgressManager.getInstance().setProgressPercent(\r
+                               "Loading Profiling data..", percent += 5);\r
+\r
+               loadProfilingData();\r
+               OpenTraceProgressManager.getInstance().setProgressPercent(\r
+                               "Making Profiling tree..", percent += 5);\r
+\r
+               loadProfilingChildData();\r
+               OpenTraceProgressManager.getInstance().setProgressPercent(\r
+                               "Loading Leak data..", percent += 5);\r
+\r
+               loadLeakData(p);\r
+               OpenTraceProgressManager.getInstance().setProgressPercent(\r
+                               "Loading Failed data..", percent += 5);\r
+\r
+               loadFailedData();\r
+               OpenTraceProgressManager.getInstance().setProgressPercent(\r
+                               "Loading Images..", percent += 5);\r
+\r
+               loadImageSet(p);\r
+               OpenTraceProgressManager.getInstance().setProgressPercent(\r
+                               "Toolbar setting...", percent += 5);\r
+               p.closeConnection();\r
+\r
+               ToolbarArea.getInstance().setTime(p.getLastTime());\r
+               ToolbarArea.getInstance().setAppComboText(p.getAppName());\r
+               ToolbarArea.getInstance().setRepalyButtonEnable(true);\r
+               if (AnalyzerManager.getProject().getBinaryPath().isEmpty()) {\r
+                       ToolbarArea.getInstance().setSourceViewEnable(false);\r
+                       ToolbarArea.getInstance().setSourceViewTooltip(\r
+                                       AnalyzerLabels.MESSAGE_PROCESS_PG_WARNING);\r
+               } else {\r
+                       ToolbarArea.getInstance().setSourceViewEnable(true);\r
+                       ToolbarArea.getInstance().setSourceViewTooltip(\r
+                                       AnalyzerLabels.MESSAGE_PROCESS_VIEW_SOURCE);\r
+               }\r
+               OpenTraceProgressManager.getInstance().setProgressPercent(\r
+                               "Loading data..", percent += 3);\r
+               /* add each part action.. close... open...etc... */\r
 \r
-                               /* add each part action.. close... open...etc... */\r
+               /* resource log view action start */\r
+               List<LogCenter> logCenters = AnalyzerManager.getLogCenters();\r
+               size = logCenters.size();\r
+               for (int i = 0; i < size; i++) {\r
+                       LogCenter center = logCenters.get(i);\r
+                       int dataSize = SqlManager.selectCount(center);\r
+                       center.setDataSize(dataSize);\r
+               }\r
+               /* Timeline + file chart */\r
+               OpenTraceProgressManager.getInstance().runThreads();\r
+               OpenTraceProgressManager.getInstance().openTraceComplete();\r
 \r
-                               /* resource log view action start */\r
-                               List<LogCenter> logCenters = AnalyzerManager.getLogCenters();\r
-                               int size = logCenters.size();\r
-                               for (int i = 0; i < size; i++) {\r
-                                       LogCenter center = logCenters.get(i);\r
-                                       int dataSize = SqlManager.selectCount(center);\r
-                                       center.setDataSize(dataSize);\r
-                               }\r
-                               /* Timeline + file chart */\r
-                               OpenTraceProgressManager.getInstance().runThreads();\r
-                               OpenTraceProgressManager.getInstance().openTraceComplete();\r
-                       }\r
-               });\r
                return null;\r
        }\r
 \r
index 423c437..4eeae7c 100644 (file)
@@ -40,6 +40,7 @@ import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
+import org.tizen.dynamicanalyzer.handlers.StopHandler;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
 import org.tizen.dynamicanalyzer.ui.info.range.StopProcessManager;
@@ -106,7 +107,7 @@ public class MessageProcess {
 
        public void processMessage(String message) {
                // DO NOT DELETE : for debugging
-//              System.out.println("count " + messageCount + ": " + message);
+               // System.out.println("count " + messageCount + ": " + message);
                try {
                        String[] messages = message
                                        .split(CommonConstants.CMD_SPLIT_READ, 2);
@@ -128,10 +129,10 @@ public class MessageProcess {
                                break;
                        case AnalyzerConstants.MSG_DEVICE_LOG: /* device info : 4 */
                        case AnalyzerConstants.MSG_LOG: /* log : 5 */
-//                             if (AnalyzerConstants.MSG_LOG == messageIndex) {
-//                                     System.out
-//                                                     .println("count " + messageCount + ": " + message);
-//                             }
+                               // if (AnalyzerConstants.MSG_LOG == messageIndex) {
+                               // System.out
+                               // .println("count " + messageCount + ": " + message);
+                               // }
                                buffer.add(messages[1]);
                                messageCount += 1;
                                break;
@@ -348,14 +349,15 @@ public class MessageProcess {
                        syncStopTrace();
                        System.out.println("finally part run stop log process thread"); //$NON-NLS-1$
                        StopLogProcessor.runStopLogProcessThread();
+                       AnalyzerUtil.executeCommand(StopHandler.ID);
                }
        }
 
        public void processUserProfiling(String input) {
-//             FunctionUsageProfiler profiler = AnalyzerManager
-//                             .getFunctionUserProfiler();
+               // FunctionUsageProfiler profiler = AnalyzerManager
+               // .getFunctionUserProfiler();
                FunctionUsageProfiler profiler = FunctionUsageProfiler.getInstance();
                profiler.pushSample(input);
-//             profiler.makeFunctionUsageProfileData(input);
+               // profiler.makeFunctionUsageProfileData(input);
        }
 }
index aec4709..0311b00 100644 (file)
@@ -1,3 +1,28 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
 package org.tizen.dynamicanalyzer.logparser;
 
 import org.eclipse.swt.SWT;
@@ -64,35 +89,52 @@ public class OpenTraceProgressManager implements Runnable {
                return instance;
        }
 
-       public void openTracePrgressStart(String EndMessage) {
+       public void openTracePrgressStart(final String EndMessage) {
                if (state == OPEN_TRACE_PROCESS_START) {
                        return;
                }
-               state = OPEN_TRACE_PROCESS_START;
-               Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell();
-               dialog = new ProgressDialog(shell, SWT.APPLICATION_MODAL);
-               if (null != dialog) {
-                       dialog.open();
-                       dialog.setProgressMessage(EndMessage);
-                       dialog.setProgressInfo(AnalyzerLabels.STOP_PROCESS_DLG_PLEASE_WAIT);
-               }
+               Display.getDefault().syncExec(new Runnable() {
+                       @Override
+                       public void run() {
+                               state = OPEN_TRACE_PROCESS_START;
+                               Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell();
+                               dialog = new ProgressDialog(shell, SWT.APPLICATION_MODAL);
+                               if (null != dialog) {
+
+                                       dialog.open();
+                                       dialog.setProgressMessage(EndMessage);
+                                       dialog.setProgressInfo(AnalyzerLabels.STOP_PROCESS_DLG_PLEASE_WAIT);
+
+                               }
+                       }
+               });
        }
 
-       public void setProgressPercent(String message, int percent) {
+       public void setProgressPercent(final String message, final int percent) {
 
                if (null != dialog) {
                        this.percent = percent;
-                       dialog.setValue(percent);
-                       dialog.setProgressMessage(message);
+                       Display.getDefault().syncExec(new Runnable() {
+                               @Override
+                               public void run() {
+                                       dialog.setValue(percent);
+                                       dialog.setProgressMessage(message);
+                               }
+                       });
                }
        }
 
        public void openTraceComplete() {
                if (null != dialog) {
                        waitingThreads();
-                       dialog.setValue(100);
-                       AnalyzerUtil.changePage(TimelinePage.ID);
-                       closeOpenTraceDialog();
+                       Display.getDefault().syncExec(new Runnable() {
+                               @Override
+                               public void run() {
+                                       AnalyzerUtil.changePage(TimelinePage.ID);
+                                       dialog.setValue(100);
+                                       closeOpenTraceDialog();
+                               }
+                       });
                        AnalyzerUtil.executeCommand(OpenTraceCompleteHandler.ID);
                        percent = 0;
                }
index 26024a8..4e51443 100644 (file)
@@ -291,6 +291,15 @@ public class ImageResources {
 \r
        /*** stop progress dialog ***/\r
        public static final Image STOP_PROGRESS_LOADING = getPngImage("loading_icon"); //$NON-NLS-1$\r
+       public static final Image STOP_PROGRESS_LOADING_GIF = getImage("loading_icon",CommonConstants.EXTENSION_GIF_IMAGE); //$NON-NLS-1$\r
+       public static final Image STOP_PROGRESS_LOADING_01 = getPngImage("loading_icon_01"); //$NON-NLS-1$\r
+       public static final Image STOP_PROGRESS_LOADING_02 = getPngImage("loading_icon_02"); //$NON-NLS-1$\r
+       public static final Image STOP_PROGRESS_LOADING_03 = getPngImage("loading_icon_03"); //$NON-NLS-1$\r
+       public static final Image STOP_PROGRESS_LOADING_04 = getPngImage("loading_icon_04"); //$NON-NLS-1$\r
+       public static final Image STOP_PROGRESS_LOADING_05 = getPngImage("loading_icon_05"); //$NON-NLS-1$\r
+       public static final Image STOP_PROGRESS_LOADING_06 = getPngImage("loading_icon_06"); //$NON-NLS-1$\r
+       public static final Image STOP_PROGRESS_LOADING_07 = getPngImage("loading_icon_07"); //$NON-NLS-1$\r
+       public static final Image STOP_PROGRESS_LOADING_08 = getPngImage("loading_icon_08"); //$NON-NLS-1$\r
        \r
        /*** thread page ***/\r
        public static final Image THREAD_LOCK_COMBO_DISABLE = getPngImage("thread_lock_dropdown_disable"); //$NON-NLS-1$\r
index ae1fd18..e2a111c 100644 (file)
@@ -28,6 +28,7 @@ package org.tizen.dynamicanalyzer.ui.info.range;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Shell;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
+import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
 import org.tizen.dynamicanalyzer.ui.summary.SummaryPage;
 import org.tizen.dynamicanalyzer.ui.widgets.ProgressDialog;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
@@ -54,6 +55,7 @@ public class StopProcessManager {
                        return;
                }
                state = STOP_PROCESS_START;
+               AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY);
                Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell();
                dialog = new ProgressDialog(shell, SWT.APPLICATION_MODAL);
                if (null != dialog) {
index 39daaee..8cfab31 100644 (file)
@@ -116,7 +116,7 @@ public class RecordStartStopThread implements Runnable {
                LogParser.startLogParser();
                FileChartManager.getInstance().startUpdateLogThread();
                UIDataManager.getInstance().startUpdateLogThread();
-               
+
                FunctionUsageProfiler.startProfiler();
 
                /* Timeline */
@@ -125,6 +125,7 @@ public class RecordStartStopThread implements Runnable {
        }
 
        private void recordStop() {
+               AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY);
                Display.getDefault().syncExec(new Runnable() {
                        @Override
                        public void run() {
@@ -147,7 +148,7 @@ public class RecordStartStopThread implements Runnable {
                                                AnalyzerLabels.STOP_PROCESS_DLG_SUMMARIZING_DATA);
                        }
                });
-               
+
                AnalyzerUtil.executeCommand(StopHandler.ID);
        }
 }
index 399916f..f83dbae 100755 (executable)
@@ -246,22 +246,27 @@ public class ToolbarArea {
                shell.addShellListener(shellListener);
        }
 
-       public void setRepalyButtonEnable(boolean enabled) {
-               Project p = AnalyzerManager.getProject();
-               if (null == p || !enabled) {
-                       replayButton.setEnabled(false);
-                       return;
-               }
+       public void setRepalyButtonEnable(final boolean enabled) {
+               Display.getDefault().syncExec(new Runnable() {
+                       @Override
+                       public void run() {
+                               Project p = AnalyzerManager.getProject();
+                               if (null == p || !enabled) {
+                                       replayButton.setEnabled(false);
+                                       return;
+                               }
 
-               String appName = p.getAppName();
-               String text = appCombo.getText();
-               if (null != appName && !appName.isEmpty() && !text.isEmpty()
-                               && appName.equals(text)) {
-                       replayButton.setEnabled(true);
-                       return;
-               }
+                               String appName = p.getAppName();
+                               String text = appCombo.getText();
+                               if (null != appName && !appName.isEmpty() && !text.isEmpty()
+                                               && appName.equals(text)) {
+                                       replayButton.setEnabled(true);
+                                       return;
+                               }
 
-               replayButton.setEnabled(false);
+                               replayButton.setEnabled(false);
+                       }
+               });
        }
 
        private void addToolbarListeners() {
@@ -667,8 +672,13 @@ public class ToolbarArea {
                return timerClock.getTimeInMicroseconds();
        }
 
-       public void setTime(long time) {
-               timerClock.setTime(time);
+       public void setTime(final long time) {
+               Display.getDefault().syncExec(new Runnable() {
+                       @Override
+                       public void run() {
+                               timerClock.setTime(time);
+                       }
+               });
        }
 
        private void initAppCombo() {
@@ -759,11 +769,16 @@ public class ToolbarArea {
                }
        }
 
-       public void setAppComboText(String text) {
+       public void setAppComboText(final String text) {
                AppDesktopInfo appInfo = DACommunicator.getAppDesktopInfoByName(text);
                if (null != appInfo) {
                        DACommunicator.setSelectedApp(appInfo);
-                       appCombo.setText(text);
+                       Display.getDefault().syncExec(new Runnable() {
+                               @Override
+                               public void run() {
+                                       appCombo.setText(text);
+                               }
+                       });
                }
        }
 
index 658a49d..5511b6c 100644 (file)
@@ -396,6 +396,11 @@ public class OpenTraceDialog extends DAMessageBox {
                                }
                                int index = grid.getSelectionIndex();
                                GridItem item = items[0];
+
+                               if (item.getForeground() == ColorResources.BLUE) {
+                                       return;
+                               }
+
                                String openPath = null;
                                if ((Integer) item.getData() == TEMP_FOLDER) {
                                        openPath = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator
index 9fb0dc2..16b3857 100644 (file)
@@ -1,3 +1,28 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
 package org.tizen.dynamicanalyzer.ui.toolbar.opentrace;
 
 import java.io.File;
@@ -12,8 +37,10 @@ import org.eclipse.nebula.widgets.grid.GridItem;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.AnalyzerPaths;
 import org.tizen.dynamicanalyzer.model.TableInput;
+import org.tizen.dynamicanalyzer.project.Project;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.sql.SqlManager;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
@@ -93,11 +120,26 @@ public class SaveFilesTable extends DATableComposite {
                                gridItem.setText(index, inputText);
                        }
                        if (text.get(VALIDATE_INDEX).equals("N")) {
-                               gridItem.setForeground(ColorResources.RED);
+                               gridItem.setForeground(ColorResources.ORANGE);
                                gridItem.setToolTipText(TRACE_NAME_INDEX,
                                                "invalid save file - old version");
                                gridItem.setToolTipText(DATE_INDEX,
                                                "invalid save file - old version");
+                       } else {
+                               String path = AnalyzerPaths.DYNAMIC_ANALYZER_SAVE_PATH
+                                               + File.separator + text.get(TRACE_NAME_INDEX);
+
+                               Project project = AnalyzerManager.getProject();
+                               if (null != project) {
+                                       String projectPath = project.getSavePath();
+                                       if (path.equals(projectPath)) {
+                                               gridItem.setForeground(ColorResources.BLUE);
+                                               gridItem.setToolTipText(TRACE_NAME_INDEX,
+                                                               "current project file - can't delete");
+                                               gridItem.setToolTipText(DATE_INDEX,
+                                                               "current project file - can't delete");
+                                       }
+                               }
                        }
                }
                table.update();
index 240c462..d8345e1 100644 (file)
@@ -1,3 +1,28 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
 package org.tizen.dynamicanalyzer.ui.toolbar.opentrace;
 
 import java.io.File;
@@ -12,14 +37,18 @@ import org.eclipse.nebula.widgets.grid.GridItem;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.AnalyzerPaths;
 import org.tizen.dynamicanalyzer.model.TableInput;
+import org.tizen.dynamicanalyzer.project.Project;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.sql.SqlManager;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 
 public class TempFilesTable extends DATableComposite {
+       private final int TRACE_NAME_INDEX = 0;
+       private final int DATE_INDEX = 1;
 
        public TempFilesTable(Composite parent, int style) {
                super(parent, style);
@@ -69,6 +98,20 @@ public class TempFilesTable extends DATableComposite {
                        for (int index = 0; index < columnCount; index++) {
                                gridItem.setText(index, text.get(index));
                        }
+
+                       String path = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator
+                                       + text.get(TRACE_NAME_INDEX);
+                       Project project = AnalyzerManager.getProject();
+                       if (null != project) {
+                               String projectPath = project.getSavePath();
+                               if (path.equals(projectPath)) {
+                                       gridItem.setForeground(ColorResources.BLUE);
+                                       gridItem.setToolTipText(TRACE_NAME_INDEX,
+                                                       "current project file - can't delete");
+                                       gridItem.setToolTipText(DATE_INDEX,
+                                                       "current project file - can't delete");
+                               }
+                       }
                }
                table.update();
        }
index 19b9bb7..9b02a6d 100644 (file)
@@ -1,11 +1,11 @@
 package org.tizen.dynamicanalyzer.ui.widgets;
 
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
 import java.util.Timer;
 import java.util.TimerTask;
 
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.PaintEvent;
 import org.eclipse.swt.events.PaintListener;
 import org.eclipse.swt.graphics.Image;
@@ -13,7 +13,6 @@ import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.widgets.Canvas;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
-import org.tizen.dynamicanalyzer.resources.ColorResources;
 
 public class DAAnimation extends Canvas {
 
@@ -21,12 +20,12 @@ public class DAAnimation extends Canvas {
 
        Timer timer = null;
        long startTime = 0;
-       long interval = 1000;
+       long interval = 100;
 
        int index = 0;
 
        public DAAnimation(Composite parent, int style) {
-               super(parent, style);
+               super(parent, style | SWT.TRANSPARENT);
                this.addPaintListener(paintListener);
        }
 
@@ -49,13 +48,12 @@ public class DAAnimation extends Canvas {
                @Override
                public void paintControl(PaintEvent e) {
                        Canvas canvas = (Canvas) e.widget;
+                       canvas.setBackground(canvas.getParent().getBackground());
                        Rectangle rect = canvas.getClientArea();
                        if (index >= imageList.size()) {
                                index = 0;
                        }
                        e.gc.drawImage(imageList.get(index++), rect.x, rect.y);
-                       e.gc.setForeground(ColorResources.WHITE);
-                       e.gc.drawRectangle(rect);
                }
        };
 
@@ -72,11 +70,14 @@ public class DAAnimation extends Canvas {
                                Display.getDefault().syncExec(new Runnable() {
                                        @Override
                                        public void run() {
-                                               redraw();
+                                               if (null != this && !isDisposed()) {
+                                                       redraw();
+                                                       update();
+                                               }
                                        }
                                });
                        }
-               }, new Date(), interval);
+               }, 10, interval);
        }
 
        public void stopTimer() {
index 5478958..3229e29 100644 (file)
@@ -1,11 +1,42 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
 package org.tizen.dynamicanalyzer.ui.widgets;
 
+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.graphics.Color;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.layout.FormLayout;
 import org.eclipse.swt.widgets.Canvas;
 import org.eclipse.swt.widgets.Composite;
@@ -19,7 +50,8 @@ public class Progress extends Canvas {
        public static final int PROGRESS_STYLE_BAR_ALONE = 0;
        public static final int PROGRESS_STYLE_ALL = 1;
 
-       private Image loadingImage = ImageResources.STOP_PROGRESS_LOADING;
+       private List<Image> loadingImage = new ArrayList<Image>();
+       private DAAnimation icon = null;
        private String upperText = CommonConstants.EMPTY;
        private String bottomText = CommonConstants.EMPTY;
        private int maxSize = 100;
@@ -34,6 +66,23 @@ public class Progress extends Canvas {
                super(parent, style);
                this.addPaintListener(progressPaintListener);
                this.setLayout(new FormLayout());
+               loadingImage.add(ImageResources.STOP_PROGRESS_LOADING_01);
+               loadingImage.add(ImageResources.STOP_PROGRESS_LOADING_02);
+               loadingImage.add(ImageResources.STOP_PROGRESS_LOADING_03);
+               loadingImage.add(ImageResources.STOP_PROGRESS_LOADING_04);
+               loadingImage.add(ImageResources.STOP_PROGRESS_LOADING_05);
+               loadingImage.add(ImageResources.STOP_PROGRESS_LOADING_06);
+               loadingImage.add(ImageResources.STOP_PROGRESS_LOADING_07);
+               loadingImage.add(ImageResources.STOP_PROGRESS_LOADING_08);
+
+               icon = new DAAnimation(this, SWT.NONE, loadingImage);
+               FormData data = new FormData();
+               data.top = new FormAttachment(0, 11);
+               data.left = new FormAttachment(0, 12);
+               data.width = 24;
+               data.height = 24;
+               icon.setLayoutData(data);
+               icon.start();
        }
 
        public Progress(Composite parent, int style, int progressStyle) {
@@ -51,8 +100,8 @@ public class Progress extends Canvas {
                this.update();
        }
 
-       public Image getLoadingImage() {
-               return loadingImage;
+       public void close() {
+               icon.stopTimer();
        }
 
        public Color getOutlineColor1() {
@@ -71,7 +120,7 @@ public class Progress extends Canvas {
                this.outlineColor2 = outlineColor2;
        }
 
-       public void setLoadingImage(Image loadingImage) {
+       public void setLoadingImage(List<Image> loadingImage) {
                this.loadingImage = loadingImage;
        }
 
@@ -121,7 +170,9 @@ public class Progress extends Canvas {
                                                rect.height - 2);
 
                                // draw icon
-                               e.gc.drawImage(loadingImage, 12, 11);
+                               // e.gc.drawImage(loadingImage, 12, 11);
+
+                               // e.gc.drawImage(loadingImage.get(1), 12 + 100, 11);
 
                                // draw upper text
                                e.gc.setForeground(ColorResources.BLACK);
index bf97072..a69a6f6 100644 (file)
@@ -1,3 +1,29 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * yeongtaik byeon <yeongtaik.byeon@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
 package org.tizen.dynamicanalyzer.ui.widgets;
 
 import java.util.Date;
@@ -40,6 +66,7 @@ public class ProgressDialog {
                stopTimer();
                if (null != progress) {
                        if (!progress.isDisposed()) {
+                               progress.close();
                                progress.dispose();
                        }
                        progress = null;
diff --git a/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_01.png b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_01.png
new file mode 100644 (file)
index 0000000..4dbcaaa
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_01.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_02.png b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_02.png
new file mode 100644 (file)
index 0000000..ba19c72
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_02.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_03.png b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_03.png
new file mode 100644 (file)
index 0000000..f99d4b3
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_03.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_04.png b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_04.png
new file mode 100644 (file)
index 0000000..f9588d2
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_04.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_05.png b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_05.png
new file mode 100644 (file)
index 0000000..f15e48f
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_05.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_06.png b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_06.png
new file mode 100644 (file)
index 0000000..0fade41
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_06.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_07.png b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_07.png
new file mode 100644 (file)
index 0000000..9693f60
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_07.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_08.png b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_08.png
new file mode 100644 (file)
index 0000000..cf330d8
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/black/img/loading_icon_08.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/white/img/loading_icon.gif b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon.gif
new file mode 100644 (file)
index 0000000..a2ec1ea
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon.gif differ
diff --git a/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_01.png b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_01.png
new file mode 100644 (file)
index 0000000..4dbcaaa
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_01.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_02.png b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_02.png
new file mode 100644 (file)
index 0000000..ba19c72
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_02.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_03.png b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_03.png
new file mode 100644 (file)
index 0000000..f99d4b3
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_03.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_04.png b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_04.png
new file mode 100644 (file)
index 0000000..f9588d2
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_04.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_05.png b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_05.png
new file mode 100644 (file)
index 0000000..f15e48f
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_05.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_06.png b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_06.png
new file mode 100644 (file)
index 0000000..0fade41
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_06.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_07.png b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_07.png
new file mode 100644 (file)
index 0000000..9693f60
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_07.png differ
diff --git a/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_08.png b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_08.png
new file mode 100644 (file)
index 0000000..cf330d8
Binary files /dev/null and b/org.tizen.dynamicanalyzer/theme/white/img/loading_icon_08.png differ