Organized imports
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / ui / PreferenceConstants.java
index c2b5815..15796fe 100644 (file)
@@ -20,9 +20,7 @@ import org.eclipse.jface.action.Action;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferenceConverter;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
 import org.eclipse.ui.texteditor.AbstractTextEditor;
 
@@ -60,7 +58,7 @@ public class PreferenceConstants {
   /**
    * A named preference that defines the pattern used for package name compression.
    * <p>
-   * Value is of type <code>String</code>. For example foe the given package name 'org.eclipse.jdt' pattern '.' will compress it
+   * Value is of type <code>String</code>. For example foe the given package name 'net.sourceforge.phpdt' pattern '.' will compress it
    * to '..jdt', '1~' to 'o~.e~.jdt'.
    * </p>
    */
@@ -108,6 +106,34 @@ public class PreferenceConstants {
   public static final String APPEARANCE_MEMBER_SORT_ORDER = "outlinesortoption"; //$NON-NLS-1$
 
   /**
+   * A named preference that defines how member elements are ordered by visibility in the Java views using the
+   * <code>JavaElementSorter</code>.
+   * <p>
+   * Value is of type <code>String</code>: A comma separated list of the following entries. Each entry must be in the list, no
+   * duplication. List order defines the sort order.
+   * <ul>
+   * <li><b>B </b>: Public</li>
+   * <li><b>V </b>: Private</li>
+   * <li><b>R </b>: Protected</li>
+   * <li><b>D </b>: Default</li>
+   * </ul>
+   * </p>
+   * 
+   * @since 3.0
+   */
+  public static final String APPEARANCE_VISIBILITY_SORT_ORDER = "net.sourceforge.phpdt.ui.visibility.order"; //$NON-NLS-1$
+
+  /**
+   * A named preferences that controls if Java elements are also sorted by visibility.
+   * <p>
+   * Value is of type <code>Boolean</code>.
+   * </p>
+   * 
+   * @since 3.0
+   */
+  public static final String APPEARANCE_ENABLE_VISIBILITY_SORT_ORDER = "net.sourceforge.phpdt.ui.enable.visibility.order"; //$NON-NLS-1$
+
+  /**
    * A named preference that controls if prefix removal during setter/getter generation is turned on or off.
    * <p>
    * Value is of type <code>Boolean</code>.
@@ -142,7 +168,37 @@ public class PreferenceConstants {
    * @see #CODEGEN_USE_GETTERSETTER_SUFFIX
    */
   public static final String CODEGEN_GETTERSETTER_SUFFIX = "net.sourceforge.phpdt.ui.gettersetter.suffix.list"; //$NON-NLS-1$
-
+  /**
+        * A named preference that controls whether the keyword "this" will be added
+        * automatically to field accesses in generated methods.
+        * <p>
+        * Value is of type <code>Boolean</code>.
+        * </p>
+        * @since 3.0
+        */
+       public static final String CODEGEN_KEYWORD_THIS= "org.eclipse.jdt.ui.keywordthis"; //$NON-NLS-1$
+
+       /**
+        * A named preference that controls whether to use the prefix "is" or the prefix "get" for
+        * automatically created getters which return a boolean field.
+        * <p>
+        * Value is of type <code>Boolean</code>.
+        * </p>
+        * @since 3.0
+        */
+       public static final String CODEGEN_IS_FOR_GETTERS= "org.eclipse.jdt.ui.gettersetter.use.is"; //$NON-NLS-1$
+       
+       
+       /**
+        * A named preference that defines the preferred variable names for exceptions in
+        * catch clauses.
+        * <p>
+        * Value is of type <code>String</code>.
+        * </p>
+        * @since 3.0
+        */     
+       public static final String CODEGEN_EXCEPTION_VAR_NAME= "org.eclipse.jdt.ui.exception.name"; //$NON-NLS-1$
+       
   /**
    * A named preference that controls if comment stubs will be added automatically to newly created types and methods.
    * <p>
@@ -515,7 +571,8 @@ public class PreferenceConstants {
    * </p>
    */
   public final static String EDITOR_TAB_WIDTH = AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH; //"net.sourceforge.phpdt.ui.editor.tab.width";
-                                                                                                                 // //$NON-NLS-1$
+
+  // //$NON-NLS-1$
 
   /**
    * A named preference that controls whether the outline view selection should stay in sync with with the element at the current
@@ -1005,7 +1062,7 @@ public class PreferenceConstants {
   public final static String EDITOR_MULTI_LINE_COMMENT_COLOR = IPreferenceConstants.PHP_MULTILINE_COMMENT;
 
   /**
-   * The symbolic font name for the Java editor text font (value <code>"org.eclipse.jdt.ui.editors.textfont"</code>).
+   * The symbolic font name for the Java editor text font (value <code>"net.sourceforge.phpdt.ui.editors.textfont"</code>).
    * 
    * @since 2.1
    */
@@ -2243,17 +2300,23 @@ public class PreferenceConstants {
     store.setDefault(PreferenceConstants.CODEGEN_USE_GETTERSETTER_SUFFIX, false);
     store.setDefault(PreferenceConstants.CODEGEN_GETTERSETTER_PREFIX, "fg, f, _$, _, m_"); //$NON-NLS-1$
     store.setDefault(PreferenceConstants.CODEGEN_GETTERSETTER_SUFFIX, "_"); //$NON-NLS-1$
+    
+    store.setDefault(PreferenceConstants.CODEGEN_KEYWORD_THIS, false);
+       store.setDefault(PreferenceConstants.CODEGEN_IS_FOR_GETTERS, true);
+       store.setDefault(PreferenceConstants.CODEGEN_EXCEPTION_VAR_NAME, "e"); //$NON-NLS-1$
     store.setDefault(PreferenceConstants.CODEGEN_ADD_COMMENTS, true);
     store.setDefault(PreferenceConstants.CODEGEN__NON_JAVADOC_COMMENTS, false);
     store.setDefault(PreferenceConstants.CODEGEN__FILE_COMMENTS, false);
 
     // MembersOrderPreferencePage
-    store.setDefault(PreferenceConstants.APPEARANCE_MEMBER_SORT_ORDER, "T,SI,SF,SM,I,F,C,M"); //$NON-NLS-1$
+    store.setDefault(PreferenceConstants.APPEARANCE_MEMBER_SORT_ORDER, "T,SF,SI,SM,I,F,C,M"); //$NON-NLS-1$
+    store.setDefault(PreferenceConstants.APPEARANCE_VISIBILITY_SORT_ORDER, "B,V,R,D"); //$NON-NLS-1$
+    store.setDefault(PreferenceConstants.APPEARANCE_ENABLE_VISIBILITY_SORT_ORDER, false);
     // must add here to guarantee that it is the first in the listener list
     store.addPropertyChangeListener(PHPeclipsePlugin.getDefault().getMemberOrderPreferenceCache());
 
     store.setDefault(PreferenceConstants.EDITOR_MATCHING_BRACKETS, true);
-    PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR, new RGB(192, 192,192));
+    PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR, new RGB(192, 192, 192));
 
     store.setDefault(PreferenceConstants.EDITOR_CURRENT_LINE, true);
     PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_CURRENT_LINE_COLOR, new RGB(225, 235, 224));