misc preferences improvements
authorkhartlage <khartlage>
Sun, 27 Jun 2004 10:14:47 +0000 (10:14 +0000)
committerkhartlage <khartlage>
Sun, 27 Jun 2004 10:14:47 +0000 (10:14 +0000)
archive/net.sourceforge.phpeclipse.quantum.sql/plugin.xml
net.sourceforge.phpeclipse/plugin.properties
net.sourceforge.phpeclipse/plugin.xml
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/JavaEditorPreferencePage.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/IPreferenceConstants.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPEclipseParserPreferencePage.java [moved from net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPEclipseParserPreferencePage.java with 75% similarity]

index 030c378..ffc897b 100644 (file)
             class="com.quantum.preferences.SQLEditorPreferences"
             id="com.quantum.preferences.editor">
       </page>
-      <page
+   <!--   <page
             name="Copy"
             category="com.quantum.preferences"
             class="com.quantum.preferences.CopyPreferences"
             id="com.quantum.preferences.copy">
       </page>
-    <!--  <page
+      <page
             name="Custom Copy 1"
             category="com.quantum.preferences.copy"
             class="com.quantum.preferences.CustomCopyPreferences"
index 98bbc47..94cefe9 100644 (file)
@@ -32,6 +32,7 @@ todoPageName=PHP Task Tags
 compilerOptionsPrefName=PHP Parser
 todoTaskPrefName=Task Tags
 templatePageName=Templates
+spellingPrefName=Spelling
 
 #
 # Extension point names
index e56035b..c5e37f4 100644 (file)
             id="net.sourceforge.phpeclipse.preference.PHPEclipsePreferencePage">
       </page>
       <page
-            name="PHP Parser"
+            name="PHP External Parser Command"
             category="net.sourceforge.phpeclipse.preference.PHPEclipsePreferencePage"
-            class="net.sourceforge.phpeclipse.PHPEclipseParserPreferencePage"
-            id="net.sourceforge.phpeclipse.preference.PHPEclipseParserPreferencePage">
+            class="net.sourceforge.phpeclipse.preferences.PHPEclipseParserPreferencePage"
+            id="net.sourceforge.phpeclipse.preferences.PHPEclipseParserPreferencePage">
       </page>
 <!--    <page
             name="Editor2"
             id="net.sourceforge.phpeclipse.preference.PHPEditorPreferencePage">
       </page> -->
       <page
-            name="Editor 2"
+            name="Editor"
             category="net.sourceforge.phpeclipse.preference.PHPEclipsePreferencePage"
             class="net.sourceforge.phpdt.internal.ui.preferences.JavaEditorPreferencePage"
             id="net.sourceforge.phpdt.internal.ui.preferences.JavaEditorPreferencePage">
             category="net.sourceforge.phpeclipse.preference.PHPEclipsePreferencePage"
             class="net.sourceforge.phpeclipse.PHPLanguagePreferencePage"
             id="net.sourceforge.phpeclipse.preference.PHPLanguagePreferencePage">
-      </page> -->
+      </page> 
       <page 
             name="%spellingPrefName"
             category= "net.sourceforge.phpeclipse.preference.PHPEclipsePreferencePage"
             class="net.sourceforge.phpdt.internal.ui.preferences.SpellingPreferencePage"
             id = "net.sourceforge.phpdt.internal.ui.preferences.SpellingPreferencePage">
-      </page>  
+      </page>  -->
    </extension>
    <extension
          point="org.eclipse.ui.editors.documentProviders">
index c8ed48e..c25ed26 100644 (file)
@@ -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));
index 9016106..a4c52bb 100644 (file)
@@ -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";
index b094bc7..a9cb199 100644 (file)
@@ -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");
index 38534c7..940d68b 100644 (file)
@@ -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
@@ -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 =