[SRADA-XXX]hotfix move notifyAutoRun in Button Listner
authorggh1933.go <ggh1933.go@samsung.com>
Thu, 19 May 2016 10:16:11 +0000 (19:16 +0900)
committerggh1933.go <ggh1933.go@samsung.com>
Thu, 19 May 2016 10:59:11 +0000 (19:59 +0900)
 - If press Ok, normally AutoStart when IDE running, press cancel, don't StartTrace.
 - enable FeatureDialog, when Click Setting ICON on toolBar

Change-Id: I0c1fe643c82b498cef1700bdef07fbf216344912

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/IDECommunicator.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/Toolbar.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FlatFeatureDialog.java

index f79cbe2..cd8d79b 100644 (file)
@@ -76,7 +76,7 @@ public class IDECommunicator implements Runnable {
        private static final String IDE_DA_COMMUNICATION_TYPE_3 = "SOURCE";//$NON-NLS-1$
        private static final String IDE_DA_COMMUNICATION_TYPE_1_RECORD = "record";//$NON-NLS-1$
        private static final String IDE_DA_COMMUNICATION_TYPE_1_STOP = "stop";//$NON-NLS-1$
-
+       
        private final String IDE_DA_COMMUNICATION_PROJECT_TYPE_NATIVE = "native";
        private final String IDE_DA_COMMUNICATION_PROJECT_TYPE_PLATFORM = "platform";
        
@@ -111,7 +111,9 @@ public class IDECommunicator implements Runnable {
        private static Socket nativeIdeSocket = null;
        private static ArrayList<Socket> ideClientSocketArray = new ArrayList<Socket>();
        private int serverPort = 0;
-
+       
+       private static boolean isFeatureOK = false;
+       
        public void run() {
                daServerSocket = setServePort(); // Server Bind
                if (daServerSocket != null) {
@@ -505,7 +507,9 @@ public class IDECommunicator implements Runnable {
                                public void run() {
                                        if (Toolbar.INSTANCE.setDevice(deviceName)) {
                                                if (Toolbar.INSTANCE.setApplication(appLabel)) {
-                                                       CommandAction.startTrace(true);
+                                                       if(isFeatureOK){
+                                                               CommandAction.startTrace(true);
+                                                       }
                                                } else {
                                                        Logger.warning("Failed to set application to toolbar");
                                                }
@@ -647,4 +651,8 @@ public class IDECommunicator implements Runnable {
                }
                return setFileLock;
        }
+       
+       public static void setIsFeatureOK(boolean isOK){
+               isFeatureOK = isOK;
+       }
 }
index 47582a7..2d81487 100644 (file)
@@ -444,10 +444,10 @@ public enum Toolbar {
                        @Override
                        public void handleClickEvent(DACustomButton button) {
                                Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
-                               SettingDialog dialog = new SettingDialog(shell);
-                               dialog.open();
-                               //FlatFeatureDialog featureDialog = new FlatFeatureDialog(shell); // FIXME
-                               //featureDialog.open();
+                               //SettingDialog dialog = new SettingDialog(shell);
+                               //dialog.open();
+                               FlatFeatureDialog featureDialog = new FlatFeatureDialog(shell); // FIXME
+                               featureDialog.open();
                        }
                });
 
index 1789d78..97a2cbe 100644 (file)
@@ -70,6 +70,8 @@ public class FlatFeatureDialog extends DAMessageBox {
                        
                        doRevert();
                        doRun();
+                       IDECommunicator.setIsFeatureOK(false);
+                       notifyAutoRun();
                        
                        shell.close(); // close dialog
                }
@@ -82,6 +84,8 @@ public class FlatFeatureDialog extends DAMessageBox {
                        
                        doApply();
                        doRun();
+                       IDECommunicator.setIsFeatureOK(true);
+                       notifyAutoRun();
                        
                        shell.close(); // close dialog
                }