if (provider != null) { if (fProviderViewer == null) updateListDependencies(); else fProviderViewer.setSelection(new StructuredSelection(provider), true);
if (provider == null) { String message= Messages.format(PreferencesMessages.FoldingConfigurationBlock_warning_providerNotFound_resetToDefault, id); JavaPlugin.log(new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.OK, message, null));  id= JavaPlugin.getDefault().getPreferenceStore().getDefaultString(PreferenceConstants.EDITOR_FOLDING_PROVIDER);  provider= fProviderDescriptors.get(id); Assert.isNotNull(provider);  fStore.setToDefault(PreferenceConstants.EDITOR_FOLDING_PROVIDER);
	private void restoreFromPreferences() {		boolean enabled= fStore.getBoolean(PreferenceConstants.EDITOR_FOLDING_ENABLED);		fFoldingCheckbox.setSelection(enabled);		updateCheckboxDependencies();				String id= fStore.getString(PreferenceConstants.EDITOR_FOLDING_PROVIDER);		Object provider= fProviderDescriptors.get(id);		if (provider != null) {			if (fProviderViewer == null)				updateListDependencies();			else				fProviderViewer.setSelection(new StructuredSelection(provider), true);		}	}