From: ggh1933.go Date: Thu, 19 May 2016 10:16:11 +0000 (+0900) Subject: [SRADA-XXX]hotfix move notifyAutoRun in Button Listner X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2fa87f67ab5a0c334c5144fd41b35b7491aca1da;p=sdk%2Ftools%2Fdynamic-analyzer.git [SRADA-XXX]hotfix move notifyAutoRun in Button Listner - If press Ok, normally AutoStart when IDE running, press cancel, don't StartTrace. - enable FeatureDialog, when Click Setting ICON on toolBar Change-Id: I0c1fe643c82b498cef1700bdef07fbf216344912 --- diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/IDECommunicator.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/IDECommunicator.java index f79cbe2..cd8d79b 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/IDECommunicator.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/IDECommunicator.java @@ -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 ideClientSocketArray = new ArrayList(); 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; + } } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/Toolbar.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/Toolbar.java index 47582a7..2d81487 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/Toolbar.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/Toolbar.java @@ -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(); } }); diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FlatFeatureDialog.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FlatFeatureDialog.java index 1789d78..97a2cbe 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FlatFeatureDialog.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FlatFeatureDialog.java @@ -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 }