[Title]stop process dialog update
authoryeongtaik.byeon <yeongtaik.byeon@samsung.com>
Mon, 2 Jul 2012 09:32:29 +0000 (18:32 +0900)
committeryeongtaik.byeon <yeongtaik.byeon@samsung.com>
Mon, 2 Jul 2012 09:32:29 +0000 (18:32 +0900)
[Type]update
[Module]stop process dialog
[Priority]high
[CQ#]
[Redmine#]5212
[Problem]
[Cause]
[Solution]
[TestCase]

12 files changed:
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/AnalyzerManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/DACommunicator.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/MessageProcess.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ResourceCommunicator.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/StateManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/AnalyzerLabels.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/AnalyzerLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/threads/LogQueueObservingThread.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/threads/StopLogProcessThread.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/views/CoolbarArea.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/StopProgressDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/utils/UpdateViewTimer.java

index 4f54d9d..3d052b4 100644 (file)
@@ -483,8 +483,6 @@ public class AnalyzerManager {
                                        + AnalyzerConstants.CMD_SPLIT + 0
                                        + AnalyzerConstants.CMD_SPLIT);
                }
-
-               ResourceCommunicator.startUITimer();
        }
 
        public static List<LogCenter> getLogCenters() {
@@ -556,6 +554,13 @@ public class AnalyzerManager {
 
        public static void runStopLogProcessThread() {
                if (StopLogProcessThread.count == 0) {
+                       Display.getDefault().syncExec(new Runnable() {
+                               @Override
+                               public void run() {
+                                       StateManager.getInstance().StopProcessStart(
+                                                       "unknown error(2)");
+                               }
+                       });
                        StopLogProcessThread.count++;
                        stopLogProcessThread = new Thread(null, new StopLogProcessThread(),
                                        AnalyzerConstants.STOP_LOG_THREAD);
index 0f50328..7830020 100644 (file)
@@ -315,9 +315,9 @@ public class DACommunicator {
                        }
                }
        }
-       
+
        public static void unfoward(int local, int remote) {
-               if(null != currentDevice && currentDevice.isOnline()) {
+               if (null != currentDevice && currentDevice.isOnline()) {
                        try {
                                currentDevice.removeForward(local, remote);
                                Thread.sleep(AnalyzerConstants.SOCKET_FORWARD_INTERVAL);
@@ -662,6 +662,13 @@ public class DACommunicator {
                                        }
                                });
 
+                               Display.getDefault().syncExec(new Runnable() {
+                                       @Override
+                                       public void run() {
+                                               StateManager.getInstance().StopProcessStart(
+                                                               "device disconnected");
+                                       }
+                               });
                                System.out
                                                .println("stop log process thread call by device disconnected");//$NON-NLS-1$
                                AnalyzerManager.runStopLogProcessThread();
index 3f09f6e..c34963f 100644 (file)
@@ -87,7 +87,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(AnalyzerConstants.CMD_SPLIT_READ,
                                        2);
@@ -218,7 +218,13 @@ public class MessageProcess {
                if (!ResourceCommunicator.isCalledStop()) {
                        syncStopTrace();
                }
-
+               Display.getDefault().syncExec(new Runnable() {
+                       @Override
+                       public void run() {
+                               StateManager.getInstance().StopProcessStart(
+                                               "application terminated");
+                       }
+               });
                System.out
                                .println("stop log process thread call by process terminated"); //$NON-NLS-1$
                AnalyzerManager.runStopLogProcessThread();
@@ -294,7 +300,13 @@ public class MessageProcess {
                        UIRecorderTool.getInstance().stop();
 
                        syncStopTrace();
-
+                       Display.getDefault().syncExec(new Runnable() {
+                               @Override
+                               public void run() {
+                                       StateManager.getInstance().StopProcessStart(
+                                                       "socket time out");
+                               }
+                       });
                        System.out
                                        .println("stop log process thread call by socket time out"); //$NON-NLS-1$
                        AnalyzerManager.runStopLogProcessThread();
@@ -305,13 +317,20 @@ public class MessageProcess {
                        stopTimer();
 
                        DACommunicator.closeSocket();
-                       DACommunicator.unfoward(AnalyzerConstants.LOCAL_PORT, AnalyzerConstants.REMOTE_PORT);
+                       DACommunicator.unfoward(AnalyzerConstants.LOCAL_PORT,
+                                       AnalyzerConstants.REMOTE_PORT);
 
                        // FIXME: unexpceted terminated - popup window?
                        UIRecorderTool.getInstance().stop();
 
                        syncStopTrace();
-
+                       Display.getDefault().syncExec(new Runnable() {
+                               @Override
+                               public void run() {
+                                       StateManager.getInstance().StopProcessStart(
+                                                       "unknown error(1)");
+                               }
+                       });
                        AnalyzerManager.runStopLogProcessThread();
                }
        }
index 7396868..2fb34cd 100644 (file)
@@ -21,7 +21,6 @@ package org.tizen.dynamicanalyzer;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Timer;
-import java.util.TimerTask;
 
 import org.eclipse.swt.widgets.Display;
 import org.tizen.dynamicanalyzer.constants.AnalyzerConstants;
@@ -127,24 +126,16 @@ public class ResourceCommunicator extends DACommunicator {
        private static Timer recordTimer = null;
 
        /** stop trace -> change page to summary **/
-       public static void startUITimer() {
-               recordTimer = new Timer();
-               recordTimer.schedule(new TimerTask() {
+       public static void changePage(final int nPage) {
+               final BaseView baseView = (BaseView) AnalyzerUtil.getView(BaseView.ID);
+               final DAEffectFrame mainView = baseView.getMainView();
+               Display.getDefault().syncExec(new Runnable() {
                        @Override
                        public void run() {
-                               Display.getDefault().syncExec(new Runnable() {
-                                       @Override
-                                       public void run() {
-                                               BaseView baseView = (BaseView) AnalyzerUtil
-                                                               .getView(BaseView.ID);
-
-                                               DAEffectFrame mainView = baseView.getMainView();
-                                               mainView.setTopComposite(1);
-                                               CoolbarArea.getInstance().setSelectionTab(1);
-                                       }
-                               });
+                               mainView.setTopComposite(nPage);
+                               CoolbarArea.getInstance().setSelectionTab(nPage);
                        }
-               }, 5000);
+               });
        }
 
        public static void stopUITimer() {
index 468417c..520f557 100644 (file)
@@ -2,53 +2,75 @@ package org.tizen.dynamicanalyzer;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Shell;
-import org.tizen.dynamicanalyzer.ui.widgets.ConfigurationDialog;
 import org.tizen.dynamicanalyzer.ui.widgets.StopProgressDialog;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 
 public class StateManager {
        private static final int INIT = 0;
        private static final int STOP_PROCESS_START = 1;
+       private static final int STOP_PROCESS_END = 2;
        private int state = INIT;
        private StopProgressDialog dialog = null;
-       
+
        private static StateManager instance = new StateManager();
-       
+
        private StateManager() {
 
        }
-       
+
        public static StateManager getInstance() {
                return instance;
        }
-       
-       public void StopProcessStart(){
+
+       public void StopProcessStart(String EndMessage) {
+               if (state == STOP_PROCESS_START)
+                       return;
                state = STOP_PROCESS_START;
                Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell();
-               dialog = new StopProgressDialog(shell,
-                               SWT.NO_TRIM | SWT.APPLICATION_MODAL); // FIXME
+               dialog = new StopProgressDialog(shell, SWT.NO_TRIM
+                               | SWT.APPLICATION_MODAL);
                dialog.open();
+               if (null != dialog)
+                       dialog.setProcessMessage(EndMessage);
        }
-       
-       public void SaveProjectAndOthers(){
-               if(null != dialog){
-                       dialog.setProcessInfomation("save project and others...");
-                       dialog.setProcessSelection(20);
+
+       public void WaitForLogParsing(int nSelect) {
+
+               if (null != dialog) {
+                       dialog.setProcessSelection(nSelect);
                }
        }
-       
-       public void LogQueueObserverThreadEnd(){
-               if(null != dialog){
-                       dialog.setProcessInfomation("Log queue observer thread end");
-                       dialog.setProcessSelection(50);
+
+       public void SaveProjectAndOthers() {
+               if (null != dialog) {
+                       dialog.setProcessSelection(60);
                }
        }
-       
-       public void StopTrace(){
-               if(null != dialog){
-                       dialog.setProcessInfomation("stop trace");
+
+       public void LogQueueObserverThreadEnd() {
+               if (null != dialog) {
+                       dialog.setProcessSelection(70);
+               }
+       }
+
+       public void UpdateTimerStop() {
+               if (null != dialog) {
+                       dialog.setProcessSelection(80);
+               }
+       }
+
+       public void InsertToDBComplete() {
+               if (null != dialog) {
+                       dialog.setProcessSelection(90);
+               }
+       }
+
+       public void StopTrace() {
+               if (null != dialog) {
                        dialog.setProcessSelection(100);
+                       ResourceCommunicator.changePage(1);
                        dialog.close();
+                       state = STOP_PROCESS_END;
                }
        }
 }
index 3e15f94..c501bb8 100644 (file)
@@ -84,6 +84,8 @@ public class AnalyzerLabels {
        public static String OPEN_TRACE_DLG_TEMP_FILE;
        public static String OPEN_TRACE_DLG_TEMP_FILE_NAME;
        public static String OPEN_TRACE_DLG_TRACE_FILE_NAME;
+       
+       public static String STOP_PROCESS_DLG_PLEASE_WAIT;
 
        static {
                NLS.initializeMessages(BUNDLE_NAME, AnalyzerLabels.class);
index 7b72895..63e0dcf 100644 (file)
@@ -76,3 +76,5 @@ OPEN_TRACE_DLG_SAVED_FILE=Saved file
 OPEN_TRACE_DLG_TEMP_FILE=Temporary file
 OPEN_TRACE_DLG_TEMP_FILE_NAME=Trace file name
 OPEN_TRACE_DLG_TRACE_FILE_NAME=Trace file name
+
+STOP_PROCESS_DLG_PLEASE_WAIT=please wait...
index cd52276..cce0860 100644 (file)
@@ -2,13 +2,13 @@ package org.tizen.dynamicanalyzer.threads;
 
 import java.util.List;
 
+import org.eclipse.swt.widgets.Display;
 import org.tizen.dynamicanalyzer.LogSpliter;
 import org.tizen.dynamicanalyzer.StateManager;
 import org.tizen.dynamicanalyzer.constants.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.model.LogQueue;
 import org.tizen.dynamicanalyzer.ui.views.CoolbarArea;
 
-
 public class LogQueueObservingThread implements Runnable {
 
        @Override
@@ -17,22 +17,27 @@ public class LogQueueObservingThread implements Runnable {
                while (true) {
                        try {
                                if (!logQueue.isEmpty()) {
-                                        List<String> logs = logQueue.getFirst();
-                                        LogSpliter.logSlicing(logs);
+                                       List<String> logs = logQueue.getFirst();
+                                       LogSpliter.logSlicing(logs);
                                } else {
                                        Thread.sleep(AnalyzerConstants.LOG_CHECK_INTERVAL);
                                }
-                       }catch (InterruptedException e)
-                       {
+                       } catch (InterruptedException e) {
                                // interrupt log omitted
                                break;
                        } catch (Exception e) {
                                e.printStackTrace();
                        }
                }
-               //FIXME : delete !
+               // FIXME : delete !
                System.out.println("log Queue observer thread end!!"); //$NON-NLS-1$
-               StateManager.getInstance().LogQueueObserverThreadEnd();
+
+               Display.getDefault().syncExec(new Runnable() {
+                       @Override
+                       public void run() {
+                               StateManager.getInstance().LogQueueObserverThreadEnd();
+                       }
+               });
                CoolbarArea.getInstance().stopTimer();
        }
 
index 247bea7..2ad5778 100644 (file)
@@ -26,7 +26,12 @@ public class StopLogProcessThread implements Runnable {
                                        LogSpliter.stopLogQueueObservingThread();
 
                                        System.out.println(" save project and others..."); //$NON-NLS-1$
-                                       StateManager.getInstance().SaveProjectAndOthers();
+                                       Display.getDefault().syncExec(new Runnable() {
+                                               @Override
+                                               public void run() {
+                                                       StateManager.getInstance().SaveProjectAndOthers();
+                                               }
+                                       });
                                        /****** recording stop and log parsing / operations end!! *****/
                                        /* 1. save Project */
                                        if (!project.isValid()) {
@@ -51,6 +56,12 @@ public class StopLogProcessThread implements Runnable {
                                                        UpdateViewTimer.stop();
                                                }
                                        });
+                                       Display.getDefault().syncExec(new Runnable() {
+                                               @Override
+                                               public void run() {
+                                                       StateManager.getInstance().InsertToDBComplete();
+                                               }
+                                       });
                                        System.out.println("insert to db complete..."); //$NON-NLS-1$
                                        break;
                                } else {
@@ -61,8 +72,24 @@ public class StopLogProcessThread implements Runnable {
                                                        LogSpliter.getLogQueue().clear();
                                                        AnalyzerManager.stopLogQueueObservingThread();
                                                }
+
+                                               final int nSeclect = repeatCount * 10;
+
+                                               Display.getDefault().syncExec(new Runnable() {
+                                                       @Override
+                                                       public void run() {
+                                                               StateManager.getInstance().WaitForLogParsing(
+                                                                               nSeclect);
+                                                       }
+                                               });
                                        }
                                        Thread.sleep(AnalyzerConstants.LOG_CHECK_INTERVAL);
+                                       Display.getDefault().syncExec(new Runnable() {
+                                               @Override
+                                               public void run() {
+                                                       StateManager.getInstance().WaitForLogParsing(50);
+                                               }
+                                       });
                                        System.out.println("wait for log parsing..."); //$NON-NLS-1$
                                }
                        } catch (InterruptedException e) {
@@ -73,7 +100,12 @@ public class StopLogProcessThread implements Runnable {
                CoolbarArea.getInstance().stopTimer();
 
                System.out.println(" stop trace "); //$NON-NLS-1$
-               StateManager.getInstance().StopTrace();
+               Display.getDefault().syncExec(new Runnable() {
+                       @Override
+                       public void run() {
+                               StateManager.getInstance().StopTrace();
+                       }
+               });
 
                Display.getDefault().syncExec(new Runnable() {
                        @Override
index c4abd8b..0da673e 100755 (executable)
@@ -33,6 +33,7 @@ import org.tizen.dynamicanalyzer.ColorResources;
 import org.tizen.dynamicanalyzer.DACommunicator;
 import org.tizen.dynamicanalyzer.FontResources;
 import org.tizen.dynamicanalyzer.ImageResources;
+import org.tizen.dynamicanalyzer.ResourceCommunicator;
 import org.tizen.dynamicanalyzer.StateManager;
 import org.tizen.dynamicanalyzer.constants.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.constants.DesignConstants;
@@ -746,6 +747,7 @@ public class CoolbarArea {
                                                        setStartToolbarState(true);
                                                        // timerClock.start();
                                                        setToolbarEnablement(false);
+                                                       ResourceCommunicator.changePage(0);
                                                } else {
                                                        AnalyzerUtil
                                                                        .setRecordState(RecordStateSourceProvider.RECORD_READY);
@@ -753,7 +755,8 @@ public class CoolbarArea {
                                                        setStartToolbarState(false);
                                                        // timerClock.stop();
                                                        setToolbarEnablement(true);
-                                                       StateManager.getInstance().StopProcessStart();
+                                                       StateManager.getInstance().StopProcessStart(
+                                                                       "stop button pressed");
                                                }
                                                startButton.setEnabled(false);
                                                AnalyzerUtil.executeCommand(StartStopTraceHandler.ID);
index 3a6c19f..4054409 100644 (file)
@@ -16,124 +16,130 @@ import org.eclipse.swt.widgets.ProgressBar;
 import org.eclipse.swt.widgets.Shell;
 import org.tizen.dynamicanalyzer.ColorResources;
 import org.tizen.dynamicanalyzer.FontResources;
+import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 
-
-public class StopProgressDialog{
+public class StopProgressDialog {
        private Shell parent = null;
        private Shell shell = null;
-       private long excuteTime = 10000;        //max process time(default 10000 MiliSeconds)
+       private long excuteTime = 10000; // max process time(default 10000
+                                                                               // MiliSeconds)
        private Label processMessage = null;
        private Label processInfo = null;
        private ProgressBar progressbar = null;
-       private String message = "please wait....";
-       private String infomation = "start";
-       private int selection = 0;
-       private boolean isClose = false;
+       private String message = "";
+       private String infomation = AnalyzerLabels.STOP_PROCESS_DLG_PLEASE_WAIT;
        private static final int DEFAULT_WIDTH = 300;
        private static final int DEFAULT_HEIGHT = 100;
        private static final int DEFAULT_MAXIMUM = 100;
-       private static final int TIMER_PERIOD = 10;
-       boolean isChange = false;
+       private static final int TIMER_PERIOD = 1000;
        Timer timer = null;
        long startTime = 0;
        long time;
-       
-       
-       public StopProgressDialog(Shell parent, int style){
+
+       public StopProgressDialog(Shell parent, int style) {
                shell = new Shell(parent, style);
                this.parent = parent;
                createContents();
        }
-       
-       public StopProgressDialog(Shell parent, int style, long excuteTime){
+
+       public StopProgressDialog(Shell parent, int style, long excuteTime) {
                this(parent, style);
                this.excuteTime = excuteTime;
        }
-       
-       public void setSize(int width, int height){
+
+       public void setSize(int width, int height) {
                shell.setSize(width, height);
        }
-       
-       public void setBounds(Rectangle rect){
+
+       public void setBounds(Rectangle rect) {
                shell.setBounds(rect);
        }
-       
-       public void setLocation(int width, int height){
+
+       public void setLocation(int width, int height) {
                shell.setLocation(width, height);
        }
-       
-       private void setDefaultSize(Rectangle rect){
-               Rectangle size = new Rectangle((rect.x+rect.width)/2 - DEFAULT_WIDTH/2, (rect.y+rect.height)/2 - DEFAULT_HEIGHT/2, DEFAULT_WIDTH, DEFAULT_HEIGHT);
+
+       private void setDefaultSize(Rectangle rect) {
+               Rectangle size = new Rectangle((rect.x + rect.width) / 2
+                               - DEFAULT_WIDTH / 2, (rect.y + rect.height) / 2
+                               - DEFAULT_HEIGHT / 2, DEFAULT_WIDTH, DEFAULT_HEIGHT);
                shell.setBounds(size);
        }
-       
-       public void setProcessMessage(String message){
-               this.message = message;
-               isChange = true;
-//             if(null != processMessage)
-//                     processMessage.setText(message);
+
+       public void setProcessMessage(String message) {
+               if (null != processMessage)
+                       processMessage.setText(message);
        }
-       
-       public void setProcessInfomation(String infomation){
-               this.infomation = infomation;
-               isChange = true;
-//             if(null != processInfo)
-//                     processInfo.setText(infomation);
+
+       public void setProcessInfomation(String infomation) {
+               if (null != processInfo)
+                       processInfo.setText(infomation);
        }
-       
-       public void setProcessMaximum(int value){
+
+       public void setProcessMaximum(int value) {
                progressbar.setMaximum(value);
        }
-       
-       public void setProcessSelection(int value){
-               selection = value;
-               isChange = true;
-//             progressbar.setSelection(value);
+
+       public void setProcessSelection(int value) {
+               if (null != progressbar)
+                       progressbar.setSelection(value);
        }
-       
-       protected void createContents(){
+
+       protected void createContents() {
                setDefaultSize(parent.getBounds());
                FormLayout dialogLayout = new FormLayout();
                shell.setLayout(dialogLayout);
-               shell.setBackground(ColorResources.WINDOW_BG_COLOR);
-               
-               //Process Message
-               processMessage = new Label(shell, SWT.NONE);
+               shell.setBackground(ColorResources.NORMAL_VIEW_LAYOUT_OUTER);
+
+               Composite base = new Composite(shell, SWT.NONE);
+               base.setLayout(new FormLayout());
+               base.setBackground(ColorResources.WINDOW_BG_COLOR);
+
+               FormData baseData = new FormData();
+               baseData.top = new FormAttachment(0, 1);
+               baseData.left = new FormAttachment(0, 1);
+               baseData.right = new FormAttachment(100, -1);
+               baseData.bottom = new FormAttachment(100, -1);
+               base.setLayoutData(baseData);
+               // base.setVisible(true);
+
+               // Process Message
+               processMessage = new Label(base, SWT.NONE);
                processMessage.setText(message);
                processMessage.setBackground(ColorResources.WINDOW_BG_COLOR);
                processMessage.setAlignment(SWT.LEFT);
                processMessage.setForeground(ColorResources.WHITE);
                processMessage.setFont(FontResources.ABOUT_TEXT);
-               
-               //Process Infomation
-               processInfo = new Label(shell, SWT.NONE);
+
+               // Process Infomation
+               processInfo = new Label(base, SWT.NONE);
                processInfo.setText(infomation);
                processInfo.setBackground(ColorResources.WINDOW_BG_COLOR);
                processInfo.setAlignment(SWT.LEFT);
                processInfo.setForeground(ColorResources.WHITE);
                processInfo.setFont(FontResources.ABOUT_TEXT);
-               
-               //Process Bar
-               progressbar = new ProgressBar(shell, SWT.SMOOTH);
+
+               // Process Bar
+               progressbar = new ProgressBar(base, SWT.SMOOTH);
                progressbar.setMaximum(DEFAULT_MAXIMUM);
-               
-               //Process Message
+
+               // Process Message
                FormData formData = new FormData();
                formData.left = new FormAttachment(0, 10);
                formData.top = new FormAttachment(0, 15);
                formData.width = 280;
                formData.height = 22;
                processMessage.setLayoutData(formData);
-               
-               //Process Bar
+
+               // Process Bar
                formData = new FormData();
                formData.left = new FormAttachment(0, 10);
                formData.top = new FormAttachment(processMessage, 10);
                formData.width = 280;
                formData.height = 20;
                progressbar.setLayoutData(formData);
-               
-               //Process Infomation
+
+               // Process Infomation
                formData = new FormData();
                formData.left = new FormAttachment(0, 10);
                formData.top = new FormAttachment(progressbar, 10);
@@ -141,23 +147,36 @@ public class StopProgressDialog{
                formData.height = 22;
                processInfo.setLayoutData(formData);
        }
-       
-       public void open(){
+
+       public void open() {
                shell.open();
                startTimer();
        }
 
-       public void close(){
-               isClose = true;
+       public void close() {
+               stopTimer();
+               if (null != progressbar) {
+                       progressbar.dispose();
+                       progressbar = null;
+               }
+               if (null != processMessage) {
+                       processMessage.dispose();
+                       processMessage = null;
+               }
+               if (null != processInfo) {
+                       processInfo.dispose();
+                       processInfo = null;
+               }
+               shell.dispose();
        }
-       
-       public void startTimer(){
-               if(null != timer)
+
+       public void startTimer() {
+               if (null != timer)
                        stopTimer();
-               
+
                startTime = System.currentTimeMillis();
                timer = new Timer();
-               
+
                timer.schedule(new TimerTask() {
                        @Override
                        public void run() {
@@ -165,23 +184,17 @@ public class StopProgressDialog{
                                        @Override
                                        public void run() {
                                                time = System.currentTimeMillis() - startTime;
-                                               if (time > excuteTime || true == isClose) {
-                                                       stopTimer();
-                                                       shell.close();
-                                               }
-                                               else if(true == isChange){
-                                                       processMessage.setText(message);
-                                                       processInfo.setText(infomation);
-                                                       progressbar.setSelection(selection);
+                                               if (time > excuteTime) {
+                                                       close();
                                                }
                                        }
                                });
                        }
                }, new Date(), TIMER_PERIOD);
        }
-       
-       public void stopTimer(){
-               if(null != timer){
+
+       public void stopTimer() {
+               if (null != timer) {
                        timer.cancel();
                        timer = null;
                }
index b259124..7840663 100644 (file)
@@ -2,10 +2,11 @@ package org.tizen.dynamicanalyzer.utils;
 
 import java.util.Timer;
 
+import org.eclipse.swt.widgets.Display;
+import org.tizen.dynamicanalyzer.StateManager;
 import org.tizen.dynamicanalyzer.constants.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.threads.UpdateTimerTask;
 
-
 public class UpdateViewTimer {
 
        private static Timer timer = null;
@@ -44,6 +45,12 @@ public class UpdateViewTimer {
                        timer.cancel();
                        timer = null;
                        System.out.println("update timer stop"); //$NON-NLS-1$
+                       Display.getDefault().syncExec(new Runnable() {
+                               @Override
+                               public void run() {
+                                       StateManager.getInstance().UpdateTimerStop();
+                               }
+                       });
                }
        }
 }
\ No newline at end of file