From: heeyoung Date: Mon, 22 Sep 2014 02:19:15 +0000 (+0900) Subject: Setting : add a null check X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=943bc3946986d05dbfacc8e9b8b1352e1b55ece4;p=sdk%2Ftools%2Fdynamic-analyzer.git Setting : add a null check Change-Id: I317a542b9f299fe9f13b21f43bde5f180ac88b24 Signed-off-by: heeyoung --- diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/BaseView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/BaseView.java index f1f3cb4..5e66e87 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/BaseView.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/BaseView.java @@ -89,31 +89,33 @@ public class BaseView extends ViewPart { List tabViewList = new ArrayList(); 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); } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FeatureDialogFeaturesTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FeatureDialogFeaturesTable.java index da6ab8c..d0faea9 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FeatureDialogFeaturesTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FeatureDialogFeaturesTable.java @@ -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); + } } } } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/SettingDialog.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/SettingDialog.java index b844b80..2cf4ce8 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/SettingDialog.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/SettingDialog.java @@ -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); diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/TargetData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/TargetData.java index 6d0396e..8992a06 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/TargetData.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/TargetData.java @@ -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); + } }