Setting : check platform SDK (show binary setting page in setting dialog) 65/29465/1
authorheeyoung <heeyoung1008.hwang@samsung.com>
Tue, 28 Oct 2014 08:12:29 +0000 (17:12 +0900)
committerheeyoung <heeyoung1008.hwang@samsung.com>
Tue, 28 Oct 2014 08:12:29 +0000 (17:12 +0900)
Change-Id: I545d25bcc197634d7f626ff4cd47c99ea86f9097
Signed-off-by: heeyoung <heeyoung1008.hwang@samsung.com>
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/SettingDialog.java

index 07c53c7..55c8c59 100644 (file)
@@ -41,6 +41,7 @@ import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
+import org.tizen.dynamicanalyzer.common.Global;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
@@ -218,9 +219,10 @@ public class SettingDialog extends DAMessageBox {
                                tabView.getContentComposite(), SWT.NONE);
                tabView.addView(optionPage, false);
 
-               DABaseComposite binarySettings = new SettingDialogBinarySettingsPage(
-                               tabView.getContentComposite(), SWT.NONE);
-               tabView.addView(binarySettings, false);
+               // check platform SDK (show binary setting page)
+               if (Global.isPlatformSDK()) {
+                       createBinarySettingPage();
+               }
                
                // button composite
                buttonContentsComp = new Composite(shell, SWT.NONE);
@@ -258,34 +260,6 @@ public class SettingDialog extends DAMessageBox {
                        }
                });
                
-               // binarySettings tab is selected, the close button will be shown.
-               // ok and cancel button is hidden
-               binarySettings.addListener(SWT.Show, new Listener() {
-
-                       @Override
-                       public void handleEvent(Event event) {
-                               Logger.debug("binary settings show");
-                               cancelButton.setText(WidgetLabels.CLOSE);
-                               FormData data = (FormData) okButton.getLayoutData();
-                               data.width = 0;
-
-                               buttonContentsComp.layout();
-                       }
-               });
-
-               binarySettings.addListener(SWT.Hide, new Listener() {
-
-                       @Override
-                       public void handleEvent(Event event) {
-                               Logger.debug("binary settings hide");
-                               cancelButton.setText(WidgetLabels.CANCEL);
-                               FormData data = (FormData) okButton.getLayoutData();
-                               data.width = 100;
-
-                               buttonContentsComp.layout();
-                       }
-               });
-               
                cancelButton = new DAButton(buttonContentsComp, SWT.NONE);
                cancelButton.addClickListener(cancelButtonListener);
                cancelButton.setText(WidgetLabels.CANCEL);
@@ -326,6 +300,41 @@ public class SettingDialog extends DAMessageBox {
                shell.open();
                return true;
        }
+       
+       private void createBinarySettingPage() {
+               DABaseComposite binarySettings = new SettingDialogBinarySettingsPage(
+                               tabView.getContentComposite(), SWT.NONE);
+               tabView.addView(binarySettings, false);
+
+               
+               // binarySettings tab is selected, the close button will be shown.
+               // ok and cancel button is hidden
+               binarySettings.addListener(SWT.Show, new Listener() {
+
+                       @Override
+                       public void handleEvent(Event event) {
+                               Logger.debug("binary settings show");
+                               cancelButton.setText(WidgetLabels.CLOSE);
+                               FormData data = (FormData) okButton.getLayoutData();
+                               data.width = 0;
+
+                               buttonContentsComp.layout();
+                       }
+               });
+
+               binarySettings.addListener(SWT.Hide, new Listener() {
+
+                       @Override
+                       public void handleEvent(Event event) {
+                               Logger.debug("binary settings hide");
+                               cancelButton.setText(WidgetLabels.CANCEL);
+                               FormData data = (FormData) okButton.getLayoutData();
+                               data.width = 100;
+
+                               buttonContentsComp.layout();
+                       }
+               });
+       }
 
        private ShellListener shellListener = new ShellListener() {