package net.sourceforge.phpeclipse;
+import net.sourceforge.phpdt.internal.ui.util.PHPFileUtil;
import net.sourceforge.phpeclipse.preferences.PHPPreferencesMessages;
import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.DirectoryFieldEditor;
import org.eclipse.jface.preference.FileFieldEditor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
public class PHPEclipseBasePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+ StringFieldEditor phpParserExtensionsSFE;
+
StringFieldEditor apacheStartSFE;
StringFieldEditor apacheStopSFE;
}
protected void performDefaults() {
+ phpParserExtensionsSFE.loadDefault();
apacheStartSFE.loadDefault();
apacheStopSFE.loadDefault();
apacheRestartSFE.loadDefault();
}
public boolean performOk() {
-
+ PHPFileUtil.setExtensins(null);
+ phpParserExtensionsSFE.store();
apacheStartSFE.store();
apacheStopSFE.store();
apacheRestartSFE.store();
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
composite.setLayout(new GridLayout());
+ // allowed PHP file extensions for parsing
+ Composite phpParserExtensionsComposite = new Composite(composite, SWT.NULL);
+ phpParserExtensionsComposite.setLayout(new GridLayout());
+ phpParserExtensionsComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ phpParserExtensionsSFE = new StringFieldEditor(IPreferenceConstants.PHP_EXTENSION_PREFS, PHPPreferencesMessages
+ .getString("PHPBasePreferencePage.phpExtensionPrefs"), phpParserExtensionsComposite);
+ phpParserExtensionsSFE.setPreferencePage(this);
+ phpParserExtensionsSFE.setPreferenceStore(getPreferenceStore());
+ phpParserExtensionsSFE.load();
+
//Create apache
Composite apacheSettingsComposite = new Composite(composite, SWT.NULL);
apacheSettingsComposite.setLayout(new GridLayout());