import net.sourceforge.phpdt.internal.ui.text.spelling.engine.ISpellCheckPreferenceKeys;
import net.sourceforge.phpeclipse.IPreferenceConstants;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.preference.IPreferenceStore;
/**
* 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>
*/
* @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>
* Value is of type <code>String</code>: semicolon separated list of package names
* </p>
*/
- public static final String ORGIMPORTS_IMPORTORDER = "net.sourceforge.phpdt.ui.importorder"; //$NON-NLS-1$
+// public static final String ORGIMPORTS_IMPORTORDER = "net.sourceforge.phpdt.ui.importorder"; //$NON-NLS-1$
/**
* A named preference that specifies the number of imports added before a star-import declaration is used.
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
*/
* @see org.eclipse.jface.resource.StringConverter
* @see org.eclipse.jface.preference.PreferenceConverter
*/
- public final static String EDITOR_STRING_COLOR = IPreferenceConstants.PHP_STRING;
+ public final static String EDITOR_STRING_COLOR_DQ = IPreferenceConstants.PHP_STRING_DQ;
/**
* A named preference that controls whether string constants are rendered in bold.
* Value is of type <code>Boolean</code>.
* </p>
*/
- public final static String EDITOR_STRING_BOLD = IPreferenceConstants.PHP_STRING + EDITOR_BOLD_SUFFIX;
+ public final static String EDITOR_STRING_BOLD_DQ = IPreferenceConstants.PHP_STRING_DQ + EDITOR_BOLD_SUFFIX;
+
+ public final static String EDITOR_STRING_COLOR_SQ = IPreferenceConstants.PHP_STRING_SQ;
+
+ /**
+ * A named preference that controls whether string constants are rendered in bold.
+ * <p>
+ * Value is of type <code>Boolean</code>.
+ * </p>
+ */
+ public final static String EDITOR_STRING_BOLD_SQ = IPreferenceConstants.PHP_STRING_SQ + EDITOR_BOLD_SUFFIX;
/**
* A named preference that holds the color used to render php default text.
*/
public static final String EDITOR_SMART_TAB = "smart_tab"; //$NON-NLS-1$
+ public static final String EDITOR_P_RTRIM_ON_SAVE = "editor_p_trim_on_save"; //$NON-NLS-1$
+
/**
* A named preference that controls whether Java comments should be spell-checked.
* <p>
store.setDefault(PreferenceConstants.APPEARANCE_FOLD_PACKAGES_IN_PACKAGE_EXPLORER, true);
// ImportOrganizePreferencePage
- store.setDefault(PreferenceConstants.ORGIMPORTS_IMPORTORDER, "php;phpx;org;com"); //$NON-NLS-1$
+// store.setDefault(PreferenceConstants.ORGIMPORTS_IMPORTORDER, "php;phpx;org;com"); //$NON-NLS-1$
store.setDefault(PreferenceConstants.ORGIMPORTS_ONDEMANDTHRESHOLD, 99);
store.setDefault(PreferenceConstants.ORGIMPORTS_IGNORELOWERCASE, true);
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);
PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_PHP_TYPE_COLOR, new RGB(127, 0, 85));
store.setDefault(PreferenceConstants.EDITOR_PHP_TYPE_BOLD, false);
- PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_STRING_COLOR, new RGB(42, 0, 255));
- store.setDefault(PreferenceConstants.EDITOR_STRING_BOLD, false);
+ PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_STRING_COLOR_DQ, PHPColorProvider.STRING_DQ);
+ store.setDefault(PreferenceConstants.EDITOR_STRING_BOLD_DQ, false);
+ PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_STRING_COLOR_SQ, PHPColorProvider.STRING_SQ);
+ store.setDefault(PreferenceConstants.EDITOR_STRING_BOLD_SQ, true);
+
PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR, new RGB(0, 0, 0));
store.setDefault(PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD, false);
store.setDefault(PreferenceConstants.EDITOR_FOLDING_IMPORTS, false);
store.setDefault(PreferenceConstants.EDITOR_SMART_BACKSPACE, true);
-
+ store.setDefault(PreferenceConstants.EDITOR_P_RTRIM_ON_SAVE, false);
// do more complicated stuff
// NewJavaProjectPreferencePage.initDefaults(store);
}