int style = ExpandableComposite.TWISTIE;
String prefKey = getPrefKey(clazz, input);
if(PreferencesUtil.contains(prefKey)){
- style = PreferencesUtil.getStringValue(prefKey).equals(CdmSectionPart.EXPANDED)?style |= ExpandableComposite.EXPANDED:style;
+ String string = PreferencesUtil.getStringValue(prefKey);
+ if (string != null){
+ style = string.equals(CdmSectionPart.EXPANDED)?style |= ExpandableComposite.EXPANDED:style;
+ }else{
+ style = initiallyExpanded?style |= ExpandableComposite.EXPANDED:style;
+ }
}
else{
style = initiallyExpanded?style |= ExpandableComposite.EXPANDED:style;