From: khartlage Date: Sun, 27 Jun 2004 10:14:47 +0000 (+0000) Subject: misc preferences improvements X-Git-Url: http://git.phpeclipse.com misc preferences improvements --- diff --git a/archive/net.sourceforge.phpeclipse.quantum.sql/plugin.xml b/archive/net.sourceforge.phpeclipse.quantum.sql/plugin.xml index 030c378..ffc897b 100644 --- a/archive/net.sourceforge.phpeclipse.quantum.sql/plugin.xml +++ b/archive/net.sourceforge.phpeclipse.quantum.sql/plugin.xml @@ -180,13 +180,13 @@ class="com.quantum.preferences.SQLEditorPreferences" id="com.quantum.preferences.editor"> - - @@ -1382,13 +1382,13 @@ category="net.sourceforge.phpeclipse.preference.PHPEclipsePreferencePage" class="net.sourceforge.phpeclipse.PHPLanguagePreferencePage" id="net.sourceforge.phpeclipse.preference.PHPLanguagePreferencePage"> - --> + - + --> diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/JavaEditorPreferencePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/JavaEditorPreferencePage.java index c8ed48e..c25ed26 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/JavaEditorPreferencePage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/JavaEditorPreferencePage.java @@ -1605,13 +1605,11 @@ public class JavaEditorPreferencePage extends PreferencePage item= new TabItem(folder, SWT.NONE); item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.hoverTab.title")); //$NON-NLS-1$ - fJavaEditorHoverConfigurationBlock= new - JavaEditorHoverConfigurationBlock(this, fOverlayStore); + fJavaEditorHoverConfigurationBlock= new JavaEditorHoverConfigurationBlock(this, fOverlayStore); item.setControl(fJavaEditorHoverConfigurationBlock.createControl(folder)); - item= new TabItem(folder, SWT.NONE); - item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.navigationTab.title")); - //$NON-NLS-1$ - item.setControl(createNavigationPage(folder)); +// item= new TabItem(folder, SWT.NONE); +// item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.navigationTab.title")); //$NON-NLS-1$ +// item.setControl(createNavigationPage(folder)); item= new TabItem(folder, SWT.NONE); item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.folding.title")); //$NON-NLS-1$ item.setControl(fFoldingConfigurationBlock.createControl(folder)); diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/IPreferenceConstants.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/IPreferenceConstants.java index 9016106..a4c52bb 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/IPreferenceConstants.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/IPreferenceConstants.java @@ -50,8 +50,8 @@ public interface IPreferenceConstants { public static final String PHP_RUN_PREF = "_php_run_pref"; public static final String EXTERNAL_PARSER_PREF = "_external_parser"; public static final String PHP_PARSER_DEFAULT = "_php_parser_default"; - public static final String PHP_INTERNAL_PARSER = "_php_internal_parser"; - public static final String PHP_EXTERNAL_PARSER = "_php_external_parser"; +// public static final String PHP_INTERNAL_PARSER = "_php_internal_parser"; +// public static final String PHP_EXTERNAL_PARSER = "_php_external_parser"; // public static final String PHP_PARSE_ON_SAVE = "_php_parse_on_save"; public static final String PHP_MULTILINE_COMMENT = "_php_multilineComment"; public static final String PHP_MULTILINE_COMMENT_BOLD = "_php_multilineComment_bold"; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java index b094bc7..a9cb199 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java @@ -683,9 +683,9 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements store.setDefault(APACHE_START_BACKGROUND, "true"); store.setDefault(APACHE_STOP_BACKGROUND, "true"); store.setDefault(APACHE_RESTART_BACKGROUND, "true"); - store.setDefault(PHP_PARSER_DEFAULT, PHP_EXTERNAL_PARSER); - store.setDefault(PHP_INTERNAL_PARSER, "false"); - store.setDefault(PHP_EXTERNAL_PARSER, "true"); +// store.setDefault(PHP_PARSER_DEFAULT, PHP_EXTERNAL_PARSER); +// store.setDefault(PHP_INTERNAL_PARSER, "false"); +// store.setDefault(PHP_EXTERNAL_PARSER, "true"); // store.setDefault(PHP_PARSE_ON_SAVE, "true"); // show line numbers: // store.setDefault(LINE_NUMBER_RULER, "false"); diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java index 38534c7..940d68b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java @@ -87,27 +87,14 @@ public class PHPParserAction extends TextEditorAction { } if (phpFlag) { IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore(); - if (store.getString(PHPeclipsePlugin.PHP_PARSER_DEFAULT).equals(PHPeclipsePlugin.PHP_INTERNAL_PARSER)) { -// // first delete all the previous markers -// fileToParse.deleteMarkers(IMarker.PROBLEM, false, 0); -// -// //the tasks are removed here -// fileToParse.deleteMarkers(IMarker.TASK, false, 0); - PHPBuilder.removeProblemsAndTasksFor(fileToParse); - // try { - // InputStream iStream = fileToParse.getContents(); - parse(fileToParse); //, iStream); - // iStream.close(); - // } catch (IOException e) { - // } - } else { +// if (store.getString(PHPeclipsePlugin.PHP_PARSER_DEFAULT).equals(PHPeclipsePlugin.PHP_INTERNAL_PARSER)) { +// PHPBuilder.removeProblemsAndTasksFor(fileToParse); +// parse(fileToParse); //, iStream); +// } else { ExternalPHPParser parser = new ExternalPHPParser(fileToParse); parser.phpExternalParse(); - } +// } } -// } catch (CoreException e) { -// } - } /** * Finds the file that's currently opened in the PHP Text Editor diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPEclipseParserPreferencePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPEclipseParserPreferencePage.java similarity index 75% rename from net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPEclipseParserPreferencePage.java rename to net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPEclipseParserPreferencePage.java index 0d3ecae..1c5a98f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPEclipseParserPreferencePage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPEclipseParserPreferencePage.java @@ -1,6 +1,7 @@ -package net.sourceforge.phpeclipse; +package net.sourceforge.phpeclipse.preferences; -import net.sourceforge.phpeclipse.preferences.PHPPreferencesMessages; +import net.sourceforge.phpeclipse.IPreferenceConstants; +import net.sourceforge.phpeclipse.PHPeclipsePlugin; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferencePage; @@ -27,7 +28,7 @@ public class PHPEclipseParserPreferencePage extends PreferencePage implements IW // private ArrayList RadioButtons = new ArrayList(); - RadioGroupFieldEditor chooseParser; +// RadioGroupFieldEditor chooseParser; StringFieldEditor externalParserSFE; // BooleanFieldEditor parseOnSave; @@ -36,17 +37,18 @@ public class PHPEclipseParserPreferencePage extends PreferencePage implements IW setPreferenceStore(PHPeclipsePlugin.getDefault().getPreferenceStore()); setDescription(PHPPreferencesMessages.getString("PHPBasePreferencePage.description")); //$NON-NLS-1$ } + public void init(IWorkbench workbench) { } protected void performDefaults() { - chooseParser.loadDefault(); +// chooseParser.loadDefault(); externalParserSFE.loadDefault(); // parseOnSave.loadDefault(); super.performDefaults(); } public boolean performOk() { - chooseParser.store(); +// chooseParser.store(); externalParserSFE.store(); // parseOnSave.store(); return super.performOk(); @@ -58,10 +60,6 @@ public class PHPEclipseParserPreferencePage extends PreferencePage implements IW Composite composite = new Composite(parent, SWT.LEFT); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); composite.setLayout(new GridLayout()); - //Create Websettings - // Composite webSettingsComposite = new Composite(composite, SWT.NONE); - // webSettingsComposite.setLayout(new GridLayout()); - // webSettingsComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); //Create parser settings composite Composite parserSettingsComposite = new Composite(composite, SWT.NONE); @@ -72,19 +70,19 @@ public class PHPEclipseParserPreferencePage extends PreferencePage implements IW parserSettingsGroup.setLayout(new GridLayout()); parserSettingsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - chooseParser = - new RadioGroupFieldEditor( - IPreferenceConstants.PHP_PARSER_DEFAULT, - PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.choose"), - 1, - new String[][] { - { PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.internal"), IPreferenceConstants.PHP_INTERNAL_PARSER }, - { - PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.external"), IPreferenceConstants.PHP_EXTERNAL_PARSER } - }, parserSettingsGroup); - chooseParser.setPreferencePage(this); - chooseParser.setPreferenceStore(getPreferenceStore()); - chooseParser.load(); +// chooseParser = +// new RadioGroupFieldEditor( +// IPreferenceConstants.PHP_PARSER_DEFAULT, +// PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.choose"), +// 1, +// new String[][] { +// { PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.internal"), IPreferenceConstants.PHP_INTERNAL_PARSER }, +// { +// PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.external"), IPreferenceConstants.PHP_EXTERNAL_PARSER } +// }, parserSettingsGroup); +// chooseParser.setPreferencePage(this); +// chooseParser.setPreferenceStore(getPreferenceStore()); +// chooseParser.load(); //create a copmposte just for the StringEditor - makes layout simpler Composite externalParserCompo = new Composite(parserSettingsGroup, SWT.NONE); externalParserSFE =