//$NON-NLS-1$
{ PreferencesMessages.getString("JavaEditorPreferencePage.types"), PreferenceConstants.EDITOR_PHP_TYPE_COLOR },
//$NON-NLS-1$
- { PreferencesMessages.getString("JavaEditorPreferencePage.strings"), PreferenceConstants.EDITOR_STRING_COLOR },
+ { PreferencesMessages.getString("JavaEditorPreferencePage.strings_dq"), PreferenceConstants.EDITOR_STRING_COLOR_DQ },
+ { PreferencesMessages.getString("JavaEditorPreferencePage.strings_sq"), PreferenceConstants.EDITOR_STRING_COLOR_SQ },
//$NON-NLS-1$
{ PreferencesMessages.getString("JavaEditorPreferencePage.others"), PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR }, //$NON-NLS-1$
{ PreferencesMessages.getString("JavaEditorPreferencePage.operators"), PreferenceConstants.EDITOR_PHP_OPERATOR_COLOR },
overlayKeys
.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_PHP_TYPE_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_STRING_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_STRING_BOLD));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_STRING_COLOR_DQ));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_STRING_BOLD_DQ));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_STRING_COLOR_SQ));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_STRING_BOLD_SQ));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
overlayKeys
.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_TASK_TAG_BOLD));
// overlayKeys.add(new
- // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
+ // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING_DQ,
// PreferenceConstants.EDITOR_JAVA_METHOD_NAME_COLOR));
// overlayKeys.add(new
// OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
JavaEditorPreferencePage.variables=Variables
JavaEditorPreferencePage.constants=Constants
JavaEditorPreferencePage.types=Types
-JavaEditorPreferencePage.strings=Strings
+JavaEditorPreferencePage.strings_dq=Double Quoted Strings
+JavaEditorPreferencePage.strings_sq=Single Quoted Strings
JavaEditorPreferencePage.others=Others
JavaEditorPreferencePage.methodNames=Method names
JavaEditorPreferencePage.operators=Operators, brackets excluding '{}'
// beginning of prefixes and postfixes
private static final int NONE = 0;
- private static final int BACKSLASH = 1; // postfix for STRING and CHARACTER
+ private static final int BACKSLASH = 1; // postfix for STRING_DQ and CHARACTER
private static final int SLASH = 2; // prefix for SINGLE_LINE or MULTI_LINE or JAVADOC
private static final int STAR = 5; // postfix for MULTI_LINE_COMMENT or JAVADOC
- private static final int CARRIAGE_RETURN = 6; // postfix for STRING, CHARACTER and SINGLE_LINE_COMMENT
+ private static final int CARRIAGE_RETURN = 6; // postfix for STRING_DQ, CHARACTER and SINGLE_LINE_COMMENT
/** The scanner. */
private final BufferedDocumentScanner fScanner = new BufferedDocumentScanner(1000); // faster implementation
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;
* @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.
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, true);
+ PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_STRING_COLOR_SQ, PHPColorProvider.STRING_SQ);
+ store.setDefault(PreferenceConstants.EDITOR_STRING_BOLD_SQ, false);
+
PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR, new RGB(0, 0, 0));
store.setDefault(PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD, false);
public static final String PHP_FUNCTIONNAME_UNDERLINE = "_php_functionname_underline";//$NON-NLS-1$
- public static final String PHP_STRING = "_php_string";//$NON-NLS-1$
+ public static final String PHP_STRING_DQ = "_php_string";//$NON-NLS-1$
- public static final String PHP_STRING_BOLD = "_php_string_bold";
+ public static final String PHP_STRING_BOLD_DQ = "_php_string_bold";
- public static final String PHP_STRING_ITALIC = "_php_string_italic";
+ public static final String PHP_STRING_ITALIC_DQ = "_php_string_italic";
- public static final String PHP_STRING_UNDERLINE = "_php_string_underline";
+ public static final String PHP_STRING_UNDERLINE_DQ = "_php_string_underline";
+ public static final String PHP_STRING_SQ = "_php_string_sq";//$NON-NLS-1$
+
+ public static final String PHP_STRING_BOLD_SQ = "_php_string_sq_bold";
+
+ public static final String PHP_STRING_ITALIC_SQ = "_php_string_sq_italic";
+
+ public static final String PHP_STRING_UNDERLINE_SQ = "_php_string_sq_underline";
+
public static final String PHP_DEFAULT = "_php_default";
public static final String PHP_DEFAULT_BOLD = "_php_default_bold";
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_FUNCTIONNAME_BOLD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_FUNCTIONNAME_ITALIC),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_FUNCTIONNAME_UNDERLINE),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IPreferenceConstants.PHP_STRING),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_STRING_BOLD),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_STRING_ITALIC),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_STRING_UNDERLINE),
+ new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IPreferenceConstants.PHP_STRING_DQ),
+ new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_STRING_BOLD_DQ),
+ new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_STRING_ITALIC_DQ),
+ new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_STRING_UNDERLINE_DQ),
+ new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IPreferenceConstants.PHP_STRING_SQ),
+ new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_STRING_BOLD_SQ),
+ new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_STRING_ITALIC_SQ),
+ new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_STRING_UNDERLINE_SQ),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IPreferenceConstants.PHP_DEFAULT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_DEFAULT_BOLD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_DEFAULT_ITALIC),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHPDOC_DEFAULT_UNDERLINE),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IPreferenceConstants.PHP_USERDEF_XMLFILE),
- // new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IPreferenceConstants.PHP_EDITOR_BACKGROUND)
+ // new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING_DQ, IPreferenceConstants.PHP_EDITOR_BACKGROUND)
};
private final String[][] SyntaxColorListModel =
PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.variables"), IPreferenceConstants.PHP_VARIABLE }, {
PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.types"), IPreferenceConstants.PHP_TYPE }, {
PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.constants"), IPreferenceConstants.PHP_CONSTANT }, {
- PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.functions"), IPreferenceConstants.PHP_FUNCTIONNAME }, {
- PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.strings"), IPreferenceConstants.PHP_STRING }, {
+ PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.functions"), IPreferenceConstants.PHP_FUNCTIONNAME }, {
+ PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.strings_dq"), IPreferenceConstants.PHP_STRING_DQ }, {
+ PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.strings_sq"), IPreferenceConstants.PHP_STRING_SQ }, {
PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.others"), IPreferenceConstants.PHP_DEFAULT }, {
PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.phpdoc_keywords"), IPreferenceConstants.PHPDOC_KEYWORD }, {
PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.phpdoc_tags"), IPreferenceConstants.PHPDOC_TAG }, {
// php syntax highlighting
store.setDefault(PHP_USERDEF_XMLFILE, "");
//assume there is none chooA
- PreferenceConverter.setDefault(store, PHP_MULTILINE_COMMENT, PHPColorProvider.MULTI_LINE_COMMENT);
- PreferenceConverter.setDefault(store, PHP_SINGLELINE_COMMENT, PHPColorProvider.SINGLE_LINE_COMMENT);
+// PreferenceConverter.setDefault(store, PHP_MULTILINE_COMMENT, PHPColorProvider.MULTI_LINE_COMMENT);
+// PreferenceConverter.setDefault(store, PHP_SINGLELINE_COMMENT, PHPColorProvider.SINGLE_LINE_COMMENT);
PreferenceConverter.setDefault(store, PHP_TAG, PHPColorProvider.TAG);
PreferenceConverter.setDefault(store, PHP_KEYWORD, PHPColorProvider.KEYWORD);
PreferenceConverter.setDefault(store, PHP_VARIABLE, PHPColorProvider.VARIABLE);
PreferenceConverter.setDefault(store, PHP_FUNCTIONNAME, PHPColorProvider.FUNCTION_NAME);
PreferenceConverter.setDefault(store, PHP_CONSTANT, PHPColorProvider.CONSTANT);
PreferenceConverter.setDefault(store, PHP_TYPE, PHPColorProvider.TYPE);
- PreferenceConverter.setDefault(store, PHP_STRING, PHPColorProvider.STRING);
+// PreferenceConverter.setDefault(store, PHP_STRING_DQ, PHPColorProvider.STRING_DQ);
+// store.setDefault(PHP_STRING_BOLD_DQ, true);
+// PreferenceConverter.setDefault(store, PHP_STRING_SQ, PHPColorProvider.STRING_SQ);
PreferenceConverter.setDefault(store, PHP_DEFAULT, PHPColorProvider.DEFAULT);
PreferenceConverter.setDefault(store, PHPDOC_KEYWORD, PHPColorProvider.PHPDOC_KEYWORD);
PreferenceConverter.setDefault(store, PHPDOC_TAG, PHPColorProvider.PHPDOC_TAG);
PHPEditorSyntaxPreferencePage.types=Types
PHPEditorSyntaxPreferencePage.functions=Functions
PHPEditorSyntaxPreferencePage.constants=Constants
-PHPEditorSyntaxPreferencePage.strings=Strings
+PHPEditorSyntaxPreferencePage.strings_dq=Double Quoted Strings
+PHPEditorSyntaxPreferencePage.strings_sq=Single Quoted Strings
PHPEditorSyntaxPreferencePage.others=Others
PHPEditorSyntaxPreferencePage.syntaxdialog=Custom PHP Syntax File:
PHPEditorSyntaxPreferencePage.browse=Browse..