}
public static PHPManual getManual() {
String storedConfigString = PreferenceConstants.getPreferenceStore()
.getString(PreferenceConstants.PHP_MANUAL_SITE);
PHPManualConfig storedConfig = PHPManualConfigSerializer
.fromString(storedConfigString);
if (manual == null || !fStoredConfig.equals(storedConfigString)) {
manual = null;
fStoredConfig = storedConfig;
PHPManualSiteDescriptor[] descs = PHPUiPlugin.getDefault()
.getPHPManualSiteDescriptors();
for (int i = 0; i < descs.length; ++i) {
// here we don't check anything except the URL since we are
// using a predefined sites with fixed extensions.
if (storedConfig != null
&& storedConfig.getUrl().equals(descs[i].getURL())) {
manual = createManual(descs[i]);
break;
}
}
if (manual == null) {
List configs = new ArrayList();
PHPManualConfigurationBlock.initFromPreferences(
PreferenceConstants.getPreferenceStore(), configs);
if (configs.size() > 0) {
PHPManualConfig defaultConfig = PHPManualConfigurationBlock
.getActiveManualSite(PreferenceConstants
.getPreferenceStore(), configs);
if (defaultConfig != null) {
manual = createManual(defaultConfig);
} else {