X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/JavaEditorPreferencePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/JavaEditorPreferencePage.java index e1700c5..771385e 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/JavaEditorPreferencePage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/JavaEditorPreferencePage.java @@ -13,15 +13,15 @@ package net.sourceforge.phpdt.internal.ui.preferences; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; -import java.text.Collator; +//import java.text.Collator; import java.util.ArrayList; -import java.util.Comparator; +//import java.util.Comparator; import java.util.HashMap; import java.util.Iterator; import java.util.Map; -import java.util.SortedSet; +//import java.util.SortedSet; import java.util.StringTokenizer; -import java.util.TreeSet; +//import java.util.TreeSet; import net.sourceforge.phpdt.core.JavaCore; import net.sourceforge.phpdt.internal.ui.IJavaHelpContextIds; @@ -64,30 +64,38 @@ import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Combo; +//import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Link; import org.eclipse.swt.widgets.List; +import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.TabFolder; import org.eclipse.swt.widgets.TabItem; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.dialogs.PreferencesUtil; import org.eclipse.ui.editors.text.EditorsUI; import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants; import org.eclipse.ui.texteditor.AnnotationPreference; import org.eclipse.ui.texteditor.ChainedPreferenceStore; import org.eclipse.ui.texteditor.MarkerAnnotationPreferences; + /** * The page for setting the editor options. */ public class JavaEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { - private static final String BOLD = PreferenceConstants.EDITOR_BOLD_SUFFIX; + private static final String BOLD = PreferenceConstants.EDITOR_BOLD_SUFFIX; + private static final String ITALIC = PreferenceConstants.EDITOR_ITALIC_SUFFIX; + private static final String UNDERLINE = PreferenceConstants.EDITOR_UNDERLINE_SUFFIX; + private static final String STRIKETHROUGH = PreferenceConstants.EDITOR_STRIKETHROUGH_SUFFIX; private static final String COMPILER_TASK_TAGS = JavaCore.COMPILER_TASK_TAGS; @@ -99,118 +107,96 @@ public class JavaEditorPreferencePage extends PreferencePage implements private final String[][] fSyntaxColorListModel = new String[][] { { - PreferencesMessages - .getString("JavaEditorPreferencePage.multiLineComment"), + PreferencesMessages.getString("JavaEditorPreferencePage.multiLineComment"), PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.singleLineComment"), + PreferencesMessages.getString("JavaEditorPreferencePage.singleLineComment"), PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR }, //$NON-NLS-1$ - { PreferencesMessages.getString("JavaEditorPreferencePage.tags"), + { + PreferencesMessages.getString("JavaEditorPreferencePage.tags"), PreferenceConstants.EDITOR_PHP_TAG_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.keywords"), + PreferencesMessages.getString("JavaEditorPreferencePage.keywords"), PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR }, { - PreferencesMessages - .getString("JavaEditorPreferencePage.functionNames"), + PreferencesMessages.getString("JavaEditorPreferencePage.functionNames"), PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.variables"), + PreferencesMessages.getString("JavaEditorPreferencePage.variables"), PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.variables_dollar"), + PreferencesMessages.getString("JavaEditorPreferencePage.variables_dollar"), PreferenceConstants.EDITOR_PHP_VARIABLE_DOLLAR_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.constants"), + PreferencesMessages.getString("JavaEditorPreferencePage.constants"), PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR }, //$NON-NLS-1$ - { PreferencesMessages.getString("JavaEditorPreferencePage.types"), + { + PreferencesMessages.getString("JavaEditorPreferencePage.types"), PreferenceConstants.EDITOR_PHP_TYPE_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.strings_dq"), + PreferencesMessages.getString("JavaEditorPreferencePage.strings_dq"), PreferenceConstants.EDITOR_STRING_COLOR_DQ }, { - PreferencesMessages - .getString("JavaEditorPreferencePage.strings_sq"), + 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.others"), + PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.operators"), + PreferencesMessages.getString("JavaEditorPreferencePage.operators"), PreferenceConstants.EDITOR_PHP_OPERATOR_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.returnKeyword"), + PreferencesMessages.getString("JavaEditorPreferencePage.returnKeyword"), PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_COLOR }, - { PreferencesMessages.getString("JavaEditorPreferencePage.braces"), + { + PreferencesMessages.getString("JavaEditorPreferencePage.braces"), PreferenceConstants.EDITOR_PHP_BRACE_OPERATOR_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.phpDocKeywords"), + PreferencesMessages.getString("JavaEditorPreferencePage.phpDocKeywords"), PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.phpDocHtmlTags"), + PreferencesMessages.getString("JavaEditorPreferencePage.phpDocHtmlTags"), PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.phpDocLinks"), + PreferencesMessages.getString("JavaEditorPreferencePage.phpDocLinks"), PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.phpDocOthers"), PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR } //$NON-NLS-1$ + PreferencesMessages.getString("JavaEditorPreferencePage.phpDocOthers"), PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR } //$NON-NLS-1$ }; private final String[][] fAppearanceColorListModel = new String[][] { { - PreferencesMessages - .getString("JavaEditorPreferencePage.lineNumberForegroundColor"), - AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR }, - //$NON-NLS-1$ - { - PreferencesMessages - .getString("JavaEditorPreferencePage.matchingBracketsHighlightColor2"), + PreferencesMessages.getString("JavaEditorPreferencePage.matchingBracketsHighlightColor2"), PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.currentLineHighlighColor"), + PreferencesMessages.getString("JavaEditorPreferencePage.currentLineHighlighColor"), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.printMarginColor2"), + PreferencesMessages.getString("JavaEditorPreferencePage.printMarginColor2"), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.findScopeColor2"), + PreferencesMessages.getString("JavaEditorPreferencePage.findScopeColor2"), PreferenceConstants.EDITOR_FIND_SCOPE_COLOR }, //$NON-NLS-1$ { - PreferencesMessages - .getString("JavaEditorPreferencePage.linkColor2"), PreferenceConstants.EDITOR_LINK_COLOR }, //$NON-NLS-1$ + PreferencesMessages.getString("JavaEditorPreferencePage.linkColor2"), PreferenceConstants.EDITOR_LINK_COLOR }, //$NON-NLS-1$ }; // private final String[][] fAnnotationColorListModel; @@ -287,15 +273,15 @@ public class JavaEditorPreferencePage extends PreferencePage implements private List fAppearanceColorList; // private List fContentAssistColorList; - private List fAnnotationList; + //private List fAnnotationList; private ColorEditor fSyntaxForegroundColorEditor; private ColorEditor fAppearanceColorEditor; - private ColorEditor fAnnotationForegroundColorEditor; + //private ColorEditor fAnnotationForegroundColorEditor; - private ColorEditor fContentAssistColorEditor; + //private ColorEditor fContentAssistColorEditor; private ColorEditor fBackgroundColorEditor; @@ -306,6 +292,9 @@ public class JavaEditorPreferencePage extends PreferencePage implements private Button fBackgroundColorButton; private Button fBoldCheckBox; + private Button fItalicCheckBox; + private Button fUnderlineCheckBox; + private Button fStrikeThroughCheckBox; // private Button fAddJavaDocTagsButton; @@ -318,27 +307,27 @@ public class JavaEditorPreferencePage extends PreferencePage implements private Color fBackgroundColor; - private Control fAutoInsertDelayText; + //private Control fAutoInsertDelayText; - private Control fAutoInsertJavaTriggerText; + //private Control fAutoInsertJavaTriggerText; - private Control fAutoInsertJavaDocTriggerText; + //private Control fAutoInsertJavaDocTriggerText; - private Label fAutoInsertDelayLabel; + //private Label fAutoInsertDelayLabel; - private Label fAutoInsertJavaTriggerLabel; + //private Label fAutoInsertJavaTriggerLabel; - private Label fAutoInsertJavaDocTriggerLabel; + //private Label fAutoInsertJavaDocTriggerLabel; - private Button fShowInTextCheckBox; + //private Button; - private Combo fDecorationStyleCombo; + //private Combo fDecorationStyleCombo; - private Button fHighlightInTextCheckBox; + //private Button fHighlightInTextCheckBox; - private Button fShowInOverviewRulerCheckBox; + //private Button fShowInOverviewRulerCheckBox; - private Button fShowInVerticalRulerCheckBox; + //private Button fShowInVerticalRulerCheckBox; private Text fBrowserLikeLinksKeyModifierText; @@ -353,8 +342,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements * Creates a new preference page. */ public JavaEditorPreferencePage() { - setDescription(PreferencesMessages - .getString("JavaEditorPreferencePage.description")); //$NON-NLS-1$ + setDescription(PreferencesMessages.getString("JavaEditorPreferencePage.description")); //$NON-NLS-1$ setPreferenceStore(PHPeclipsePlugin.getDefault().getPreferenceStore()); MarkerAnnotationPreferences markerAnnotationPreferences = new MarkerAnnotationPreferences(); fKeys = createOverlayStoreKeys(markerAnnotationPreferences); @@ -367,362 +355,224 @@ public class JavaEditorPreferencePage extends PreferencePage implements MarkerAnnotationPreferences preferences) { ArrayList overlayKeys = new ArrayList(); Iterator e = preferences.getAnnotationPreferences().iterator(); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_FOREGROUND_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_FOREGROUND_DEFAULT_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_BACKGROUND_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.INT, - PreferenceConstants.EDITOR_TAB_WIDTH)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD)); - - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_PHP_TAG_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_PHP_TAG_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_PHP_VARIABLE_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_PHP_VARIABLE_DOLLAR_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_PHP_VARIABLE_DOLLAR_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_PHP_CONSTANT_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_PHP_TYPE_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_PHP_TYPE_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, - PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_TASK_TAG_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_TASK_TAG_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_FOREGROUND_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_FOREGROUND_DEFAULT_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_BACKGROUND_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,PreferenceConstants.EDITOR_TAB_WIDTH)); + + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_BOLD)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_ITALIC)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_UNDERLINE)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_STRIKETHROUGH)); + + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_ITALIC)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_UNDERLINE)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVA_KEYWORD_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVA_KEYWORD_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVA_KEYWORD_STRIKETHROUGH)); + + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_PHP_TAG_COLOR)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_TAG_BOLD)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_TAG_ITALIC)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_TAG_UNDERLINE)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_TAG_STRIKETHROUGH)); + + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_COLOR)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_BOLD)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_ITALIC)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_UNDERLINE)); + overlayKeys.add (new OverlayPreferenceStore.OverlayKey (OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_VARIABLE_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_VARIABLE_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_VARIABLE_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_VARIABLE_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_PHP_VARIABLE_DOLLAR_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_VARIABLE_DOLLAR_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_VARIABLE_DOLLAR_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_VARIABLE_DOLLAR_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_VARIABLE_DOLLAR_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_CONSTANT_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_CONSTANT_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_CONSTANT_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_CONSTANT_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_PHP_TYPE_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_TYPE_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_TYPE_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_TYPE_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_TYPE_STRIKETHROUGH)); + + 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.BOOLEAN,PreferenceConstants.EDITOR_STRING_ITALIC_DQ)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_STRING_UNDERLINE_DQ)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_STRING_STRIKETHROUGH_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.BOOLEAN,PreferenceConstants.EDITOR_STRING_ITALIC_SQ)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_STRING_UNDERLINE_SQ)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_STRING_STRIKETHROUGH_SQ)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVA_DEFAULT_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVA_DEFAULT_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVA_DEFAULT_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_TASK_TAG_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_TASK_TAG_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_TASK_TAG_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_TASK_TAG_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_TASK_TAG_STRIKETHROUGH)); // overlayKeys.add(new // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING_DQ, // PreferenceConstants.EDITOR_JAVA_METHOD_NAME_COLOR)); // overlayKeys.add(new // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, // PreferenceConstants.EDITOR_JAVA_METHOD_NAME_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_PHP_OPERATOR_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_PHP_OPERATOR_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_PHP_BRACE_OPERATOR_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_PHP_BRACE_OPERATOR_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_JAVADOC_KEYWORD_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_JAVADOC_TAG_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_JAVADOC_LINKS_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_JAVADOC_DEFAULT_BOLD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_MATCHING_BRACKETS)); - overlayKeys - .add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR)); - overlayKeys - .add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE)); - overlayKeys - .add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR)); - overlayKeys - .add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.INT, - AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN)); - overlayKeys - .add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_PHP_OPERATOR_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_OPERATOR_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_OPERATOR_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_OPERATOR_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_OPERATOR_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_PHP_BRACE_OPERATOR_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_BRACE_OPERATOR_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_BRACE_OPERATOR_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_BRACE_OPERATOR_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_PHP_BRACE_OPERATOR_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_KEYWORD_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_KEYWORD_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_KEYWORD_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_KEYWORD_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_TAG_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_TAG_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_TAG_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_TAG_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_LINKS_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_LINKS_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_LINKS_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_LINKS_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_DEFAULT_BOLD)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_DEFAULT_ITALIC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_DEFAULT_UNDERLINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_JAVADOC_DEFAULT_STRIKETHROUGH)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_MATCHING_BRACKETS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN)); // overlayKeys.add(new // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, // PreferenceConstants.EDITOR_MARK_OCCURRENCES)); // overlayKeys.add(new // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, // PreferenceConstants.EDITOR_STICKY_OCCURRENCES)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_FIND_SCOPE_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_LINK_COLOR)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_CORRECTION_INDICATION)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS)); - overlayKeys - .add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER)); - overlayKeys - .add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR)); - overlayKeys - .add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_SPACES_FOR_TABS)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.CODEASSIST_AUTOACTIVATION)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.INT, - PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.CODEASSIST_AUTOINSERT)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.CODEASSIST_REPLACEMENT_BACKGROUND)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.CODEASSIST_REPLACEMENT_FOREGROUND)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA)); - overlayKeys - .add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVADOC)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.CODEASSIST_SHOW_VISIBLE_PROPOSALS)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.CODEASSIST_ORDER_PROPOSALS)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.CODEASSIST_CASE_SENSITIVITY)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.CODEASSIST_ADDIMPORT)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.CODEASSIST_INSERT_COMPLETION)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.CODEASSIST_GUESS_METHOD_ARGUMENTS)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_SMART_PASTE)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_CLOSE_STRINGS_DQ_PHP)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_CLOSE_STRINGS_SQ_PHP)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_CLOSE_BRACKETS_PHP)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_FIND_SCOPE_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_LINK_COLOR)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_CORRECTION_INDICATION)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_SPACES_FOR_TABS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.CODEASSIST_AUTOACTIVATION)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.CODEASSIST_AUTOINSERT)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.CODEASSIST_REPLACEMENT_BACKGROUND)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.CODEASSIST_REPLACEMENT_FOREGROUND)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVADOC)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.CODEASSIST_SHOW_VISIBLE_PROPOSALS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.CODEASSIST_ORDER_PROPOSALS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.CODEASSIST_CASE_SENSITIVITY)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.CODEASSIST_ADDIMPORT)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.CODEASSIST_INSERT_COMPLETION)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.CODEASSIST_GUESS_METHOD_ARGUMENTS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_SMART_PASTE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_CLOSE_STRINGS_DQ_PHP)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_CLOSE_STRINGS_SQ_PHP)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_CLOSE_BRACKETS_PHP)); // overlayKeys // .add(new OverlayPreferenceStore.OverlayKey( // OverlayPreferenceStore.BOOLEAN, // PreferenceConstants.EDITOR_CLOSE_BRACES)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_CLOSE_JAVADOCS)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_WRAP_WORDS)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_WRAP_STRINGS_DQ)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_ESCAPE_STRINGS_DQ)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_WRAP_STRINGS_SQ)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_ESCAPE_STRINGS_SQ)); - - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_ADD_JAVADOC_TAGS)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_FORMAT_JAVADOCS)); - - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_SMART_HOME_END)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_CLOSE_JAVADOCS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_WRAP_WORDS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_WRAP_STRINGS_DQ)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_ESCAPE_STRINGS_DQ)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_WRAP_STRINGS_SQ)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_ESCAPE_STRINGS_SQ)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_ADD_JAVADOC_TAGS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_FORMAT_JAVADOCS)); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_SMART_HOME_END)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE)); // overlayKeys.add(new // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, // PreferenceConstants.EDITOR_SHOW_TEXT_HOVER_AFFORDANCE)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIERS)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIER_MASKS)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, - PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER)); - overlayKeys - .add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, - PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER_MASK)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIERS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIER_MASKS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER_MASK)); + while (e.hasNext()) { AnnotationPreference info = (AnnotationPreference) e.next(); - overlayKeys - .add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, info - .getColorPreferenceKey())); - overlayKeys - .add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, info - .getTextPreferenceKey())); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, info.getColorPreferenceKey())); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getTextPreferenceKey())); + if (info.getHighlightPreferenceKey() != null) - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, info - .getHighlightPreferenceKey())); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, info - .getOverviewRulerPreferenceKey())); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getHighlightPreferenceKey())); + + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getOverviewRulerPreferenceKey())); + if (info.getVerticalRulerPreferenceKey() != null) - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.BOOLEAN, info - .getVerticalRulerPreferenceKey())); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getVerticalRulerPreferenceKey())); + if (info.getTextStylePreferenceKey() != null) - overlayKeys.add(new OverlayPreferenceStore.OverlayKey( - OverlayPreferenceStore.STRING, info - .getTextStylePreferenceKey())); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, info.getTextStylePreferenceKey())); } - OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys - .size()]; + + OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()]; overlayKeys.toArray(keys); + return keys; } /* * @see IWorkbenchPreferencePage#init() @@ -740,12 +590,15 @@ public class JavaEditorPreferencePage extends PreferencePage implements IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE); } - private void handleSyntaxColorListSelection() { - int i = fSyntaxColorList.getSelectionIndex(); + private void handleSyntaxColorListSelection () { + int i = fSyntaxColorList.getSelectionIndex (); String key = fSyntaxColorListModel[i][1]; - RGB rgb = PreferenceConverter.getColor(fOverlayStore, key); - fSyntaxForegroundColorEditor.setColorValue(rgb); - fBoldCheckBox.setSelection(fOverlayStore.getBoolean(key + BOLD)); + RGB rgb = PreferenceConverter.getColor (fOverlayStore, key); + fSyntaxForegroundColorEditor.setColorValue (rgb); + fBoldCheckBox.setSelection (fOverlayStore.getBoolean (key + BOLD)); + fItalicCheckBox.setSelection (fOverlayStore.getBoolean (key + ITALIC)); + fUnderlineCheckBox.setSelection (fOverlayStore.getBoolean (key + UNDERLINE)); + fStrikeThroughCheckBox.setSelection (fOverlayStore.getBoolean (key + STRIKETHROUGH)); } private void handleAppearanceColorListSelection() { @@ -808,90 +661,112 @@ public class JavaEditorPreferencePage extends PreferencePage implements // } private Control createSyntaxPage(Composite parent) { Composite colorComposite = new Composite(parent, SWT.NULL); - colorComposite.setLayout(new GridLayout()); - Group backgroundComposite = new Group(colorComposite, - SWT.SHADOW_ETCHED_IN); + colorComposite.setLayout (new GridLayout()); + Group backgroundComposite = new Group (colorComposite, SWT.SHADOW_ETCHED_IN); backgroundComposite.setLayout(new RowLayout()); - backgroundComposite.setText(PreferencesMessages - .getString("JavaEditorPreferencePage.backgroundColor"));//$NON-NLS-1$ + backgroundComposite.setText (PreferencesMessages.getString ("JavaEditorPreferencePage.backgroundColor"));//$NON-NLS-1$ + // SelectionListener backgroundSelectionListener = new SelectionListener() { - public void widgetSelected(SelectionEvent e) { - boolean custom = fBackgroundCustomRadioButton.getSelection(); - fBackgroundColorButton.setEnabled(custom); - fOverlayStore.setValue( - PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR, - !custom); + public void widgetSelected (SelectionEvent e) { + boolean custom = fBackgroundCustomRadioButton.getSelection (); + fBackgroundColorButton.setEnabled (custom); + fOverlayStore.setValue (PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR, !custom); } public void widgetDefaultSelected(SelectionEvent e) { } }; - fBackgroundDefaultRadioButton = new Button(backgroundComposite, - SWT.RADIO | SWT.LEFT); - fBackgroundDefaultRadioButton.setText(PreferencesMessages - .getString("JavaEditorPreferencePage.systemDefault")); //$NON-NLS-1$ - fBackgroundDefaultRadioButton - .addSelectionListener(backgroundSelectionListener); - fBackgroundCustomRadioButton = new Button(backgroundComposite, - SWT.RADIO | SWT.LEFT); - fBackgroundCustomRadioButton.setText(PreferencesMessages - .getString("JavaEditorPreferencePage.custom")); //$NON-NLS-1$ - fBackgroundCustomRadioButton - .addSelectionListener(backgroundSelectionListener); + + fBackgroundDefaultRadioButton = new Button(backgroundComposite, SWT.RADIO | SWT.LEFT); + fBackgroundDefaultRadioButton.setText (PreferencesMessages.getString ("JavaEditorPreferencePage.systemDefault")); //$NON-NLS-1$ + fBackgroundDefaultRadioButton.addSelectionListener (backgroundSelectionListener); + fBackgroundCustomRadioButton = new Button(backgroundComposite, SWT.RADIO | SWT.LEFT); + fBackgroundCustomRadioButton.setText (PreferencesMessages.getString ("JavaEditorPreferencePage.custom")); //$NON-NLS-1$ + fBackgroundCustomRadioButton.addSelectionListener (backgroundSelectionListener); fBackgroundColorEditor = new ColorEditor(backgroundComposite); - fBackgroundColorButton = fBackgroundColorEditor.getButton(); + fBackgroundColorButton = fBackgroundColorEditor.getButton (); + Label label = new Label(colorComposite, SWT.LEFT); - label.setText(PreferencesMessages - .getString("JavaEditorPreferencePage.foreground")); //$NON-NLS-1$ - label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - Composite editorComposite = new Composite(colorComposite, SWT.NONE); + label.setText (PreferencesMessages.getString("JavaEditorPreferencePage.foreground")); //$NON-NLS-1$ + label.setLayoutData (new GridData (GridData.FILL_HORIZONTAL)); + Composite editorComposite = new Composite (colorComposite, SWT.NONE); + GridLayout layout = new GridLayout(); layout.numColumns = 2; layout.marginHeight = 0; layout.marginWidth = 0; editorComposite.setLayout(layout); - GridData gd = new GridData(GridData.FILL_BOTH); - editorComposite.setLayoutData(gd); - fSyntaxColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL - | SWT.BORDER); - gd = new GridData(GridData.FILL_BOTH); - gd.heightHint = convertHeightInCharsToPixels(5); - fSyntaxColorList.setLayoutData(gd); - Composite stylesComposite = new Composite(editorComposite, SWT.NONE); - layout = new GridLayout(); + + GridData gd = new GridData (GridData.FILL_BOTH); + editorComposite.setLayoutData (gd); + fSyntaxColorList = new List (editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER); + gd = new GridData (GridData.FILL_BOTH); + gd.heightHint = convertHeightInCharsToPixels (5); + fSyntaxColorList.setLayoutData (gd); + Composite stylesComposite = new Composite (editorComposite, SWT.NONE); + layout = new GridLayout (); layout.marginHeight = 0; layout.marginWidth = 0; layout.numColumns = 2; stylesComposite.setLayout(layout); - stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); + + stylesComposite.setLayoutData (new GridData(GridData.FILL_BOTH)); label = new Label(stylesComposite, SWT.LEFT); - label.setText(PreferencesMessages - .getString("JavaEditorPreferencePage.color")); //$NON-NLS-1$ + label.setText(PreferencesMessages.getString ("JavaEditorPreferencePage.color")); //$NON-NLS-1$ + gd = new GridData(); gd.horizontalAlignment = GridData.BEGINNING; label.setLayoutData(gd); + fSyntaxForegroundColorEditor = new ColorEditor(stylesComposite); Button foregroundColorButton = fSyntaxForegroundColorEditor.getButton(); gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalAlignment = GridData.BEGINNING; - foregroundColorButton.setLayoutData(gd); - fBoldCheckBox = new Button(stylesComposite, SWT.CHECK); - fBoldCheckBox.setText(PreferencesMessages - .getString("JavaEditorPreferencePage.bold")); //$NON-NLS-1$ - gd = new GridData(GridData.FILL_HORIZONTAL); + foregroundColorButton.setLayoutData (gd); + + fBoldCheckBox = new Button (stylesComposite, SWT.CHECK); + fBoldCheckBox.setText (PreferencesMessages.getString ("JavaEditorPreferencePage.bold")); //$NON-NLS-1$ + + gd = new GridData (GridData.FILL_HORIZONTAL); + gd.horizontalAlignment = GridData.BEGINNING; + gd.horizontalSpan = 2; + fBoldCheckBox.setLayoutData (gd); + + fItalicCheckBox = new Button (stylesComposite, SWT.CHECK); + fItalicCheckBox.setText (PreferencesMessages.getString ("JavaEditorPreferencePage.italic")); //$NON-NLS-1$ + + gd = new GridData (GridData.FILL_HORIZONTAL); gd.horizontalAlignment = GridData.BEGINNING; gd.horizontalSpan = 2; - fBoldCheckBox.setLayoutData(gd); - label = new Label(colorComposite, SWT.LEFT); - label.setText(PreferencesMessages - .getString("JavaEditorPreferencePage.preview")); //$NON-NLS-1$ - label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - Control previewer = createPreviewer(colorComposite); - gd = new GridData(GridData.FILL_BOTH); - gd.widthHint = convertWidthInCharsToPixels(20); - gd.heightHint = convertHeightInCharsToPixels(5); - previewer.setLayoutData(gd); - fSyntaxColorList.addSelectionListener(new SelectionListener() { + fItalicCheckBox.setLayoutData (gd); + + fUnderlineCheckBox = new Button (stylesComposite, SWT.CHECK); + fUnderlineCheckBox.setText (PreferencesMessages.getString ("JavaEditorPreferencePage.underline")); //$NON-NLS-1$ + + gd = new GridData (GridData.FILL_HORIZONTAL); + gd.horizontalAlignment = GridData.BEGINNING; + gd.horizontalSpan = 2; + fUnderlineCheckBox.setLayoutData (gd); + + fStrikeThroughCheckBox = new Button (stylesComposite, SWT.CHECK); + fStrikeThroughCheckBox.setText (PreferencesMessages.getString ("JavaEditorPreferencePage.strikethrough")); //$NON-NLS-1$ + + gd = new GridData (GridData.FILL_HORIZONTAL); + gd.horizontalAlignment = GridData.BEGINNING; + gd.horizontalSpan = 2; + fStrikeThroughCheckBox.setLayoutData (gd); + + label = new Label (colorComposite, SWT.LEFT); + label.setText (PreferencesMessages.getString ("JavaEditorPreferencePage.preview")); //$NON-NLS-1$ + label.setLayoutData (new GridData (GridData.FILL_HORIZONTAL)); + Control previewer = createPreviewer (colorComposite); + + gd = new GridData (GridData.FILL_BOTH); + gd.widthHint = convertWidthInCharsToPixels (20); + gd.heightHint = convertHeightInCharsToPixels (5); + previewer.setLayoutData (gd); + + fSyntaxColorList.addSelectionListener (new SelectionListener () { public void widgetDefaultSelected(SelectionEvent e) { // do nothing } @@ -900,7 +775,8 @@ public class JavaEditorPreferencePage extends PreferencePage implements handleSyntaxColorListSelection(); } }); - foregroundColorButton.addSelectionListener(new SelectionListener() { + + foregroundColorButton.addSelectionListener (new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { // do nothing } @@ -908,33 +784,68 @@ public class JavaEditorPreferencePage extends PreferencePage implements public void widgetSelected(SelectionEvent e) { int i = fSyntaxColorList.getSelectionIndex(); String key = fSyntaxColorListModel[i][1]; - PreferenceConverter.setValue(fOverlayStore, key, - fSyntaxForegroundColorEditor.getColorValue()); + PreferenceConverter.setValue(fOverlayStore, key, fSyntaxForegroundColorEditor.getColorValue ()); } }); - fBackgroundColorButton.addSelectionListener(new SelectionListener() { - public void widgetDefaultSelected(SelectionEvent e) { + + fBackgroundColorButton.addSelectionListener (new SelectionListener() { + public void widgetDefaultSelected (SelectionEvent e) { // do nothing } - public void widgetSelected(SelectionEvent e) { - PreferenceConverter.setValue(fOverlayStore, - PreferenceConstants.EDITOR_BACKGROUND_COLOR, - fBackgroundColorEditor.getColorValue()); + public void widgetSelected (SelectionEvent e) { + PreferenceConverter.setValue (fOverlayStore, PreferenceConstants.EDITOR_BACKGROUND_COLOR, fBackgroundColorEditor.getColorValue ()); } }); - fBoldCheckBox.addSelectionListener(new SelectionListener() { - public void widgetDefaultSelected(SelectionEvent e) { + + fBoldCheckBox.addSelectionListener (new SelectionListener () { + public void widgetDefaultSelected (SelectionEvent e) { // do nothing } - public void widgetSelected(SelectionEvent e) { - int i = fSyntaxColorList.getSelectionIndex(); + public void widgetSelected (SelectionEvent e) { + int i = fSyntaxColorList.getSelectionIndex (); + String key = fSyntaxColorListModel[i][1]; + fOverlayStore.setValue (key + BOLD, fBoldCheckBox.getSelection ()); + } + }); + + fItalicCheckBox.addSelectionListener (new SelectionListener () { + public void widgetDefaultSelected (SelectionEvent e) { + // do nothing + } + + public void widgetSelected (SelectionEvent e) { + int i = fSyntaxColorList.getSelectionIndex (); + String key = fSyntaxColorListModel[i][1]; + fOverlayStore.setValue (key + ITALIC, fItalicCheckBox.getSelection ()); + } + }); + + fUnderlineCheckBox.addSelectionListener (new SelectionListener () { + public void widgetDefaultSelected (SelectionEvent e) { + // do nothing + } + + public void widgetSelected (SelectionEvent e) { + int i = fSyntaxColorList.getSelectionIndex (); + String key = fSyntaxColorListModel[i][1]; + fOverlayStore.setValue (key + UNDERLINE, fUnderlineCheckBox.getSelection ()); + } + }); + + fStrikeThroughCheckBox.addSelectionListener (new SelectionListener () { + public void widgetDefaultSelected (SelectionEvent e) { + // do nothing + } + + public void widgetSelected (SelectionEvent e) { + int i = fSyntaxColorList.getSelectionIndex (); String key = fSyntaxColorListModel[i][1]; - fOverlayStore - .setValue(key + BOLD, fBoldCheckBox.getSelection()); + fOverlayStore.setValue (key + STRIKETHROUGH, fStrikeThroughCheckBox.getSelection ()); } }); + return colorComposite; } @@ -942,15 +853,13 @@ public class JavaEditorPreferencePage extends PreferencePage implements Preferences coreStore = createTemporaryCorePreferenceStore(); fJavaTextTools = new JavaTextTools(fOverlayStore, coreStore, false); IPreferenceStore generalTextStore = EditorsUI.getPreferenceStore(); - IPreferenceStore store = new ChainedPreferenceStore( + IPreferenceStore store = new ChainedPreferenceStore ( new IPreferenceStore[] { fOverlayStore, - new PreferencesAdapter( - createTemporaryCorePreferenceStore()), + new PreferencesAdapter (createTemporaryCorePreferenceStore ()), generalTextStore }); - fPreviewViewer = new JavaSourceViewer(parent, null, null, false, - SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER, store); + fPreviewViewer = new JavaSourceViewer(parent, null, null, false, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER, store); JavaTextTools tools = PHPeclipsePlugin.getDefault().getJavaTextTools(); PHPSourceViewerConfiguration configuration = new PHPSourceViewerConfiguration( tools.getColorManager(), store, null, @@ -960,22 +869,21 @@ public class JavaEditorPreferencePage extends PreferencePage implements // IPHPPartitions.PHP_PARTITIONING); fPreviewViewer.configure(configuration); - Font font = JFaceResources - .getFont(PreferenceConstants.EDITOR_TEXT_FONT); - fPreviewViewer.getTextWidget().setFont(font); - new JavaSourcePreviewerUpdater(fPreviewViewer, configuration, store); - fPreviewViewer.setEditable(false); - String content = loadPreviewContentFromFile("ColorSettingPreviewCode.txt"); //$NON-NLS-1$ - IDocument document = new Document(content); - fJavaTextTools.setupJavaDocumentPartitioner(document, - IPHPPartitions.PHP_PARTITIONING); - fPreviewViewer.setDocument(document); - return fPreviewViewer.getControl(); + Font font = JFaceResources.getFont (PreferenceConstants.EDITOR_TEXT_FONT); + fPreviewViewer.getTextWidget ().setFont (font); + new JavaSourcePreviewerUpdater (fPreviewViewer, configuration, store); + fPreviewViewer.setEditable (false); + String content = loadPreviewContentFromFile ("ColorSettingPreviewCode.txt"); //$NON-NLS-1$ + IDocument document = new Document (content); + fJavaTextTools.setupJavaDocumentPartitioner (document, IPHPPartitions.PHP_PARTITIONING); + fPreviewViewer.setDocument (document); + + return fPreviewViewer.getControl (); } private Preferences createTemporaryCorePreferenceStore() { Preferences result = new Preferences(); - result.setValue(COMPILER_TASK_TAGS, "TASK"); //$NON-NLS-1$ + result.setValue (COMPILER_TASK_TAGS, "TASK"); //$NON-NLS-1$ return result; } @@ -984,7 +892,28 @@ public class JavaEditorPreferencePage extends PreferencePage implements GridLayout layout = new GridLayout(); layout.numColumns = 2; appearanceComposite.setLayout(layout); + + // Inserts a hyper-link to the General Editor preferences page + // TODO Can probably be removed post 1.5.0? String label = PreferencesMessages + .getString("JavaEditorPreferencePage.appearanceTabLink"); + Link link = new Link(appearanceComposite, SWT.NONE); + GridData gridPosition = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); + gridPosition.horizontalSpan = 2; + link.setLayoutData(gridPosition); + + link.setText(label); + link.addListener(SWT.Selection, new Listener () { + public void handleEvent(Event event) { + String u = event.text; + PreferencesUtil.createPreferenceDialogOn(getShell(), u, null, null); + } + }); + String tooltip = PreferencesMessages + .getString("JavaEditorPreferencePage.appearanceTabTooltip"); + link.setToolTipText(tooltip); + + label = PreferencesMessages .getString("JavaEditorPreferencePage.displayedTabWidth"); //$NON-NLS-1$ addTextField(appearanceComposite, label, PreferenceConstants.EDITOR_TAB_WIDTH, 3, 0, true); @@ -1003,13 +932,6 @@ public class JavaEditorPreferencePage extends PreferencePage implements AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER, 0); label = PreferencesMessages - .getString("JavaEditorPreferencePage.showLineNumbers"); //$NON-NLS-1$ - addCheckBox( - appearanceComposite, - label, - AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER, - 0); - label = PreferencesMessages .getString("JavaEditorPreferencePage.highlightMatchingBrackets"); //$NON-NLS-1$ addCheckBox(appearanceComposite, label, PreferenceConstants.EDITOR_MATCHING_BRACKETS, 0); @@ -1294,40 +1216,40 @@ public class JavaEditorPreferencePage extends PreferencePage implements // }); // return composite; // } - private String[][] createAnnotationTypeListModel( - MarkerAnnotationPreferences preferences) { - ArrayList listModelItems = new ArrayList(); - SortedSet sortedPreferences = new TreeSet(new Comparator() { - /* - * @see java.util.Comparator#compare(java.lang.Object, - * java.lang.Object) - */ - public int compare(Object o1, Object o2) { - if (!(o2 instanceof AnnotationPreference)) - return -1; - if (!(o1 instanceof AnnotationPreference)) - return 1; - AnnotationPreference a1 = (AnnotationPreference) o1; - AnnotationPreference a2 = (AnnotationPreference) o2; - return Collator.getInstance().compare(a1.getPreferenceLabel(), - a2.getPreferenceLabel()); - } - }); - sortedPreferences.addAll(preferences.getAnnotationPreferences()); - Iterator e = sortedPreferences.iterator(); - while (e.hasNext()) { - AnnotationPreference info = (AnnotationPreference) e.next(); - listModelItems.add(new String[] { info.getPreferenceLabel(), - info.getColorPreferenceKey(), info.getTextPreferenceKey(), - info.getOverviewRulerPreferenceKey(), - info.getHighlightPreferenceKey(), - info.getVerticalRulerPreferenceKey(), - info.getTextStylePreferenceKey() }); - } - String[][] items = new String[listModelItems.size()][]; - listModelItems.toArray(items); - return items; - } +// private String[][] createAnnotationTypeListModel( +// MarkerAnnotationPreferences preferences) { +// ArrayList listModelItems = new ArrayList(); +// SortedSet sortedPreferences = new TreeSet(new Comparator() { +// /* +// * @see java.util.Comparator#compare(java.lang.Object, +// * java.lang.Object) +// */ +// public int compare(Object o1, Object o2) { +// if (!(o2 instanceof AnnotationPreference)) +// return -1; +// if (!(o1 instanceof AnnotationPreference)) +// return 1; +// AnnotationPreference a1 = (AnnotationPreference) o1; +// AnnotationPreference a2 = (AnnotationPreference) o2; +// return Collator.getInstance().compare(a1.getPreferenceLabel(), +// a2.getPreferenceLabel()); +// } +// }); +// sortedPreferences.addAll(preferences.getAnnotationPreferences()); +// Iterator e = sortedPreferences.iterator(); +// while (e.hasNext()) { +// AnnotationPreference info = (AnnotationPreference) e.next(); +// listModelItems.add(new String[] { info.getPreferenceLabel(), +// info.getColorPreferenceKey(), info.getTextPreferenceKey(), +// info.getOverviewRulerPreferenceKey(), +// info.getHighlightPreferenceKey(), +// info.getVerticalRulerPreferenceKey(), +// info.getTextStylePreferenceKey() }); +// } +// String[][] items = new String[listModelItems.size()][]; +// listModelItems.toArray(items); +// return items; +// } private Control createTypingPage(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); @@ -1442,13 +1364,13 @@ public class JavaEditorPreferencePage extends PreferencePage implements return composite; } - private void addFiller(Composite composite) { - Label filler = new Label(composite, SWT.LEFT); - GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); - gd.horizontalSpan = 2; - gd.heightHint = convertHeightInCharsToPixels(1) / 2; - filler.setLayoutData(gd); - } +// private void addFiller(Composite composite) { +// Label filler = new Label(composite, SWT.LEFT); +// GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); +// gd.horizontalSpan = 2; +// gd.heightHint = convertHeightInCharsToPixels(1) / 2; +// filler.setLayoutData(gd); +// } private static void indent(Control control) { GridData gridData = new GridData(); @@ -1469,40 +1391,40 @@ public class JavaEditorPreferencePage extends PreferencePage implements }); } - private void addCompletionRadioButtons(Composite contentAssistComposite) { - Composite completionComposite = new Composite(contentAssistComposite, - SWT.NONE); - GridData ccgd = new GridData(); - ccgd.horizontalSpan = 2; - completionComposite.setLayoutData(ccgd); - GridLayout ccgl = new GridLayout(); - ccgl.marginWidth = 0; - ccgl.numColumns = 2; - completionComposite.setLayout(ccgl); - // SelectionListener completionSelectionListener= new SelectionAdapter() - // { - // public void widgetSelected(SelectionEvent e) { - // boolean insert= fCompletionInsertsRadioButton.getSelection(); - // fOverlayStore.setValue(PreferenceConstants.CODEASSIST_INSERT_COMPLETION, - // insert); - // } - // }; - // - // fCompletionInsertsRadioButton= new Button(completionComposite, - // SWT.RADIO - // | SWT.LEFT); - // fCompletionInsertsRadioButton.setText(PreferencesMessages.getString("JavaEditorPreferencePage.completionInserts")); - // //$NON-NLS-1$ - // fCompletionInsertsRadioButton.setLayoutData(new GridData()); - // fCompletionInsertsRadioButton.addSelectionListener(completionSelectionListener); - // - // fCompletionOverwritesRadioButton= new Button(completionComposite, - // SWT.RADIO | SWT.LEFT); - // fCompletionOverwritesRadioButton.setText(PreferencesMessages.getString("JavaEditorPreferencePage.completionOverwrites")); - // //$NON-NLS-1$ - // fCompletionOverwritesRadioButton.setLayoutData(new GridData()); - // fCompletionOverwritesRadioButton.addSelectionListener(completionSelectionListener); - } +// private void addCompletionRadioButtons(Composite contentAssistComposite) { +// Composite completionComposite = new Composite(contentAssistComposite, +// SWT.NONE); +// GridData ccgd = new GridData(); +// ccgd.horizontalSpan = 2; +// completionComposite.setLayoutData(ccgd); +// GridLayout ccgl = new GridLayout(); +// ccgl.marginWidth = 0; +// ccgl.numColumns = 2; +// completionComposite.setLayout(ccgl); +// // SelectionListener completionSelectionListener= new SelectionAdapter() +// // { +// // public void widgetSelected(SelectionEvent e) { +// // boolean insert= fCompletionInsertsRadioButton.getSelection(); +// // fOverlayStore.setValue(PreferenceConstants.CODEASSIST_INSERT_COMPLETION, +// // insert); +// // } +// // }; +// // +// // fCompletionInsertsRadioButton= new Button(completionComposite, +// // SWT.RADIO +// // | SWT.LEFT); +// // fCompletionInsertsRadioButton.setText(PreferencesMessages.getString("JavaEditorPreferencePage.completionInserts")); +// // //$NON-NLS-1$ +// // fCompletionInsertsRadioButton.setLayoutData(new GridData()); +// // fCompletionInsertsRadioButton.addSelectionListener(completionSelectionListener); +// // +// // fCompletionOverwritesRadioButton= new Button(completionComposite, +// // SWT.RADIO | SWT.LEFT); +// // fCompletionOverwritesRadioButton.setText(PreferencesMessages.getString("JavaEditorPreferencePage.completionOverwrites")); +// // //$NON-NLS-1$ +// // fCompletionOverwritesRadioButton.setLayoutData(new GridData()); +// // fCompletionOverwritesRadioButton.addSelectionListener(completionSelectionListener); +// } private Control createNavigationPage(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); @@ -1645,15 +1567,15 @@ public class JavaEditorPreferencePage extends PreferencePage implements } } - private IStatus getBrowserLikeLinksKeyModifierStatus() { - if (fBrowserLikeLinksKeyModifierStatus == null) - fBrowserLikeLinksKeyModifierStatus = new StatusInfo(); - return fBrowserLikeLinksKeyModifierStatus; - } +// private IStatus getBrowserLikeLinksKeyModifierStatus() { +// if (fBrowserLikeLinksKeyModifierStatus == null) +// fBrowserLikeLinksKeyModifierStatus = new StatusInfo(); +// return fBrowserLikeLinksKeyModifierStatus; +// } /** * Computes the state mask for the given modifier string. - * + * * @param modifiers * the string with the modifiers, separated by '+', '-', ';', ',' * or '.' @@ -1807,8 +1729,8 @@ public class JavaEditorPreferencePage extends PreferencePage implements fBackgroundDefaultRadioButton.setSelection(default_); fBackgroundCustomRadioButton.setSelection(!default_); fBackgroundColorButton.setEnabled(!default_); - boolean closeJavaDocs = fOverlayStore - .getBoolean(PreferenceConstants.EDITOR_CLOSE_JAVADOCS); +// boolean closeJavaDocs = fOverlayStore +// .getBoolean(PreferenceConstants.EDITOR_CLOSE_JAVADOCS); // fAddJavaDocTagsButton.setEnabled(closeJavaDocs); fEscapeStringsButtonDQ.setEnabled(fOverlayStore .getBoolean(PreferenceConstants.EDITOR_WRAP_STRINGS_DQ)); @@ -1933,9 +1855,9 @@ public class JavaEditorPreferencePage extends PreferencePage implements textLimit, indentation, isNumber)); } - private static Label getLabelControl(Control[] labelledTextField) { - return (Label) labelledTextField[0]; - } +// private static Label getLabelControl(Control[] labelledTextField) { +// return (Label) labelledTextField[0]; +// } private static Text getTextControl(Control[] labelledTextField) { return (Text) labelledTextField[1]; @@ -2040,4 +1962,4 @@ public class JavaEditorPreferencePage extends PreferencePage implements setValid(!status.matches(IStatus.ERROR)); StatusUtil.applyToStatusLine(this, status); } -} \ No newline at end of file +}