Setting : add a null check 67/27867/1
authorheeyoung <heeyoung1008.hwang@samsung.com>
Mon, 22 Sep 2014 02:19:15 +0000 (11:19 +0900)
committerheeyoung <heeyoung1008.hwang@samsung.com>
Mon, 22 Sep 2014 02:19:15 +0000 (11:19 +0900)
Change-Id: I317a542b9f299fe9f13b21f43bde5f180ac88b24
Signed-off-by: heeyoung <heeyoung1008.hwang@samsung.com>
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/BaseView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FeatureDialogFeaturesTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/SettingDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/TargetData.java

index f1f3cb4..5e66e87 100755 (executable)
@@ -89,31 +89,33 @@ public class BaseView extends ViewPart {
                List<Integer> tabViewList = new ArrayList<Integer>();
                tabViewList.add(CommonConstants.PAGE_TIME_LINE);        // default : timeline tab
                
-               // thread tab
-               if (selectedPageList.contains(ConfigureLabels.PAGE_NAME_THREAD)) {
-                       tabViewList.add(CommonConstants.PAGE_THREAD);
-               } // else nothing
-
-               // network tab
-               if (selectedPageList.contains(ConfigureLabels.PAGE_NAME_NETWORK)) {
-                       tabViewList.add(CommonConstants.PAGE_NETWORK);
-               } // else nothing
-
-               // file tab
-               if (selectedPageList.contains(ConfigureLabels.PAGE_NAME_FILE)) {
-                       tabViewList.add(CommonConstants.PAGE_FILE);
-               } // else nothing
+               if (selectedPageList != null) {
+                       // thread tab
+                       if (selectedPageList.contains(ConfigureLabels.PAGE_NAME_THREAD)) {
+                               tabViewList.add(CommonConstants.PAGE_THREAD);
+                       } // else nothing
+       
+                       // network tab
+                       if (selectedPageList.contains(ConfigureLabels.PAGE_NAME_NETWORK)) {
+                               tabViewList.add(CommonConstants.PAGE_NETWORK);
+                       } // else nothing
+       
+                       // file tab
+                       if (selectedPageList.contains(ConfigureLabels.PAGE_NAME_FILE)) {
+                               tabViewList.add(CommonConstants.PAGE_FILE);
+                       } // else nothing
+                       
+                       // openGL tab
+                       if (selectedPageList.contains(ConfigureLabels.PAGE_NAME_OPENGL)) {
+                               tabViewList.add(CommonConstants.PAGE_GRAPHICS);
+                       } // else nothing
+       
+                       // kernel tab
+                       if (selectedPageList.contains(ConfigureLabels.PAGE_NAME_KERNEL)) {
+                               tabViewList.add(CommonConstants.PAGE_KERNEL);
+                       } // else nothing
+               }
                
-               // openGL tab
-               if (selectedPageList.contains(ConfigureLabels.PAGE_NAME_OPENGL)) {
-                       tabViewList.add(CommonConstants.PAGE_GRAPHICS);
-               } // else nothing
-
-               // kernel tab
-               if (selectedPageList.contains(ConfigureLabels.PAGE_NAME_KERNEL)) {
-                       tabViewList.add(CommonConstants.PAGE_KERNEL);
-               } // else nothing
-
                tabViewList.add(CommonConstants.PAGE_SUMMARY); // default : summary tab
                addTabViewPage(tabViewList);
        }
index da6ab8c..d0faea9 100644 (file)
@@ -165,7 +165,9 @@ public class FeatureDialogFeaturesTable extends DATreeComposite {
                                                
                                        } else {
                                                TreeInput parentTreeInput = getTreeInput(output, feature.getParentName());
-                                               parentTreeInput.getChildren().add(currentNode);
+                                               if (parentTreeInput != null) {
+                                                       parentTreeInput.getChildren().add(currentNode);
+                                               }
                                        }
                                }
                        }                       
index b844b80..2cf4ce8 100644 (file)
@@ -195,7 +195,7 @@ public class SettingDialog extends DAMessageBox {
                compData.bottom = new FormAttachment(100, 0);
                tabView.setLayoutData(compData);
 
-               SettingDialogTemplatePage templatesPage = new SettingDialogTemplatePage(
+               templatesPage = new SettingDialogTemplatePage(
                                tabView.getContentComposite(), SWT.NONE);
                tabView.addView(templatesPage, false);
 
index 6d0396e..8992a06 100644 (file)
@@ -516,8 +516,8 @@ public class TargetData {
                // set feature
                if (initFeatureList != null) {
                        initFeatureList.clear();
+                       initFeatureList.addAll(selectedFeatureList);
                }
-               initFeatureList.addAll(selectedFeatureList);
        }
        
        public void revertSettingData() {
@@ -527,7 +527,8 @@ public class TargetData {
                // set feature
                if (selectedFeatureList != null) {
                        selectedFeatureList.clear();
+                       selectedFeatureList.addAll(initFeatureList);
                }
-               selectedFeatureList.addAll(initFeatureList);
+
        }
 }