X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/PreferenceConstants.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/PreferenceConstants.java index c2b5815..45af042 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/PreferenceConstants.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/PreferenceConstants.java @@ -15,14 +15,13 @@ import net.sourceforge.phpdt.internal.ui.text.spelling.SpellCheckEngine; 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; 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 +59,7 @@ public class PreferenceConstants { /** * A named preference that defines the pattern used for package name compression. *
- * Value is of type String
. For example foe the given package name 'org.eclipse.jdt' pattern '.' will compress it
+ * Value is of type String
. For example foe the given package name 'net.sourceforge.phpdt' pattern '.' will compress it
* to '..jdt', '1~' to 'o~.e~.jdt'.
*
JavaElementSorter
.
+ *
+ * Value is of type String
: A comma separated list of the following entries. Each entry must be in the list, no
+ * duplication. List order defines the sort order.
+ *
+ * Value is of type Boolean
.
+ *
* Value is of type Boolean
.
@@ -142,7 +169,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.
+ *
+ * Value is of type Boolean
.
+ *
+ * Value is of type Boolean
.
+ *
+ * Value is of type String
.
+ *
@@ -185,7 +242,7 @@ public class PreferenceConstants {
* Value is of type String
: semicolon separated list of package names
*
"org.eclipse.jdt.ui.editors.textfont"
).
+ * The symbolic font name for the Java editor text font (value "net.sourceforge.phpdt.ui.editors.textfont"
).
*
* @since 2.1
*/
@@ -1194,6 +1252,25 @@ public class PreferenceConstants {
public final static String EDITOR_PHP_FUNCTIONNAME_BOLD = IPreferenceConstants.PHP_FUNCTIONNAME + EDITOR_BOLD_SUFFIX;
/**
+ * A named preference that holds the color used to render php variables with prefix '$_'.
+ *
+ * Value is of type String
. A RGB color value encoded as a string using class PreferenceConverter
+ *
+ * Value is of type Boolean
.
+ *
* Value is of type String
. A RGB color value encoded as a string using class PreferenceConverter
@@ -1211,7 +1288,6 @@ public class PreferenceConstants {
*
@@ -1259,7 +1335,7 @@ public class PreferenceConstants {
* @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.
@@ -1267,7 +1343,17 @@ public class PreferenceConstants {
* Value is of type Boolean
.
*
+ * Value is of type Boolean
.
+ *
@@ -2221,7 +2309,7 @@ public class PreferenceConstants { 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); @@ -2243,17 +2331,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)); @@ -2328,15 +2422,21 @@ public class PreferenceConstants { PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR, new RGB(127, 159, 191)); store.setDefault(PreferenceConstants.EDITOR_PHP_VARIABLE_BOLD, false); + PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_PHP_VARIABLE_DOLLAR_COLOR, new RGB(127, 159, 191)); + store.setDefault(PreferenceConstants.EDITOR_PHP_VARIABLE_DOLLAR_BOLD, false); + PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR, new RGB(127, 0, 85)); store.setDefault(PreferenceConstants.EDITOR_PHP_CONSTANT_BOLD, 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); @@ -2435,7 +2535,7 @@ public class PreferenceConstants { 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); }