configuraion : can not change the setting during trace 46/24046/1
authorHyunjong.park <phjwithyou.park@samsung.com>
Tue, 8 Jul 2014 08:24:33 +0000 (17:24 +0900)
committerHyunjong.park <phjwithyou.park@samsung.com>
Tue, 8 Jul 2014 08:25:50 +0000 (17:25 +0900)
Signed-off-by: Hyunjong.park <phjwithyou.park@samsung.com>
Change-Id: Ia6f8df7c90c9741feac5b0435670b5d71b300273

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesTable.java

index 42b71d6..58388ec 100644 (file)
@@ -44,6 +44,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
+import org.tizen.dynamicanalyzer.communicator.DACommunicator;
 import org.tizen.dynamicanalyzer.constant.CommonConstants;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
@@ -467,6 +468,21 @@ public class ConfigurationDialogFeaturesPage extends DAPageComposite {
 
                        detailSettingComp.layout(true);
                }
+               if (DACommunicator.isRunning()) {
+                       if (null != detailSettingCheckBox) {
+                               detailSettingCheckBox.setEnabled(false);
+                       }
+                       if (null != textBox) {
+                               textBox.getControl().setEnabled(false);
+                       }
+                       if (null != textBoxLabel) {
+                               textBoxLabel.setEnabled(false);
+                       }
+
+                       if (null != descriptionLabel) {
+                               descriptionLabel.setEnabled(false);
+                       }
+               }
        }
 
        public static boolean isInteger(String str) {
index 8003e0b..a76bb2e 100644 (file)
@@ -33,8 +33,11 @@ import org.eclipse.nebula.widgets.grid.GridItem;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
+import org.tizen.common.Shell;
+import org.tizen.dynamicanalyzer.communicator.DACommunicator;
 import org.tizen.dynamicanalyzer.constant.CommonConstants;
 import org.tizen.dynamicanalyzer.model.TreeInput;
 import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
@@ -42,6 +45,8 @@ import org.tizen.dynamicanalyzer.resources.ImageResources;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite;
+import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
+import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
 
 public class ConfigurationDialogFeaturesTable extends DATreeComposite {
        private final int tableTextOptionColumnIndex = 1;
@@ -186,12 +191,28 @@ public class ConfigurationDialogFeaturesTable extends DATreeComposite {
                        case SWT.MouseDown:
                                switch (event.button) {
                                case MOUSE_LEFT: {
-                                       if (isClickCheckBox(item, event)) {
-                                               updateCheckBox(item, event);
-                                               updateChildCheckBoxByParent(item, event);
-                                               updateParentCheckBoxByChild(item, event);
-                                               setConfigurationDialogDataManager(item, event);
+                                       if (DACommunicator.isRunning()) {
+                                               Display.getDefault().asyncExec(new Runnable() {
+                                                       @Override
+                                                       public void run() {
+                                                               final org.eclipse.swt.widgets.Shell shell = WorkbenchUtil
+                                                                               .getWorkbenchWindow().getShell();
+                                                               DADialog dialog = new DADialog(shell, SWT.NONE,
+                                                                               550, 153);
+                                                               dialog.setIcon(ImageResources.DIALOG_WARNING_ICON);
+                                                               dialog.setMessage("You can not change the setting during trace");
+                                                               dialog.open();
+                                                       }
+                                               });
+                                       } else {
+                                               if (isClickCheckBox(item, event)) {
+                                                       updateCheckBox(item, event);
+                                                       updateChildCheckBoxByParent(item, event);
+                                                       updateParentCheckBoxByChild(item, event);
+                                                       setConfigurationDialogDataManager(item, event);
+                                               }
                                        }
+
                                        break;
                                }
                                case MOUSE_RIGHT: {