[Title] change configuration dlg.
authorHyunjong,park <phjwithyou.park@samsung.com>
Sun, 1 Dec 2013 05:43:13 +0000 (14:43 +0900)
committerHyunjong,park <phjwithyou.park@samsung.com>
Sun, 1 Dec 2013 05:43:13 +0000 (14:43 +0900)
[Desc.] setting option featurea value
[Issue] -

13 files changed:
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerConstants.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ConfigureLabels.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ConfigureLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkDetailInfoView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/ConfigureManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesTreeTableToggleRenderer.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogSettingPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/WelcomeDialog.java

index 6bea013..62f7563 100644 (file)
@@ -219,6 +219,18 @@ public class AnalyzerConstants {
                        | SYSTEM_MEMORY | SYSTEM_DISK | SYSTEM_NETWORK | SYSTEM_DEVICE;\r
 \r
        public static final int SYSTEM_ENERGY = 0x4000000;\r
+       \r
+       public static final int MEMORY_API_PROBING_NO_FILTER = 0x10000000;\r
+       public static final int FILE_API_PROBING_NO_FILTER = 0x20000000;\r
+       public static final int THREAD_API_PROBING_NO_FILTER = 0x40000000;\r
+       public static final int OSP_UI_API_PROBING_NO_FILTER = 0x80000000;\r
+       public static final int NETWORK_API_PROBING_NO_FILTER = 0x0000; //must modification\r
+       public static final int OPENGL_API_PROBING_NO_FILTER = 0x0000;//must modification\r
+       public static final int SNAPSHOT_PERIODIC = 1000;//must modification\r
+       public static final int SNAPSHOT_PERIODIC_AUTO = 1;//must modification\r
+       public static final int FUNCTION_PROFILING_SAMPLING_PERIODIC = 1000;//must modification\r
+       public static final int SYSTEM_INFOMATION_SAMPLING_PERIODIC = 1000;//must modification\r
+       \r
 \r
        /* Message Type */\r
        public static final int MSG_APP_INFO = 1; //$NON-NLS-1$\r
index f058dbf..834d160 100644 (file)
@@ -36,6 +36,8 @@ public class ConfigureLabels extends NLS {
        public static String FEATURE_TABLE_FEATURE_EMPTY;
        public static String FEATURE_TABLE_FEATURE_NAME;
        public static String FEATURE_DETAIL_TITLE;
+       public static String FEATURE_DETAIL_SETTING_TITLE;
+       
 
        public static String SETTING_TABLE_TITLE;
        public static String SETTING_WHITE;
@@ -43,6 +45,11 @@ public class ConfigureLabels extends NLS {
        public static String SETTING_CONFIGURATION_TITLE;
 
        public static String WELCONE_ASK_USE_AGAIN;
+       
+       public static String INCLUDE_INSIDE_CALL;
+       public static String AUTO;
+       public static String SECOND;
+       public static String MS;
 
        // features name
        public static String FEATURE_FUNCTION_PROFILING;
@@ -84,6 +91,17 @@ public class ConfigureLabels extends NLS {
 
        public static String SHOW_INITIAL;
        public static String AUTO_STOP;
+       
+       public static String INCLUDE_INSIDE_CALL_MEMORY;
+       public static String INCLUDE_INSIDE_CALL_THREAD;
+       public static String INCLUDE_INSIDE_CALL_FILE;
+       public static String INCLUDE_INSIDE_CALL_NETWORK;
+       public static String INCLUDE_INSIDE_CALL_UI;
+       public static String INCLUDE_INSIDE_OPENGL;
+       public static String SNAPSHOT_PERIODIC;
+       public static String SNAPSHOT_PERIODIC_AUTO;
+       public static String FUNCTION_PROFILING_SAMPLING_PERIODIC;
+       public static String SYSTEM_INFOMATION_SAMPLING_PERIODIC;
 
        public static String OFF;
        public static String ON;
index c72fab5..4cf9c47 100644 (file)
@@ -2,6 +2,7 @@ FEATURE_TABLE_TITLE=Default Settings for Analysis Features
 FEATURE_TABLE_FEATURE_EMPTY=
 FEATURE_TABLE_FEATURE_NAME=Name
 FEATURE_DETAIL_TITLE=Details
+FEATURE_DETAIL_SETTING_TITLE=Detail Setting
 
 SETTING_TABLE_TITLE=Appearance Settings
 SETTING_WHITE=White
@@ -67,4 +68,19 @@ CONFIGUREMANAGER_CHART_SELECTED_ITEM_LIST=Selected chart list
 
 INTERNAL_LOG_LEVEL=Internal log level
 
-THEME=theme
\ No newline at end of file
+THEME=theme
+
+INCLUDE_INSIDE_CALL=Include inside call
+INCLUDE_INSIDE_CALL_MEMORY=Include inside call memory
+INCLUDE_INSIDE_CALL_THREAD=Include inside call thread
+INCLUDE_INSIDE_CALL_FILE=Include inside call file
+INCLUDE_INSIDE_CALL_NETWORK=Include inside call network
+INCLUDE_INSIDE_CALL_UI=Include inside call ui
+INCLUDE_INSIDE_OPENGL=Include inside call openGL
+SNAPSHOT_PERIODIC=Snapshot periodic
+FUNCTION_PROFILING_SAMPLING_PERIODIC=Function profiling sampling periodic
+SYSTEM_INFOMATION_SAMPLING_PERIODIC=System information sampling periodic
+SNAPSHOT_PERIODIC_AUTO=Snapshot periodic auto
+MS=ms
+SECOND=s
+AUTO=auto
\ No newline at end of file
index ae4ce88..16cd873 100644 (file)
@@ -53,7 +53,6 @@ public class NetworkDetailInfoView extends DAView {
 
        public static final String ID = NetworkDetailInfoView.class.getName();
 
-       // private Canvas canvas = null;
        private Composite contents = null;
        private Text detailText = null;
        private Label labelMessage = null;
index 4e587bf..3aa83b9 100644 (file)
@@ -54,7 +54,6 @@ public class ConfigureManager {
        private static final int DEFAULT_THEME = 1;
        private static final int DEFAULT_NOT_SHOWWELCOME = 0;
 
-       // default value Chart
        public static final String CONFIGUREMANAGER_CHART_AVAILABLE_ITEM_LISTS = TimelineChartLabels.CPU_CHART_TITLE
                        + CommonConstants.COMMA
                        + TimelineChartLabels.CPU_CORE_CHART_TITLE
@@ -262,7 +261,50 @@ public class ConfigureManager {
                        data.put(ConfigureLabels.AUTO_STOP,
                                        Integer.toString(AnalyzerConstants.FEATURE_OFF));
                }
-
+               if (null == data.get(ConfigureLabels.INCLUDE_INSIDE_CALL_MEMORY)) {
+                       data.put(ConfigureLabels.INCLUDE_INSIDE_CALL_MEMORY, Integer
+                                       .toString(AnalyzerConstants.MEMORY_API_PROBING_NO_FILTER));
+               }
+               if (null == data.get(ConfigureLabels.INCLUDE_INSIDE_CALL_FILE)) {
+                       data.put(ConfigureLabels.INCLUDE_INSIDE_CALL_FILE, Integer
+                                       .toString(AnalyzerConstants.FILE_API_PROBING_NO_FILTER));
+               }
+               if (null == data.get(ConfigureLabels.INCLUDE_INSIDE_CALL_THREAD)) {
+                       data.put(ConfigureLabels.INCLUDE_INSIDE_CALL_THREAD, Integer
+                                       .toString(AnalyzerConstants.THREAD_API_PROBING_NO_FILTER));
+               }
+               if (null == data.get(ConfigureLabels.INCLUDE_INSIDE_CALL_UI)) {
+                       data.put(ConfigureLabels.INCLUDE_INSIDE_CALL_UI, Integer
+                                       .toString(AnalyzerConstants.OSP_UI_API_PROBING_NO_FILTER));
+               }
+               if (null == data.get(ConfigureLabels.INCLUDE_INSIDE_CALL_NETWORK)) {
+                       data.put(ConfigureLabels.INCLUDE_INSIDE_CALL_NETWORK, Integer
+                                       .toString(AnalyzerConstants.NETWORK_API_PROBING_NO_FILTER));
+               }
+               if (null == data.get(ConfigureLabels.INCLUDE_INSIDE_OPENGL)) {
+                       data.put(ConfigureLabels.INCLUDE_INSIDE_OPENGL, Integer
+                                       .toString(AnalyzerConstants.OPENGL_API_PROBING_NO_FILTER));
+               }
+               if (null == data.get(ConfigureLabels.SNAPSHOT_PERIODIC)) {
+                       data.put(ConfigureLabels.SNAPSHOT_PERIODIC,
+                                       Integer.toString(AnalyzerConstants.SNAPSHOT_PERIODIC));
+               }
+               if (null == data.get(ConfigureLabels.SNAPSHOT_PERIODIC_AUTO)) {
+                       data.put(ConfigureLabels.SNAPSHOT_PERIODIC_AUTO,
+                                       Integer.toString(AnalyzerConstants.SNAPSHOT_PERIODIC_AUTO));
+               }
+               if (null == data
+                               .get(ConfigureLabels.FUNCTION_PROFILING_SAMPLING_PERIODIC)) {
+                       data.put(
+                                       ConfigureLabels.FUNCTION_PROFILING_SAMPLING_PERIODIC,
+                                       Integer.toString(AnalyzerConstants.FUNCTION_PROFILING_SAMPLING_PERIODIC));
+               }
+               if (null == data
+                               .get(ConfigureLabels.SYSTEM_INFOMATION_SAMPLING_PERIODIC)) {
+                       data.put(
+                                       ConfigureLabels.SYSTEM_INFOMATION_SAMPLING_PERIODIC,
+                                       Integer.toString(AnalyzerConstants.SYSTEM_INFOMATION_SAMPLING_PERIODIC));
+               }
        }
 
        private void initConfigDataFromFile() {
index ab5ede2..b6bcaef 100644 (file)
@@ -85,13 +85,16 @@ public class ConfigurationDialog extends DAMessageBox {
        private void doApply() {
                Composite selectedComposite = tabView.getTopComposite();
                if (!(selectedComposite instanceof BinarySettingsPage)) {
-                       ConfigurationDialogDataManager.getInstance().setTableItemsList(
+                       ConfigurationDialogDataManager.getInstance().setFeaturesStatusFromTableItemsList(
                                        featuresTable);
                        ConfigurationDialogDataManager.getInstance()
                                        .applySettingValueToConfigureManager();
 
                        DACommunicator.sendRuntimeMessage(DACommunicator.MSG_TYPE_CONFIG,
                                        null);
+                       ConfigurationDialogDataManager.getInstance()
+                       .setSettingValueFromConfigureManager();
+                       featuresTable.updateTable();
                } else {
                        BinarySettingsPage page = (BinarySettingsPage) selectedComposite;
                        page.doApply();
index d8d9c03..b38ee7e 100755 (executable)
 
 package org.tizen.dynamicanalyzer.ui.toolbar.configuration;
 
+import org.tizen.dynamicanalyzer.common.CommonConstants;
+
 public class ConfigurationDialogData {
-       public String featuresName ="";
+       public String featuresName = CommonConstants.EMPTY;
        public int swapValue = 0;
        public boolean hasParrentFeature = false;
-}
+       public String optionFeaturesName = CommonConstants.EMPTY;
+       public int optionfeaturesSwapValue = 0;
 
+       public ConfigurationDialogData(String featuresName, int swapValue) {
+               this.featuresName = featuresName;
+               this.swapValue = swapValue;
+       }
+}
index 14fa3a5..3652983 100644 (file)
@@ -42,18 +42,17 @@ import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 public class ConfigurationDialogDataManager {
        private static ConfigurationDialogDataManager instance = null;
 
-       private static String[] featuresName = null;
+       private static String[] tableFeaturesName = null;
+       private static String[] optionSettingName = null;
        HashMap<String, ConfigurationDialogData> featuresStatusHashMap = new HashMap<String, ConfigurationDialogData>();
 
        private static ConfigureManager mConfig;
-//     private static final String ON = ConfigureLabels.ON;
-//     private static final String OFF = ConfigureLabels.OFF;
 
        public synchronized static ConfigurationDialogDataManager getInstance() {
                if (null == instance) {
                        instance = new ConfigurationDialogDataManager();
-                       featuresName = new String[] { 
-                       //              ConfigureLabels.FEATURE_SYSTEM,
+                       tableFeaturesName = new String[] {
+                                       // ConfigureLabels.FEATURE_SYSTEM,
                                        ConfigureLabels.FEATURE_SYSTEM_CPU,
                                        ConfigureLabels.FEATURE_SYSTEM_PROCESSES,
                                        ConfigureLabels.FEATURE_SYSTEM_MEMORY,
@@ -71,7 +70,7 @@ public class ConfigurationDialogDataManager {
                                        ConfigureLabels.FEATURE_RECORDING,
                                        ConfigureLabels.FEATURE_OPENGL,
                                        ConfigureLabels.FEATURE_NETWORK,
-                               //      ConfigureLabels.FEATURE_SYSCALL,
+                                       // ConfigureLabels.FEATURE_SYSCALL,
                                        ConfigureLabels.FEATURE_SYSCALL_FILE,
                                        ConfigureLabels.FEATURE_SYSCALL_IPC,
                                        ConfigureLabels.FEATURE_SYSCALL_PROCESS,
@@ -79,28 +78,46 @@ public class ConfigurationDialogDataManager {
                                        ConfigureLabels.FEATURE_SYSCALL_NETWORK,
                                        ConfigureLabels.FEATURE_SYSCALL_DESC,
                                        ConfigureLabels.FEATURE_CONTEXT_SWITCH };
+                       optionSettingName = new String[] { ConfigureLabels.SHOW_INITIAL,
+                                       ConfigureLabels.AUTO_STOP,
+                                       ConfigureLabels.INCLUDE_INSIDE_CALL_MEMORY,
+                                       ConfigureLabels.INCLUDE_INSIDE_CALL_THREAD,
+                                       ConfigureLabels.INCLUDE_INSIDE_CALL_FILE,
+                                       ConfigureLabels.INCLUDE_INSIDE_CALL_NETWORK,
+                                       ConfigureLabels.INCLUDE_INSIDE_CALL_UI,
+                                       ConfigureLabels.INCLUDE_INSIDE_OPENGL,
+                                       ConfigureLabels.SNAPSHOT_PERIODIC,
+                                       ConfigureLabels.SNAPSHOT_PERIODIC_AUTO,
+                                       ConfigureLabels.FUNCTION_PROFILING_SAMPLING_PERIODIC,
+                                       ConfigureLabels.SYSTEM_INFOMATION_SAMPLING_PERIODIC };
                        mConfig = ConfigureManager.getInstance();
                }
                return instance;
        }
 
-       
-       // Features
-       public String[] getFeature() {
-               return featuresName;
+       public String[] getTableFeature() {
+               return tableFeaturesName;
+       }
+
+       public String[] getOptionFeature() {
+               return optionSettingName;
        }
-       
 
-       public int featuresSwapValue(String featues) {
+       public int getfeatureSwapValue(String featues) {
                Integer swapValue = featuresStatusHashMap.get(featues).swapValue;
                return swapValue;
        }
-       
+
+       public void setfeatureSwapValue(String featureName, int value) {
+               featuresStatusHashMap.put(featureName, new ConfigurationDialogData(
+                               featureName, value));
+       }
+
        public boolean HasParentfeature(String featues) {
                Boolean hasParrent = featuresStatusHashMap.get(featues).hasParrentFeature;
                return hasParrent;
        }
-       
+
        public String getParentFeatureName(String featuresName) {
                if (featuresName.equals(ConfigureLabels.FEATURE_SYSCALL_FILE)
                                || featuresName.equals(ConfigureLabels.FEATURE_SYSCALL_IPC)
@@ -122,8 +139,42 @@ public class ConfigurationDialogDataManager {
                return CommonConstants.EMPTY;
        }
        
+       public String getOptionFeatureName(String featureName) {
+               String optionFeatusName = CommonConstants.EMPTY;
+               if (featureName.equals(ConfigureLabels.FEATURE_MEMORY_ALLOCATION)) {
+                       optionFeatusName = ConfigureLabels.INCLUDE_INSIDE_CALL_MEMORY;
+               } else if (featureName.equals(ConfigureLabels.FEATURE_THREAD)) {
+                       optionFeatusName = ConfigureLabels.INCLUDE_INSIDE_CALL_THREAD;
+               } else if (featureName.equals(ConfigureLabels.FEATURE_FILE)) {
+                       optionFeatusName = ConfigureLabels.INCLUDE_INSIDE_CALL_FILE;
+               } else if (featureName.equals(ConfigureLabels.FEATURE_NETWORK)) {
+                       optionFeatusName = ConfigureLabels.INCLUDE_INSIDE_CALL_NETWORK;
+               } else if (featureName.equals(ConfigureLabels.FEATURE_USERINTERFACE)) {
+                       optionFeatusName = ConfigureLabels.INCLUDE_INSIDE_CALL_UI;
+               } else if (featureName.equals(ConfigureLabels.FEATURE_OPENGL)) {
+                       optionFeatusName = ConfigureLabels.INCLUDE_INSIDE_OPENGL;
+               } else if (featureName.equals(ConfigureLabels.SNAPSHOT_PERIODIC)) {
+                       optionFeatusName = ConfigureLabels.SNAPSHOT_PERIODIC_AUTO;
+               } else if (featureName.equals(ConfigureLabels.FEATURE_SCREENSHOT)) {
+                       optionFeatusName = ConfigureLabels.SNAPSHOT_PERIODIC;
+               } else if (featureName
+                               .equals(ConfigureLabels.FEATURE_FUNCTION_PROFILING)) {
+                       optionFeatusName = ConfigureLabels.FUNCTION_PROFILING_SAMPLING_PERIODIC;
+               } else if (featureName.equals(ConfigureLabels.FEATURE_SYSTEM)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_CPU)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_PROCESSES)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_MEMORY)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_DISK)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_NETWORK)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_DEVICE)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_ENERGY)) {
+                       optionFeatusName = ConfigureLabels.SYSTEM_INFOMATION_SAMPLING_PERIODIC;
+               }
+               return optionFeatusName;
+       }
+       
 
-       public void setFeaturesChecked(String featureName, boolean status) {
+       public void setFeaturesSwapValue(String featureName, boolean status) {
                int value = AnalyzerConstants.FEATURE_OFF;
                if (status) {
                        if (featureName.equals(ConfigureLabels.FEATURE_SYSTEM)) {
@@ -190,45 +241,81 @@ public class ConfigurationDialogDataManager {
                        } else if (featureName
                                        .equals(ConfigureLabels.FEATURE_SYSTEM_ENERGY)) {
                                value = AnalyzerConstants.SYSTEM_ENERGY;
-                       } else {
+                       }
+                       // option
+                       else if (featureName.equals(ConfigureLabels.SHOW_INITIAL)) {
+                               value = AnalyzerConstants.FEATURE_OFF;
+                       } else if (featureName.equals(ConfigureLabels.AUTO_STOP)) {
+                               value = AnalyzerConstants.FEATURE_OFF;
+                       } else if (featureName
+                                       .equals(ConfigureLabels.INCLUDE_INSIDE_CALL_MEMORY)) {
+                               value = AnalyzerConstants.MEMORY_API_PROBING_NO_FILTER;
+                       } else if (featureName
+                                       .equals(ConfigureLabels.INCLUDE_INSIDE_CALL_FILE)) {
+                               value = AnalyzerConstants.FILE_API_PROBING_NO_FILTER;
+                       } else if (featureName
+                                       .equals(ConfigureLabels.INCLUDE_INSIDE_CALL_THREAD)) {
+                               value = AnalyzerConstants.THREAD_API_PROBING_NO_FILTER;
+                       } else if (featureName
+                                       .equals(ConfigureLabels.INCLUDE_INSIDE_CALL_UI)) {
+                               value = AnalyzerConstants.OSP_UI_API_PROBING_NO_FILTER;
+                       } else if (featureName
+                                       .equals(ConfigureLabels.INCLUDE_INSIDE_CALL_NETWORK)) {
+                               value = AnalyzerConstants.NETWORK_API_PROBING_NO_FILTER;
+                       } else if (featureName
+                                       .equals(ConfigureLabels.INCLUDE_INSIDE_OPENGL)) {
+                               value = AnalyzerConstants.OPENGL_API_PROBING_NO_FILTER;
+                       } else if (featureName.equals(ConfigureLabels.SNAPSHOT_PERIODIC)) {
+                               value = AnalyzerConstants.SNAPSHOT_PERIODIC;
+                       } else if (featureName.equals(ConfigureLabels.SNAPSHOT_PERIODIC_AUTO)) {
+                               value = AnalyzerConstants.SNAPSHOT_PERIODIC_AUTO;
+                       } else if (featureName
+                                       .equals(ConfigureLabels.FUNCTION_PROFILING_SAMPLING_PERIODIC)) {
+                               value = AnalyzerConstants.FUNCTION_PROFILING_SAMPLING_PERIODIC;
+                       } else if (featureName
+                                       .equals(ConfigureLabels.SYSTEM_INFOMATION_SAMPLING_PERIODIC)) {
+                               value = AnalyzerConstants.SYSTEM_INFOMATION_SAMPLING_PERIODIC;
+                       }
+
+                       else {
                                System.out.println("failed set feature : " + featureName);
                        }
                }
-               ConfigurationDialogData data = new ConfigurationDialogData();
-               data.featuresName = featureName;
-               data.swapValue = value;
-               featuresStatusHashMap.put(featureName, data);
+               featuresStatusHashMap.put(featureName, new ConfigurationDialogData(
+                               featureName, value));
        }
 
        public void setSettingValueFromConfigureManager() {
                // Table Feature
-               for (String featureName : ConfigurationDialogDataManager.getInstance()
-                               .getFeature()) {
+               for (String featureName : getTableFeature()) {
                        try {
-                               ConfigurationDialogData data = new ConfigurationDialogData();
-                               data.featuresName = featureName;
-                               data.swapValue = mConfig.getValueInt(featureName);
+                               ConfigurationDialogData data = new ConfigurationDialogData(
+                                               featureName, mConfig.getValueInt(featureName));
                                String parentFeaturesName = getParentFeatureName(featureName);
                                if (parentFeaturesName.equals(CommonConstants.EMPTY)) {
                                        data.hasParrentFeature = false;
                                } else {
                                        data.hasParrentFeature = true;
                                }
+                               String optionFeatureName = getOptionFeatureName(featureName);
+                               if (optionFeatureName.equals(CommonConstants.EMPTY)) {
+                                       data.optionFeaturesName = optionFeatureName;
+                               }
                                featuresStatusHashMap.put(featureName, data);
                        } catch (NumberFormatException e) {
                                e.printStackTrace();
                        }
                }
-               // Setting
-               ConfigurationDialogData initalData = new ConfigurationDialogData();
-               initalData.featuresName = ConfigureLabels.SHOW_INITIAL;
-               initalData.swapValue = mConfig.getValueInt(ConfigureLabels.SHOW_INITIAL);
-               featuresStatusHashMap.put(ConfigureLabels.SHOW_INITIAL, initalData);
 
-               ConfigurationDialogData autoStopData = new ConfigurationDialogData();
-               autoStopData.featuresName = ConfigureLabels.SHOW_INITIAL;
-               autoStopData.swapValue = mConfig.getValueInt(ConfigureLabels.SHOW_INITIAL);
-               featuresStatusHashMap.put(ConfigureLabels.AUTO_STOP, autoStopData);
+               for (String featureName : getOptionFeature()) {
+                       try {
+                               ConfigurationDialogData data = new ConfigurationDialogData(
+                                               featureName, mConfig.getValueInt(featureName));
+                               featuresStatusHashMap.put(featureName, data);
+                       } catch (NumberFormatException e) {
+                               e.printStackTrace();
+                       }
+               }
        }
 
        private void setConfig(int featureStatus, String featureName) {
@@ -240,25 +327,20 @@ public class ConfigurationDialogDataManager {
                changedFeatures();
 
                // Table Feature
-               for (String featureName : ConfigurationDialogDataManager.getInstance()
-                               .getFeature()) {
+               for (String featureName : getTableFeature()) {
                        setConfig(featuresStatusHashMap.get(featureName).swapValue,
                                        featureName);
                }
                // Setting
-               setConfig(
-                               featuresStatusHashMap.get(ConfigureLabels.SHOW_INITIAL).swapValue,
-                               ConfigureLabels.SHOW_INITIAL);
-               setConfig(
-                               featuresStatusHashMap.get(ConfigureLabels.AUTO_STOP).swapValue,
-                               ConfigureLabels.AUTO_STOP);
+               for (String featureName : getOptionFeature()) {
+                       setConfig(featuresStatusHashMap.get(featureName).swapValue,
+                                       featureName);
+               }
        }
 
        private void changedFeatures() {
                // Table Feature
-               for (String featureName : ConfigurationDialogDataManager.getInstance()
-                               .getFeature()) {
-
+               for (String featureName : getTableFeature()) {
                        int featuresStatus = featuresStatusHashMap.get(featureName).swapValue;
                        int configFileStatus = mConfig.getValueInt(featureName);
                        if (featuresStatus != configFileStatus) {
@@ -303,26 +385,16 @@ public class ConfigurationDialogDataManager {
                        }
                }
 
-               // Setting
-               String showInitialFeaturesStatus = featuresStatusHashMap
-                               .get(ConfigureLabels.SHOW_INITIAL).featuresName;
-               String showInitalConfigFileStatus = mConfig
-                               .getValue(ConfigureLabels.SHOW_INITIAL);
-               if (!showInitialFeaturesStatus.equals(showInitalConfigFileStatus)) {
-                       System.out.println("change values : "
-                                       + ConfigureLabels.SHOW_INITIAL);
-               }
-
-               String autoStopStatus = featuresStatusHashMap
-                               .get(ConfigureLabels.AUTO_STOP).featuresName;
-               String autoStopConfigFileStatus = mConfig
-                               .getValue(ConfigureLabels.AUTO_STOP);
-               if (!autoStopStatus.equals(autoStopConfigFileStatus)) {
-                       System.out.println("change values : " + ConfigureLabels.AUTO_STOP);
+               for (String featureName : getOptionFeature()) {
+                       int featuresStatus = featuresStatusHashMap.get(featureName).swapValue;
+                       int configFileStatus = mConfig.getValueInt(featureName);
+                       if (featuresStatus != configFileStatus) {
+                               System.out.println("change values : " + featureName);
+                       }
                }
        }
 
-       public void setTableItemsList(DATableComposite featureComp) {
+       public void setFeaturesStatusFromTableItemsList(DATableComposite featureComp) {
                for (int i = 0; i < featureComp.getTable().getItemCount(); i++) {
                        String featureName = featureComp.getTable().getItem(i).getText(0);
                        String optionText = featureComp.getTable().getItem(i).getText(1);
@@ -334,48 +406,25 @@ public class ConfigurationDialogDataManager {
                                isChecked = false;
                        }
 
-                       ConfigurationDialogDataManager.getInstance().setFeaturesChecked(
+                       ConfigurationDialogDataManager.getInstance().setFeaturesSwapValue(
                                        featureName, isChecked);
                }
        }
 
-       // // Configuration
        public boolean isShowInitia() {
-               if (featuresStatusHashMap.get(ConfigureLabels.SHOW_INITIAL).swapValue == 1) {
+               if (featuresStatusHashMap.get(ConfigureLabels.SHOW_INITIAL).swapValue > 0) {
                        return true;
                } else {
                        return false;
                }
        }
 
-       public void setShowInitia(boolean showInitia) {
-               ConfigurationDialogData initalData = new ConfigurationDialogData();
-               initalData.featuresName = ConfigureLabels.SHOW_INITIAL;
-               if (showInitia) {
-                       initalData.swapValue = 1;
-               } else {
-                       initalData.swapValue = 0;
-               }
-               featuresStatusHashMap.put(ConfigureLabels.SHOW_INITIAL, initalData);
-       }
-
        public boolean isAutoStop() {
-               if (featuresStatusHashMap.get(ConfigureLabels.AUTO_STOP).swapValue == 1) {
+               if (featuresStatusHashMap.get(ConfigureLabels.AUTO_STOP).swapValue > 0) {
                        return true;
                } else {
                        return false;
                }
-       }
 
-       public void setAutoStop(boolean autoStop) {
-               ConfigurationDialogData autoStopData = new ConfigurationDialogData();
-               autoStopData.featuresName = ConfigureLabels.SHOW_INITIAL;
-               if (autoStop) {
-                       autoStopData.swapValue = 1;
-               } else {
-                       autoStopData.swapValue = 0;
-               }
-               featuresStatusHashMap.put(ConfigureLabels.AUTO_STOP, autoStopData);
        }
-
 }
index b40af0c..aebc8b0 100644 (file)
 
 package org.tizen.dynamicanalyzer.ui.toolbar.configuration;
 
+import org.eclipse.nebula.widgets.grid.GridItem;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ControlEvent;
 import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
 import org.eclipse.swt.events.MouseEvent;
 import org.eclipse.swt.events.MouseListener;
 import org.eclipse.swt.events.PaintEvent;
@@ -39,11 +42,10 @@ import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FormAttachment;
 import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Canvas;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
-import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
@@ -51,19 +53,24 @@ import org.tizen.dynamicanalyzer.resources.FontResources;
 import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DefaultTableComparator;
+import org.tizen.dynamicanalyzer.widgets.button.checkbox.DACheckBox;
+import org.tizen.dynamicanalyzer.widgets.button.checkbox.DACheckboxSelectionListener;
 
 public class ConfigurationDialogFeaturesPage extends DAPageComposite {
        public static final String ID = ConfigurationDialogFeaturesPage.class
                        .getName();
        private DATableComposite featuresTable = null;
-       private Canvas detail = null;
+       // private Canvas detail = null;
+       private Composite detailSettingComp = null;
 
        int[] sortTypes = { AnalyzerConstants.SORT_TYPE_GRID };
        private String[] columnNames = { ConfigureLabels.FEATURE_TABLE_FEATURE_NAME };
        private int[] columnSizes = { 571 };
        private boolean[] columnVisibility = { true };
 
-       private String detaillMsg = CommonConstants.EMPTY;
+       private Text textBox = null;
+       private Label textBoxLabel = null;
+       private DACheckBox detailSettingCheckBox = null;
 
        public ConfigurationDialogFeaturesPage(Composite parent, int style) {
                super(parent, style);
@@ -132,29 +139,33 @@ public class ConfigurationDialogFeaturesPage extends DAPageComposite {
 
                // Details Title
                Label detailLabel = new Label(this, SWT.TRANSPARENT);
-               detailLabel.setText(ConfigureLabels.FEATURE_DETAIL_TITLE);
+               detailLabel.setText(ConfigureLabels.FEATURE_DETAIL_SETTING_TITLE);
                detailLabel
                                .setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
                detailLabel.setForeground(ColorResources.DEFAULT_FONT_COLOR);
                detailLabel.setFont(FontResources.CONFIGURATION_TABLE_TITLE_FONT);
                data = new FormData();
-               data.top = new FormAttachment(tableComp, 20);
+               data.top = new FormAttachment(tableComp, 15);
                data.left = new FormAttachment(0, 8);
                detailLabel.setLayoutData(data);
 
-               detail = new Canvas(this, SWT.NONE);
-               detail.addPaintListener(detailPaintListener);
-               data = new FormData();
-               data.top = new FormAttachment(detailLabel, 6);
-               data.left = new FormAttachment(0, 5);
-               data.height = 35;
-               data.width = 592;
-               detail.setLayoutData(data);
+               // Setting
+               detailSettingComp = new Composite(this, SWT.NONE);
+               FormLayout compLayout = new FormLayout();
+               detailSettingComp.setLayout(compLayout);
+               detailSettingComp
+                               .setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
+               FormData compData = new FormData();
+               compData.top = new FormAttachment(detailLabel, 5);
+               compData.left = new FormAttachment(0, 5);
+               compData.right = new FormAttachment(100, -5);
+               compData.bottom = new FormAttachment(100, -5);
+               detailSettingComp.setLayoutData(compData);
 
                featuresTable.updateTable();
        }
-       
-       public DATableComposite getFeatureTable(){
+
+       public DATableComposite getFeatureTable() {
                return this.featuresTable;
        }
 
@@ -162,7 +173,7 @@ public class ConfigurationDialogFeaturesPage extends DAPageComposite {
 
                @Override
                public void widgetSelected(SelectionEvent e) {
-                       // updateDetails();
+                       // TODO Auto-generated method stub
                }
 
                @Override
@@ -181,62 +192,320 @@ public class ConfigurationDialogFeaturesPage extends DAPageComposite {
                @Override
                public void mouseDown(MouseEvent e) {
                        // TODO Auto-generated method stub
+                       updateDetails();
                }
 
                @Override
                public void mouseDoubleClick(MouseEvent e) {
-                       // updateDetails();
+                       // TODO Auto-generated method stub
                }
        };
 
-       // private void updateDetails() {
-       // GridItem[] items = featuresTable.getTable().getSelection();
-       // if (items.length == 0) {
-       // return;
-       // }
-       // GridItem item = items[0];
-       // for (String featueName :
-       // ConfigurationDialogValues.getInstance().getFeature()) {
-       // if( featueName.equals(item.getText(1))){
-       // if( featueName.equals(ConfigureLabels.FEATURE_FUNCTION_PROFILING)){
-       // detaillMsg = ConfigureLabels.DETAIL_FUNCTIONPROFILING;
-       // }else if( featueName.equals(ConfigureLabels.FEATURE_MEMORY_ALLOCATION)){
-       // detaillMsg = ConfigureLabels.DETAIL_ALLOCATION;
-       // }else if( featueName.equals(ConfigureLabels.FEATURE_FILE)){
-       // detaillMsg = ConfigureLabels.DETAIL_FILE;
-       // }else if( featueName.equals(ConfigureLabels.FEATURE_THREAD)){
-       // detaillMsg = ConfigureLabels.DETAIL_THREAD;
-       // }else if( featueName.equals(ConfigureLabels.FEATURE_USERINTERFACE)){
-       // detaillMsg = ConfigureLabels.DETAIL_USERINTERFACE;
-       // }else if( featueName.equals(ConfigureLabels.FEATURE_SCREENSHOT)){
-       // detaillMsg = ConfigureLabels.DETAIL_SNAPSHOT;
-       // }else if( featueName.equals(ConfigureLabels.FEATURE_USER_EVENT)){
-       // detaillMsg = ConfigureLabels.DETAIL_EVENT;
-       // }else{
-       // System.out.println("failed undefine features");
-       // }
-       // }
-       // }
-       // detail.redraw();
-       // }
-
-       private PaintListener detailPaintListener = new PaintListener() {
+       private void updateDetails() {
+               GridItem[] items = featuresTable.getTable().getSelection();
+               if (items.length == 0) {
+                       return;
+               }
+               if (null != detailSettingCheckBox) {
+                       detailSettingCheckBox.dispose();
+                       detailSettingCheckBox = null;
+               }
+               if (null != textBox) {
+                       textBox.dispose();
+                       textBox = null;
+               }
+               if (null != textBoxLabel) {
+                       textBoxLabel.dispose();
+                       textBoxLabel = null;
+               }
+
+               String featureName = items[0].getText(0);
+               if (featureName.equals(ConfigureLabels.FEATURE_MEMORY_ALLOCATION)
+                               || featureName.equals(ConfigureLabels.FEATURE_THREAD)
+                               || featureName.equals(ConfigureLabels.FEATURE_FILE)
+                               || featureName.equals(ConfigureLabels.FEATURE_NETWORK)
+                               || featureName.equals(ConfigureLabels.FEATURE_USERINTERFACE)
+                               || featureName.equals(ConfigureLabels.FEATURE_OPENGL)) {
+                       detailSettingCheckBox = new DACheckBox(detailSettingComp, SWT.NONE);
+                       FormData data = new FormData();
+                       data.top = new FormAttachment(0, 10);
+                       data.left = new FormAttachment(0, 10);
+                       data.height = 20;
+                       data.width = 300;
+                       detailSettingCheckBox.setLayoutData(data);
+                       detailSettingCheckBox.setForeground(ColorResources.BLACK);
+                       detailSettingCheckBox
+                                       .setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
+                       detailSettingCheckBox
+                                       .setFont(FontResources.CONFIGURATION_TABLE_TITLE_FONT);
+                       detailSettingCheckBox.setText(ConfigureLabels.INCLUDE_INSIDE_CALL);
+                       detailSettingCheckBox
+                                       .addSelectionListener(includeInsideCallCheckBoxListener);
+                       String optionFeatusName = ConfigurationDialogDataManager
+                                       .getInstance().getOptionFeatureName(featureName);
+
+                       if (ConfigurationDialogDataManager.getInstance()
+                                       .getfeatureSwapValue(optionFeatusName) > 0) {
+                               detailSettingCheckBox.setChecked(true);
+                       } else {
+                               detailSettingCheckBox.setChecked(false);
+                       }
+
+                       if (ConfigurationDialogDataManager.getInstance()
+                                       .getfeatureSwapValue(featureName) > 0) {
+                               detailSettingCheckBox.setEnabled(true);
+                       } else {
+                               detailSettingCheckBox.setEnabled(false);
+                       }
+                       detailSettingComp.layout(true);
+               } else if (featureName.equals(ConfigureLabels.FEATURE_SCREENSHOT)) {
+                       detailSettingCheckBox = new DACheckBox(detailSettingComp, SWT.NONE);
+                       FormData data = new FormData();
+                       data.top = new FormAttachment(0, 10);
+                       data.left = new FormAttachment(0, 10);
+                       data.height = 20;
+                       data.width = 170;
+                       detailSettingCheckBox.setLayoutData(data);
+                       detailSettingCheckBox.setForeground(ColorResources.BLACK);
+                       detailSettingCheckBox
+                                       .setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
+                       detailSettingCheckBox
+                                       .setFont(FontResources.CONFIGURATION_TABLE_TITLE_FONT);
+                       detailSettingCheckBox
+                                       .setText(ConfigureLabels.SNAPSHOT_PERIODIC_AUTO);
+                       detailSettingCheckBox
+                                       .addSelectionListener(snapshotPeriodicAutoCheckBoxListener);
+
+                       // if (ConfigurationDialogDataManager
+                       // .getInstance()
+                       // .getfeatureSwapValue(ConfigureLabels.SNAPSHOT_PERIODIC_AUTO) > 0)
+                       // {
+                       // detailSettingCheckBox.setChecked(false);
+                       // } else {
+                       // ConfigurationDialogDataManager.getInstance()
+                       // .setfeatureSwapValue(
+                       // ConfigureLabels.SNAPSHOT_PERIODIC_AUTO, 1);
+                       // detailSettingCheckBox.setChecked(true);
+                       // }
+
+                       textBox = new Text(detailSettingComp, SWT.SINGLE);
+                       data = new FormData();
+                       data.top = new FormAttachment(0, 10);
+                       data.left = new FormAttachment(0, 200);
+                       data.height = 15;
+                       data.width = 50;
+                       textBox.setLayoutData(data);
+                       textBox.setBackground(ColorResources.VIEW_BG_COLOR);
+                       textBox.addKeyListener(keyListener);
+                       textBox.addPaintListener(new PaintListener() {
+                               @Override
+                               public void paintControl(PaintEvent e) {
+                                       e.gc.setForeground(ColorResources.BUTTON_OUTLINE_HOVER_IN_COLOR);
+                                       Text text = (Text) e.widget;
+                                       Rectangle rect = text.getClientArea();
+                                       e.gc.drawRectangle(rect.x, rect.y, rect.width - 1,
+                                                       rect.height - 1);
+                               }
+                       });
+
+                       String optionFeatusName = ConfigurationDialogDataManager
+                                       .getInstance().getOptionFeatureName(featureName);
+                       int savedValue = ConfigurationDialogDataManager.getInstance()
+                                       .getfeatureSwapValue(optionFeatusName);
+                       textBox.setText(Integer.toString(savedValue));
+
+                       textBoxLabel = new Label(detailSettingComp, SWT.TRANSPARENT);
+                       textBoxLabel.setText(ConfigureLabels.SECOND);
+                       textBoxLabel
+                                       .setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
+                       textBoxLabel.setForeground(ColorResources.DEFAULT_FONT_COLOR);
+                       textBoxLabel.setFont(FontResources.CONFIGURATION_TABLE_TITLE_FONT);
+                       data = new FormData();
+                       data.top = new FormAttachment(0, 13);
+                       data.left = new FormAttachment(textBox, 5);
+                       textBoxLabel.setLayoutData(data);
+
+                       if (ConfigurationDialogDataManager
+                                       .getInstance()
+                                       .getfeatureSwapValue(ConfigureLabels.SNAPSHOT_PERIODIC_AUTO) > 0) {
+                               detailSettingCheckBox.setChecked(true);
+                       } else {
+                               detailSettingCheckBox.setChecked(false);
+                       }
+
+                       if (ConfigurationDialogDataManager.getInstance()
+                                       .getfeatureSwapValue(featureName) > 0) {
+                               detailSettingCheckBox.setEnabled(true);
+                               textBox.setEditable(true);
+                       } else {
+                               detailSettingCheckBox.setEnabled(false);
+                               textBox.setEditable(false);
+                       }
+
+                       if (ConfigurationDialogDataManager.getInstance()
+                                       .getfeatureSwapValue(featureName) > 0
+                                       && ConfigurationDialogDataManager.getInstance()
+                                                       .getfeatureSwapValue(
+                                                                       ConfigureLabels.SNAPSHOT_PERIODIC_AUTO) < 1) {
+                               textBox.setEditable(true);
+                       } else {
+                               textBox.setEditable(false);
+                       }
+                       detailSettingComp.layout(true);
+               } else if (featureName
+                               .equals(ConfigureLabels.FEATURE_FUNCTION_PROFILING)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_CPU)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_PROCESSES)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_MEMORY)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_DISK)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_NETWORK)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_DEVICE)
+                               || featureName.equals(ConfigureLabels.FEATURE_SYSTEM_ENERGY)) {
+                       if (featureName.equals(ConfigureLabels.FEATURE_SYSTEM)) {
+                               featureName = ConfigureLabels.FEATURE_SYSTEM_CPU;
+                       }
+
+                       textBox = new Text(detailSettingComp, SWT.SINGLE);
+                       FormData data = new FormData();
+                       data.top = new FormAttachment(0, 10);
+                       data.left = new FormAttachment(0, 10);
+                       data.height = 15;
+                       data.width = 50;
+                       textBox.setLayoutData(data);
+                       textBox.setBackground(ColorResources.VIEW_BG_COLOR);
+                       textBox.addKeyListener(keyListener);
+                       textBox.addPaintListener(new PaintListener() {
+                               @Override
+                               public void paintControl(PaintEvent e) {
+                                       e.gc.setForeground(ColorResources.BUTTON_OUTLINE_HOVER_IN_COLOR);
+                                       Text text = (Text) e.widget;
+                                       Rectangle rect = text.getClientArea();
+                                       e.gc.drawRectangle(rect.x, rect.y, rect.width - 1,
+                                                       rect.height - 1);
+                               }
+                       });
 
+                       String optionFeatusName = ConfigurationDialogDataManager
+                                       .getInstance().getOptionFeatureName(featureName);
+                       int savedValue = ConfigurationDialogDataManager.getInstance()
+                                       .getfeatureSwapValue(optionFeatusName);
+                       textBox.setText(Integer.toString(savedValue));
+
+                       textBoxLabel = new Label(detailSettingComp, SWT.TRANSPARENT);
+                       textBoxLabel.setText(ConfigureLabels.MS);
+                       textBoxLabel
+                                       .setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
+                       textBoxLabel.setForeground(ColorResources.DEFAULT_FONT_COLOR);
+                       textBoxLabel.setFont(FontResources.CONFIGURATION_TABLE_TITLE_FONT);
+                       data = new FormData();
+                       data.top = new FormAttachment(0, 13);
+                       data.left = new FormAttachment(textBox, 5);
+                       textBoxLabel.setLayoutData(data);
+
+                       if (ConfigurationDialogDataManager.getInstance()
+                                       .getfeatureSwapValue(featureName) > 0) {
+                               textBox.setEditable(true);
+                       } else {
+                               textBox.setEditable(false);
+                       }
+                       detailSettingComp.layout(true);
+               } else {
+
+               }
+       }
+
+       public static boolean isInteger(String str) {
+               try {
+                       Integer.parseInt(str);
+                       return true;
+               } catch (NumberFormatException e) {
+                       return false;
+               }
+       }
+
+       private DACheckboxSelectionListener snapshotPeriodicAutoCheckBoxListener = new DACheckboxSelectionListener() {
                @Override
-               public void paintControl(PaintEvent e) {
-                       Canvas canvas = (Canvas) e.widget;
-                       Rectangle rect = canvas.getClientArea();
-                       e.gc.setBackground(ColorResources.WHITE);
-                       e.gc.fillRectangle(rect);
-                       e.gc.setForeground(ColorResources.OPEN_TRACE_TABLE_OUTLINE_COLOR);
-                       e.gc.drawRectangle(rect.x, rect.y, rect.width - 1, rect.height - 1);
-                       e.gc.setFont(FontResources.TABLE_CELL_FONT);
-                       int x = rect.x + 7;
-                       int y = rect.y + 4;
-                       e.gc.setForeground(ColorResources.OPEN_TRACE_SAVE_CONTENTS_COLOR);
-                       e.gc.drawText(detaillMsg, x, y);
+               public void handleSelectionEvent(DACheckBox checkbox) {
+                       GridItem[] items = featuresTable.getTable().getSelection();
+                       if (items.length == 0) {
+                               return;
+                       }
+                       if (ConfigurationDialogDataManager
+                                       .getInstance()
+                                       .getfeatureSwapValue(ConfigureLabels.SNAPSHOT_PERIODIC_AUTO) > 0) {
+                               ConfigurationDialogDataManager.getInstance()
+                                               .setfeatureSwapValue(
+                                                               ConfigureLabels.SNAPSHOT_PERIODIC_AUTO, 0);
+                               detailSettingCheckBox.setChecked(false);
 
+                       } else {
+                               ConfigurationDialogDataManager.getInstance()
+                                               .setfeatureSwapValue(
+                                                               ConfigureLabels.SNAPSHOT_PERIODIC_AUTO, 1);
+                               detailSettingCheckBox.setChecked(true);
+                       }
+                       updateDetails();
                }
        };
 
+       private DACheckboxSelectionListener includeInsideCallCheckBoxListener = new DACheckboxSelectionListener() {
+               @Override
+               public void handleSelectionEvent(DACheckBox checkbox) {
+                       GridItem[] items = featuresTable.getTable().getSelection();
+                       if (items.length == 0) {
+                               return;
+                       }
+                       String featureName = items[0].getText(0);
+                       String optionFeatusName = ConfigurationDialogDataManager
+                                       .getInstance().getOptionFeatureName(featureName);
+                       if (ConfigurationDialogDataManager.getInstance()
+                                       .getfeatureSwapValue(optionFeatusName) > 0) {
+                               ConfigurationDialogDataManager.getInstance()
+                                               .setFeaturesSwapValue(optionFeatusName, false);
+                               detailSettingCheckBox.setChecked(false);
+                       } else {
+                               ConfigurationDialogDataManager.getInstance()
+                                               .setfeatureSwapValue(optionFeatusName, 1);
+                               detailSettingCheckBox.setChecked(true);
+                       }
+                       updateDetails();
+               }
+       };
+
+       private KeyListener keyListener = new KeyListener() {
+
+               @Override
+               public void keyReleased(KeyEvent e) {
+                       GridItem[] items = featuresTable.getTable().getSelection();
+                       if (items.length == 0) {
+                               return;
+                       }
+                       String featureName = items[0].getText(0);
+                       if (isInteger(textBox.getText())) {
+                               int textBoxData = Integer.parseInt(textBox.getText());
+                               if (textBoxData > 0) {
+                                       ConfigurationDialogDataManager.getInstance()
+                                                       .setfeatureSwapValue(
+                                                                       ConfigurationDialogDataManager
+                                                                                       .getInstance()
+                                                                                       .getOptionFeatureName(featureName),
+                                                                       textBoxData);
+                               } else {
+                                       ConfigurationDialogDataManager.getInstance()
+                                                       .setFeaturesSwapValue(
+                                                                       ConfigurationDialogDataManager
+                                                                                       .getInstance()
+                                                                                       .getOptionFeatureName(featureName),
+                                                                       false);
+                               }
+                       }
+                       // updateDetails();
+               }
+
+               @Override
+               public void keyPressed(KeyEvent e) {
+
+               }
+       };
 }
\ No newline at end of file
index 9e4a395..74b25c3 100644 (file)
@@ -38,6 +38,7 @@ import org.eclipse.swt.widgets.Listener;
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.model.TreeInput;
+import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
 import org.tizen.dynamicanalyzer.resources.ImageResources;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer;
@@ -47,6 +48,7 @@ public class ConfigurationDialogFeaturesTable extends DATreeComposite {
        public static final String ITEM_PARENT_FEATURE_NAME_ITEM = ", parent_feature_name_";//$NON-NLS-1$
        public static final String ITEM_ALL_CHECKED = ", item_all_checked ";//$NON-NLS-1$
        public static final String ITEM_PART_CHECKED = ", item_part_checked ";//$NON-NLS-1$
+       public static final String FEATURE_OPTION_VALUE = ", feature_option_value ";//$NON-NLS-1$
 
        private final int tableTextOptionColumnIndex = 1;
 
@@ -80,7 +82,7 @@ public class ConfigurationDialogFeaturesTable extends DATreeComposite {
 
        private String isCheckFeatue(String featueName) {
                if (AnalyzerConstants.FEATURE_OFF != ConfigurationDialogDataManager
-                               .getInstance().featuresSwapValue(featueName)) {
+                               .getInstance().getfeatureSwapValue(featueName)) {
                        return ITEM_ALL_CHECKED;
                } else {
                        return CommonConstants.EMPTY;
@@ -98,6 +100,13 @@ public class ConfigurationDialogFeaturesTable extends DATreeComposite {
                if (!parentFeatureName.equals(CommonConstants.EMPTY)) {
                        optionColumn += (ITEM_PARENT_FEATURE_NAME_ITEM + parentFeatureName);
                }
+
+               String optionFeatureName = ConfigurationDialogDataManager.getInstance()
+                               .getOptionFeatureName(featueName);
+               if (!optionFeatureName.equals(CommonConstants.EMPTY)) {
+                       optionColumn += (FEATURE_OPTION_VALUE + getOptionText(optionFeatureName));
+               }
+
                text.add(optionColumn);
 
                TreeInput outPut = new TreeInput();
@@ -110,7 +119,7 @@ public class ConfigurationDialogFeaturesTable extends DATreeComposite {
        public List<TreeInput> makeTreeInput() {
                List<TreeInput> output = new ArrayList<TreeInput>();
                String[] featuresList = ConfigurationDialogDataManager.getInstance()
-                               .getFeature();
+                               .getTableFeature();
                for (int i = 0; i < featuresList.length; i++) {
                        String featuresName = featuresList[i];
                        TreeInput currentNode = makeInput(featuresName);
@@ -173,7 +182,47 @@ public class ConfigurationDialogFeaturesTable extends DATreeComposite {
                        }
 
                }
+       }
+
+       private String getOptionText(String featureName) {
+
+               int optionFeatureValue = ConfigurationDialogDataManager.getInstance()
+                               .getfeatureSwapValue(featureName);
+               if (optionFeatureValue < 1) {
+                       return CommonConstants.EMPTY;
+               }
 
+               StringBuffer optionValue = new StringBuffer();
+               optionValue.append(CommonConstants.SPACE).append(
+                               CommonConstants.OPEN_BRACKET);
+
+               if (featureName.equals(ConfigureLabels.INCLUDE_INSIDE_CALL_MEMORY)
+                               || featureName
+                                               .equals(ConfigureLabels.INCLUDE_INSIDE_CALL_THREAD)
+                               || featureName.equals(ConfigureLabels.INCLUDE_INSIDE_CALL_FILE)
+                               || featureName
+                                               .equals(ConfigureLabels.INCLUDE_INSIDE_CALL_NETWORK)
+                               || featureName.equals(ConfigureLabels.INCLUDE_INSIDE_CALL_UI)
+                               || featureName.equals(ConfigureLabels.INCLUDE_INSIDE_OPENGL)) {
+                       optionValue.append(ConfigureLabels.INCLUDE_INSIDE_CALL);
+               } else if (featureName.equals(ConfigureLabels.SNAPSHOT_PERIODIC)) {
+                       if (ConfigurationDialogDataManager
+                                       .getInstance()
+                                       .getfeatureSwapValue(ConfigureLabels.SNAPSHOT_PERIODIC_AUTO) > 0) {
+                               optionValue.append(ConfigureLabels.AUTO);
+                       } else {
+                               optionValue.append("periodic : "
+                                               + Integer.toString(optionFeatureValue));
+                       }
+               } else if (featureName
+                               .equals(ConfigureLabels.SYSTEM_INFOMATION_SAMPLING_PERIODIC)
+                               || featureName
+                                               .equals(ConfigureLabels.FUNCTION_PROFILING_SAMPLING_PERIODIC)) {
+                       optionValue.append("sampling : "
+                                       + Integer.toString(optionFeatureValue));
+               }
+               optionValue.append(CommonConstants.CLOSE_BRACKET);
+               return optionValue.toString();
        }
 
        private Listener tableMouseListener = new Listener() {
@@ -208,6 +257,7 @@ public class ConfigurationDialogFeaturesTable extends DATreeComposite {
                                                updateCheckBox(item, event);
                                                updateChildCheckBoxByParent(item, event);
                                                updateParentCheckBoxByChild(item, event);
+                                               setConfigurationDialogDataManager(item, event);
                                        }
                                        break;
                                }
@@ -252,6 +302,18 @@ public class ConfigurationDialogFeaturesTable extends DATreeComposite {
                item.setText(tableTextOptionColumnIndex, optionText);
        }
 
+       private void setConfigurationDialogDataManager(GridItem item, Event event) {
+               String featureName = item.getText(0);
+               String optionText = item.getText(tableTextOptionColumnIndex);
+               if (optionText.contains(ITEM_ALL_CHECKED)) {
+                       ConfigurationDialogDataManager.getInstance().setFeaturesSwapValue(
+                                       featureName, true);
+               } else {
+                       ConfigurationDialogDataManager.getInstance().setFeaturesSwapValue(
+                                       featureName, false);
+               }
+       }
+
        private void updateChildCheckBoxByParent(GridItem item, Event event) {
                String featureName = item.getText(0);
                String optionText = item.getText(tableTextOptionColumnIndex);
index d0e9f63..dca5268 100644 (file)
@@ -83,7 +83,17 @@ public class ConfigurationDialogFeaturesTreeTableToggleRenderer extends
                        } else {
                                gc.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR);
                        }
-                       gc.drawText(item.getText(), x, getBounds().y - 2, true);
+
+                       String printText = item.getText();
+                       if (item.getText(1).contains(
+                                       ConfigurationDialogFeaturesTable.FEATURE_OPTION_VALUE)) {
+                               String[] optionList = item.getText(1).split(
+                                               ConfigurationDialogFeaturesTable.FEATURE_OPTION_VALUE);
+                               if (optionList.length > 1) {
+                                       printText += optionList[1];
+                               }
+                       }
+                       gc.drawText(printText, x, getBounds().y - 2, true);
                } else {
                        Rectangle r = ImageResources.TREE_OPEN.getBounds();
                        int offset = (getBounds().width - r.width) / 2;
@@ -110,7 +120,17 @@ public class ConfigurationDialogFeaturesTreeTableToggleRenderer extends
                        } else {
                                gc.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR);
                        }
-                       gc.drawText(item.getText(), x, getBounds().y -2, true);
+
+                       String printText = item.getText();
+                       if (item.getText(1).contains(
+                                       ConfigurationDialogFeaturesTable.FEATURE_OPTION_VALUE)) {
+                               String[] optionList = item.getText(1).split(
+                                               ConfigurationDialogFeaturesTable.FEATURE_OPTION_VALUE);
+                               if (optionList.length > 1) {
+                                       printText += optionList[1];
+                               }
+                       }
+                       gc.drawText(printText, x, getBounds().y - 2, true);
                }
        }
 
index 5428470..5af78f9 100644 (file)
@@ -78,9 +78,12 @@ public class ConfigurationDialogSettingPage extends DAPageComposite {
                showInitialCheckBox.setBackground(ColorResources.DIALOG_BG_UPPER);
                showInitialCheckBox.setText(ConfigureLabels.SHOW_INITIAL);
                showInitialCheckBox.addSelectionListener(showInitiaRadioButtonListener);
-               showInitialCheckBox.setChecked(ConfigurationDialogDataManager.getInstance()
-                               .isShowInitia());
-
+               if (ConfigurationDialogDataManager.getInstance().getfeatureSwapValue(
+                               ConfigureLabels.SHOW_INITIAL) > 0) {
+                       showInitialCheckBox.setChecked(true);
+               } else {
+                       showInitialCheckBox.setChecked(false);
+               }
                Label showInitalLabel = new Label(this, SWT.TRANSPARENT);
                showInitalLabel.setText(ConfigureLabels.SHOW_INITIAL);
                showInitalLabel.setBackground(ColorResources.DIALOG_BG_UPPER);
@@ -103,9 +106,12 @@ public class ConfigurationDialogSettingPage extends DAPageComposite {
                autoStopCheckBox.setBackground(ColorResources.DIALOG_BG_UPPER);
                autoStopCheckBox.setText(ConfigureLabels.AUTO_STOP);
                autoStopCheckBox.addSelectionListener(autoStopRadioButtonListener);
-               autoStopCheckBox.setChecked(ConfigurationDialogDataManager.getInstance()
-                               .isAutoStop());
-
+               if (ConfigurationDialogDataManager.getInstance().getfeatureSwapValue(
+                               ConfigureLabels.AUTO_STOP) > 0) {
+                       autoStopCheckBox.setChecked(true);
+               } else {
+                       autoStopCheckBox.setChecked(false);
+               }
                Label autoStopLabel = new Label(this, SWT.TRANSPARENT);
                autoStopLabel.setText(ConfigureLabels.AUTO_STOP);
                autoStopLabel.setBackground(ColorResources.DIALOG_BG_UPPER);
@@ -120,20 +126,33 @@ public class ConfigurationDialogSettingPage extends DAPageComposite {
        private DACheckboxSelectionListener showInitiaRadioButtonListener = new DACheckboxSelectionListener() {
                @Override
                public void handleSelectionEvent(DACheckBox checkbox) {
-                       ConfigurationDialogDataManager.getInstance().setShowInitia(
-                                       !ConfigurationDialogDataManager.getInstance().isShowInitia());
-                       showInitialCheckBox.setChecked(ConfigurationDialogDataManager
-                                       .getInstance().isShowInitia());
+
+                       if (ConfigurationDialogDataManager.getInstance()
+                                       .getfeatureSwapValue(ConfigureLabels.SHOW_INITIAL) > 0) {
+                               ConfigurationDialogDataManager.getInstance()
+                                               .setfeatureSwapValue(ConfigureLabels.SHOW_INITIAL, 0);
+                               showInitialCheckBox.setChecked(false);
+                       } else {
+                               ConfigurationDialogDataManager.getInstance()
+                                               .setfeatureSwapValue(ConfigureLabels.SHOW_INITIAL, 1);
+                               showInitialCheckBox.setChecked(true);
+                       }
                }
        };
 
        private DACheckboxSelectionListener autoStopRadioButtonListener = new DACheckboxSelectionListener() {
                @Override
                public void handleSelectionEvent(DACheckBox checkbox) {
-                       ConfigurationDialogDataManager.getInstance().setAutoStop(
-                                       !ConfigurationDialogDataManager.getInstance().isAutoStop());
-                       autoStopCheckBox.setChecked(ConfigurationDialogDataManager.getInstance()
-                                       .isAutoStop());
+                       if (ConfigurationDialogDataManager.getInstance()
+                                       .getfeatureSwapValue(ConfigureLabels.AUTO_STOP) > 0) {
+                               ConfigurationDialogDataManager.getInstance()
+                                               .setfeatureSwapValue(ConfigureLabels.AUTO_STOP, 0);
+                               autoStopCheckBox.setChecked(false);
+                       } else {
+                               ConfigurationDialogDataManager.getInstance()
+                                               .setfeatureSwapValue(ConfigureLabels.AUTO_STOP, 1);
+                               autoStopCheckBox.setChecked(true);
+                       }
                }
        };
 }
\ No newline at end of file
index 1655166..58933e4 100644 (file)
@@ -37,6 +37,7 @@ import org.eclipse.swt.layout.FormLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
+import org.tizen.dynamicanalyzer.communicator.DACommunicator;
 import org.tizen.dynamicanalyzer.communicator.IDECommunicator;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
@@ -81,10 +82,15 @@ public class WelcomeDialog extends DAMessageBox {
        };
 
        private void doApply() {
+
                ConfigurationDialogDataManager.getInstance()
-                               .setTableItemsList(featuresTable);
+                               .setFeaturesStatusFromTableItemsList(featuresTable);
                ConfigurationDialogDataManager.getInstance()
                                .applySettingValueToConfigureManager();
+
+               DACommunicator.sendRuntimeMessage(DACommunicator.MSG_TYPE_CONFIG, null);
+               ConfigurationDialogDataManager.getInstance()
+                               .setSettingValueFromConfigureManager();
                notifyAutoRun();
        }
 
@@ -127,6 +133,13 @@ public class WelcomeDialog extends DAMessageBox {
 
                ConfigurationDialogFeaturesPage featuresPage = new ConfigurationDialogFeaturesPage(
                                contentsComp, SWT.NONE);
+               compData = new FormData();
+               compData = new FormData();
+               compData.top = new FormAttachment(0, 0);
+               compData.left = new FormAttachment(0, 0);
+               compData.right = new FormAttachment(100, 0);
+               compData.bottom = new FormAttachment(100, 0);
+               featuresPage.setLayoutData(compData);
                featuresTable = featuresPage.getFeatureTable();
 
                // button
@@ -165,9 +178,12 @@ public class WelcomeDialog extends DAMessageBox {
                                .setBackground(ColorResources.CONFIGURATION_BUTTON_COVER_BACKGROUND_COLOR);
                useAgainCheckButton.setText(ConfigureLabels.WELCONE_ASK_USE_AGAIN);
                useAgainCheckButton.addSelectionListener(useAgainCheckbuttonListener);
-               useAgainCheckButton.setChecked(ConfigurationDialogDataManager.getInstance()
-                               .isShowInitia());
-
+               if (ConfigurationDialogDataManager.getInstance().getfeatureSwapValue(
+                               ConfigureLabels.SHOW_INITIAL) > 0) {
+                       useAgainCheckButton.setChecked(true);
+               } else {
+                       useAgainCheckButton.setChecked(false);
+               }
                Label useAgainLabel = new Label(buttonContentsComp, SWT.TRANSPARENT);
                useAgainLabel.setText(ConfigureLabels.WELCONE_ASK_USE_AGAIN);
                useAgainLabel
@@ -208,11 +224,14 @@ public class WelcomeDialog extends DAMessageBox {
        private DACheckboxSelectionListener useAgainCheckbuttonListener = new DACheckboxSelectionListener() {
                @Override
                public void handleSelectionEvent(DACheckBox checkbox) {
-                       if (ConfigurationDialogDataManager.getInstance().isShowInitia()) {
-                               ConfigurationDialogDataManager.getInstance().setShowInitia(false);
+                       if (ConfigurationDialogDataManager.getInstance()
+                                       .getfeatureSwapValue(ConfigureLabels.SHOW_INITIAL) > 0) {
+                               ConfigurationDialogDataManager.getInstance()
+                                               .setfeatureSwapValue(ConfigureLabels.SHOW_INITIAL, 0);
                                useAgainCheckButton.setChecked(false);
                        } else {
-                               ConfigurationDialogDataManager.getInstance().setShowInitia(true);
+                               ConfigurationDialogDataManager.getInstance()
+                                               .setfeatureSwapValue(ConfigureLabels.SHOW_INITIAL, 1);
                                useAgainCheckButton.setChecked(true);
                        }
                }