X-Git-Url: http://secure.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 30cbe67..42c40a9 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
@@ -40,6 +40,7 @@ import net.sourceforge.phpeclipse.preferences.ColorEditor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Preferences;
+import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
@@ -49,11 +50,15 @@ import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -80,136 +85,76 @@ import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
/**
* The page for setting the editor options.
*/
-public class JavaEditorPreferencePage extends PreferencePage implements
- IWorkbenchPreferencePage {
+public class JavaEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
private static final String BOLD = PreferenceConstants.EDITOR_BOLD_SUFFIX;
private static final String COMPILER_TASK_TAGS = JavaCore.COMPILER_TASK_TAGS;
- private static final String DELIMITER = PreferencesMessages
- .getString("JavaEditorPreferencePage.navigation.delimiter"); //$NON-NLS-1$
+ private static final String DELIMITER = PreferencesMessages.getString("JavaEditorPreferencePage.navigation.delimiter"); //$NON-NLS-1$
/** The keys of the overlay store. */
public final OverlayPreferenceStore.OverlayKey[] fKeys;
private final String[][] fSyntaxColorListModel = new String[][] {
- // {
- // PreferencesMessages.getString("JavaEditorPreferencePage.multiLineComment"),
- // PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR }, //$NON-NLS-1$
- // {
- // PreferencesMessages.getString("JavaEditorPreferencePage.singleLineComment"),
- // PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR }, //$NON-NLS-1$
- // { PreferencesMessages.getString("JavaEditorPreferencePage.keywords"),
- // PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR }, //$NON-NLS-1$
- // { PreferencesMessages.getString("JavaEditorPreferencePage.strings"),
- // PreferenceConstants.EDITOR_STRING_COLOR }, //$NON-NLS-1$
- // {
- // PreferencesMessages.getString("JavaEditorPreferencePage.methodNames"),
- // PreferenceConstants.EDITOR_JAVA_METHOD_NAME_COLOR }, //$NON-NLS-1$
- // { PreferencesMessages.getString("JavaEditorPreferencePage.operators"),
- // PreferenceConstants.EDITOR_JAVA_OPERATOR_COLOR }, //$NON-NLS-1$
- // { PreferencesMessages.getString("JavaEditorPreferencePage.others"),
- // PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR }, //$NON-NLS-1$
- // {
- // PreferencesMessages.getString("JavaEditorPreferencePage.javaCommentTaskTags"),
- // PreferenceConstants.EDITOR_TASK_TAG_COLOR }, //$NON-NLS-1$
- // {
- // PreferencesMessages.getString("JavaEditorPreferencePage.javaDocKeywords"),
- // PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR }, //$NON-NLS-1$
- // {
- // PreferencesMessages.getString("JavaEditorPreferencePage.javaDocHtmlTags"),
- // PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR }, //$NON-NLS-1$
- // {
- // PreferencesMessages.getString("JavaEditorPreferencePage.javaDocLinks"),
- // PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR }, //$NON-NLS-1$
- // {
- // PreferencesMessages.getString("JavaEditorPreferencePage.javaDocOthers"),
- // PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR } //$NON-NLS-1$
{
- PreferencesMessages
- .getString("PHPEditorPreferencePage.multiLineComment"),
+ PreferencesMessages.getString("JavaEditorPreferencePage.multiLineComment"),
PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR },
//$NON-NLS-1$
{
- PreferencesMessages
- .getString("PHPEditorPreferencePage.singleLineComment"),
+ PreferencesMessages.getString("JavaEditorPreferencePage.singleLineComment"),
PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR },
//$NON-NLS-1$
- { PreferencesMessages.getString("PHPEditorPreferencePage.tags"),
- PreferenceConstants.EDITOR_PHP_TAG_COLOR },
+ { PreferencesMessages.getString("JavaEditorPreferencePage.tags"), PreferenceConstants.EDITOR_PHP_TAG_COLOR },
//$NON-NLS-1$
- { PreferencesMessages.getString("PHPEditorPreferencePage.keywords"),
- PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR },
- { PreferencesMessages.getString("PHPEditorPreferencePage.functionNames"),
- PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_COLOR },
+ { PreferencesMessages.getString("JavaEditorPreferencePage.keywords"), PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR },
+ { PreferencesMessages.getString("JavaEditorPreferencePage.functionNames"), PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_COLOR },
//$NON-NLS-1$
- { PreferencesMessages.getString("PHPEditorPreferencePage.variables"),
- PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR },
+ { PreferencesMessages.getString("JavaEditorPreferencePage.variables"), PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR },
//$NON-NLS-1$
- { PreferencesMessages.getString("PHPEditorPreferencePage.constants"),
- PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR },
+ { PreferencesMessages.getString("JavaEditorPreferencePage.constants"), PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR },
//$NON-NLS-1$
- { PreferencesMessages.getString("PHPEditorPreferencePage.types"),
- PreferenceConstants.EDITOR_PHP_TYPE_COLOR },
+ { PreferencesMessages.getString("JavaEditorPreferencePage.types"), PreferenceConstants.EDITOR_PHP_TYPE_COLOR },
//$NON-NLS-1$
- { PreferencesMessages.getString("PHPEditorPreferencePage.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("PHPEditorPreferencePage.others"),
- PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR }, //$NON-NLS-1$
- { PreferencesMessages.getString("JavaEditorPreferencePage.operators"),
- PreferenceConstants.EDITOR_PHP_OPERATOR_COLOR },
+ { PreferencesMessages.getString("JavaEditorPreferencePage.others"), PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR }, //$NON-NLS-1$
+ { 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"), PreferenceConstants.EDITOR_PHP_BRACE_OPERATOR_COLOR },
//$NON-NLS-1$
- {
- PreferencesMessages
- .getString("PHPEditorPreferencePage.phpDocKeywords"),
- PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR },
+ { PreferencesMessages.getString("JavaEditorPreferencePage.phpDocKeywords"), PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR },
//$NON-NLS-1$
- {
- PreferencesMessages
- .getString("PHPEditorPreferencePage.phpDocHtmlTags"),
- PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR },
+ { PreferencesMessages.getString("JavaEditorPreferencePage.phpDocHtmlTags"), PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR },
//$NON-NLS-1$
- { PreferencesMessages.getString("PHPEditorPreferencePage.phpDocLinks"),
- PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR },
+ { PreferencesMessages.getString("JavaEditorPreferencePage.phpDocLinks"), PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR },
//$NON-NLS-1$
- { PreferencesMessages.getString("PHPEditorPreferencePage.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"),
+ 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"),
- PreferenceConstants.EDITOR_FIND_SCOPE_COLOR },
+ { 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;
@@ -258,8 +203,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
public void widgetSelected(SelectionEvent e) {
Button button = (Button) e.widget;
- fOverlayStore.setValue((String) fCheckBoxes.get(button), button
- .getSelection());
+ fOverlayStore.setValue((String) fCheckBoxes.get(button), button.getSelection());
}
};
@@ -305,9 +249,11 @@ public class JavaEditorPreferencePage extends PreferencePage implements
private Button fBoldCheckBox;
-// private Button fAddJavaDocTagsButton;
+ // private Button fAddJavaDocTagsButton;
- private Button fEscapeStringsButton;
+ private Button fEscapeStringsButtonDQ;
+
+ private Button fEscapeStringsButtonSQ;
// private Button fGuessMethodArgumentsButton;
private SourceViewer fPreviewViewer;
@@ -336,9 +282,12 @@ public class JavaEditorPreferencePage extends PreferencePage implements
private Button fShowInVerticalRulerCheckBox;
- // private Text fBrowserLikeLinksKeyModifierText;
- // private Button fBrowserLikeLinksCheckBox;
- // private StatusInfo fBrowserLikeLinksKeyModifierStatus;
+ private Text fBrowserLikeLinksKeyModifierText;
+
+ private Button fBrowserLikeLinksCheckBox;
+
+ private StatusInfo fBrowserLikeLinksKeyModifierStatus;
+
// private Button fCompletionInsertsRadioButton;
// private Button fCompletionOverwritesRadioButton;
// private Button fStickyOccurrencesButton;
@@ -346,8 +295,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);
@@ -356,161 +304,113 @@ public class JavaEditorPreferencePage extends PreferencePage implements
// createAnnotationTypeListModel(markerAnnotationPreferences);
}
- private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys(
- MarkerAnnotationPreferences preferences) {
+ private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys(MarkerAnnotationPreferences preferences) {
ArrayList overlayKeys = new ArrayList();
Iterator e = preferences.getAnnotationPreferences().iterator();
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_FOREGROUND_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_FOREGROUND_DEFAULT_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_BACKGROUND_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ 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,
+ 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,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ 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,
+ 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,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_PHP_VARIABLE_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ 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_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));
+ .add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_STRING_COLOR_DQ));
overlayKeys
- .add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
- PreferenceConstants.EDITOR_STRING_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ .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_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_TASK_TAG_COLOR));
+ 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,
// PreferenceConstants.EDITOR_JAVA_METHOD_NAME_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_PHP_OPERATOR_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_PHP_OPERATOR_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ 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,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_JAVADOC_KEYWORD_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_JAVADOC_TAG_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_JAVADOC_LINKS_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_JAVADOC_DEFAULT_BOLD));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ 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,
+ 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,
+ 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,
@@ -518,162 +418,120 @@ public class JavaEditorPreferencePage extends PreferencePage implements
// overlayKeys.add(new
// OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
// PreferenceConstants.EDITOR_STICKY_OCCURRENCES));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ 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,
+ 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,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ 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,
+ 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,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.CODEASSIST_AUTOACTIVATION));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.INT,
+ 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,
+ 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,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.CODEASSIST_REPLACEMENT_BACKGROUND));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.CODEASSIST_REPLACEMENT_FOREGROUND));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVADOC));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.CODEASSIST_SHOW_VISIBLE_PROPOSALS));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.CODEASSIST_ORDER_PROPOSALS));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ 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,
+ 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,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ 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_PHP));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ 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_CLOSE_BRACES));
overlayKeys
- .add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
- PreferenceConstants.EDITOR_WRAP_STRINGS));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
- PreferenceConstants.EDITOR_ESCAPE_STRINGS));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ .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_SMART_HOME_END));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
+ PreferenceConstants.EDITOR_FORMAT_JAVADOCS));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
+ PreferenceConstants.EDITOR_P_RTRIM_ON_SAVE));
+
+ 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,
+ 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,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIERS));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIER_MASKS));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER));
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
+ 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;
} /*
@@ -688,8 +546,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
*/
public void createControl(Composite parent) {
super.createControl(parent);
- WorkbenchHelp.setHelp(getControl(),
- IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);
+ WorkbenchHelp.setHelp(getControl(), IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);
}
private void handleSyntaxColorListSelection() {
@@ -762,36 +619,27 @@ public class JavaEditorPreferencePage extends PreferencePage implements
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);
+ 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();
Label label = new Label(colorComposite, SWT.LEFT);
- label.setText(PreferencesMessages
- .getString("JavaEditorPreferencePage.foreground")); //$NON-NLS-1$
+ 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();
@@ -801,8 +649,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
editorComposite.setLayout(layout);
GridData gd = new GridData(GridData.FILL_BOTH);
editorComposite.setLayoutData(gd);
- fSyntaxColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL
- | SWT.BORDER);
+ fSyntaxColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = convertHeightInCharsToPixels(5);
fSyntaxColorList.setLayoutData(gd);
@@ -814,8 +661,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
stylesComposite.setLayout(layout);
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);
@@ -825,15 +671,13 @@ public class JavaEditorPreferencePage extends PreferencePage implements
gd.horizontalAlignment = GridData.BEGINNING;
foregroundColorButton.setLayoutData(gd);
fBoldCheckBox = new Button(stylesComposite, SWT.CHECK);
- fBoldCheckBox.setText(PreferencesMessages
- .getString("JavaEditorPreferencePage.bold")); //$NON-NLS-1$
+ 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);
label = new Label(colorComposite, SWT.LEFT);
- label.setText(PreferencesMessages
- .getString("JavaEditorPreferencePage.preview")); //$NON-NLS-1$
+ 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);
@@ -857,8 +701,7 @@ 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() {
@@ -867,9 +710,8 @@ public class JavaEditorPreferencePage extends PreferencePage implements
}
public void widgetSelected(SelectionEvent e) {
- PreferenceConverter.setValue(fOverlayStore,
- PreferenceConstants.EDITOR_BACKGROUND_COLOR, fBackgroundColorEditor
- .getColorValue());
+ PreferenceConverter.setValue(fOverlayStore, PreferenceConstants.EDITOR_BACKGROUND_COLOR, fBackgroundColorEditor
+ .getColorValue());
}
});
fBoldCheckBox.addSelectionListener(new SelectionListener() {
@@ -895,20 +737,20 @@ public class JavaEditorPreferencePage extends PreferencePage implements
new PreferencesAdapter(createTemporaryCorePreferenceStore()),
generalTextStore });
- fPreviewViewer = new JavaSourceViewer(parent, null, null, false,
- SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER, store);
-
- fPreviewViewer.configure(new PHPSourceViewerConfiguration(fJavaTextTools,
- null, IPHPPartitions.PHP_PARTITIONING));
- // Font font= JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT);
- // fPreviewViewer.getTextWidget().setFont(font);
- fPreviewViewer.getTextWidget().setFont(
- JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT));
- // new JavaSourcePreviewerUpdater(fPreviewViewer, fJavaTextTools);
+ 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,
+ IPHPPartitions.PHP_PARTITIONING);
+ // PHPSourceViewerConfiguration configuration =new PHPSourceViewerConfiguration(fJavaTextTools, null,
+ // 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, ".php", null); //IJavaPartitions.JAVA_PARTITIONING);
fJavaTextTools.setupJavaDocumentPartitioner(document, IPHPPartitions.PHP_PARTITIONING);
fPreviewViewer.setDocument(document);
return fPreviewViewer.getControl();
@@ -925,46 +767,24 @@ public class JavaEditorPreferencePage extends PreferencePage implements
GridLayout layout = new GridLayout();
layout.numColumns = 2;
appearanceComposite.setLayout(layout);
- String label = PreferencesMessages
- .getString("JavaEditorPreferencePage.displayedTabWidth"); //$NON-NLS-1$
- addTextField(appearanceComposite, label,
- PreferenceConstants.EDITOR_TAB_WIDTH, 3, 0, true);
- label = PreferencesMessages
- .getString("JavaEditorPreferencePage.printMarginColumn"); //$NON-NLS-1$
- addTextField(
- appearanceComposite,
- label,
- AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN,
- 3, 0, true);
- label = PreferencesMessages
- .getString("JavaEditorPreferencePage.showOverviewRuler"); //$NON-NLS-1$
- addCheckBox(appearanceComposite, label,
- 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);
- label = PreferencesMessages
- .getString("JavaEditorPreferencePage.highlightCurrentLine"); //$NON-NLS-1$
- addCheckBox(appearanceComposite, label,
- AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE, 0);
- label = PreferencesMessages
- .getString("JavaEditorPreferencePage.showPrintMargin"); //$NON-NLS-1$
- addCheckBox(appearanceComposite, label,
- AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN, 0);
- label = PreferencesMessages
- .getString("JavaEditorPreferencePage.markOccurrences"); //$NON-NLS-1$
+ String label = PreferencesMessages.getString("JavaEditorPreferencePage.displayedTabWidth"); //$NON-NLS-1$
+ addTextField(appearanceComposite, label, PreferenceConstants.EDITOR_TAB_WIDTH, 3, 0, true);
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.printMarginColumn"); //$NON-NLS-1$
+ addTextField(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN, 3, 0, true);
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.showOverviewRuler"); //$NON-NLS-1$
+ addCheckBox(appearanceComposite, label, 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);
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.highlightCurrentLine"); //$NON-NLS-1$
+ addCheckBox(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE, 0);
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.showPrintMargin"); //$NON-NLS-1$
+ addCheckBox(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN, 0);
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.markOccurrences"); //$NON-NLS-1$
// Button master= addCheckBox(appearanceComposite, label,
// PreferenceConstants.EDITOR_MARK_OCCURRENCES, 0); //$NON-NLS-1$
- label = PreferencesMessages
- .getString("JavaEditorPreferencePage.stickyOccurrences"); //$NON-NLS-1$
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.stickyOccurrences"); //$NON-NLS-1$
// fStickyOccurrencesButton= addCheckBox(appearanceComposite, label,
// PreferenceConstants.EDITOR_STICKY_OCCURRENCES, 0); //$NON-NLS-1$
// createDependency(master, fStickyOccurrencesButton);
@@ -974,8 +794,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
gd.heightHint = convertHeightInCharsToPixels(1) / 2;
l.setLayoutData(gd);
l = new Label(appearanceComposite, SWT.LEFT);
- l.setText(PreferencesMessages
- .getString("JavaEditorPreferencePage.appearanceOptions")); //$NON-NLS-1$
+ l.setText(PreferencesMessages.getString("JavaEditorPreferencePage.appearanceOptions")); //$NON-NLS-1$
gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan = 2;
l.setLayoutData(gd);
@@ -988,10 +807,8 @@ public class JavaEditorPreferencePage extends PreferencePage implements
gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
gd.horizontalSpan = 2;
editorComposite.setLayoutData(gd);
- fAppearanceColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL
- | SWT.BORDER);
- gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING
- | GridData.FILL_HORIZONTAL);
+ fAppearanceColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
+ gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
gd.heightHint = convertHeightInCharsToPixels(8);
fAppearanceColorList.setLayoutData(gd);
Composite stylesComposite = new Composite(editorComposite, SWT.NONE);
@@ -1028,8 +845,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
public void widgetSelected(SelectionEvent e) {
int i = fAppearanceColorList.getSelectionIndex();
String key = fAppearanceColorListModel[i][1];
- PreferenceConverter.setValue(fOverlayStore, key, fAppearanceColorEditor
- .getColorValue());
+ PreferenceConverter.setValue(fOverlayStore, key, fAppearanceColorEditor.getColorValue());
}
});
return appearanceComposite;
@@ -1221,8 +1037,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
// });
// return composite;
// }
- private String[][] createAnnotationTypeListModel(
- MarkerAnnotationPreferences preferences) {
+ private String[][] createAnnotationTypeListModel(MarkerAnnotationPreferences preferences) {
ArrayList listModelItems = new ArrayList();
SortedSet sortedPreferences = new TreeSet(new Comparator() {
/*
@@ -1235,16 +1050,17 @@ public class JavaEditorPreferencePage extends PreferencePage implements
return 1;
AnnotationPreference a1 = (AnnotationPreference) o1;
AnnotationPreference a2 = (AnnotationPreference) o2;
- return Collator.getInstance().compare(a1.getPreferenceLabel(),
- a2.getPreferenceLabel());
+ 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(),
+ listModelItems.add(new String[] {
+ info.getPreferenceLabel(),
+ info.getColorPreferenceKey(),
+ info.getTextPreferenceKey(),
info.getOverviewRulerPreferenceKey(),
info.getHighlightPreferenceKey(),
info.getVerticalRulerPreferenceKey(),
@@ -1261,81 +1077,88 @@ public class JavaEditorPreferencePage extends PreferencePage implements
layout.numColumns = 1;
composite.setLayout(layout);
String label;
-// label = PreferencesMessages
-// .getString("JavaEditorPreferencePage.overwriteMode");
-// //$NON-NLS-1$
-// addCheckBox(composite, label,
-// PreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE, 1);
-// addFiller(composite);
-//
-// label = PreferencesMessages
-// .getString("JavaEditorPreferencePage.smartHomeEnd");
-// //$NON-NLS-1$
-// addCheckBox(composite, label, PreferenceConstants.EDITOR_SMART_HOME_END, 1);
-//
-// label = PreferencesMessages
-// .getString("JavaEditorPreferencePage.subWordNavigation");
-// //$NON-NLS-1$
-// addCheckBox(composite, label,
-// PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION, 1);
-// addFiller(composite);
+ // label = PreferencesMessages
+ // .getString("JavaEditorPreferencePage.overwriteMode");
+ // //$NON-NLS-1$
+ // addCheckBox(composite, label,
+ // PreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE, 1);
+ // addFiller(composite);
+ //
+ // label = PreferencesMessages
+ // .getString("JavaEditorPreferencePage.smartHomeEnd");
+ // //$NON-NLS-1$
+ // addCheckBox(composite, label, PreferenceConstants.EDITOR_SMART_HOME_END, 1);
+ //
+ // label = PreferencesMessages
+ // .getString("JavaEditorPreferencePage.subWordNavigation");
+ // //$NON-NLS-1$
+ // addCheckBox(composite, label,
+ // PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION, 1);
+ // addFiller(composite);
Group group = new Group(composite, SWT.NONE);
layout = new GridLayout();
layout.numColumns = 2;
group.setLayout(layout);
- group.setText(PreferencesMessages
- .getString("JavaEditorPreferencePage.typing.description")); //$NON-NLS-1$
+ group.setText(PreferencesMessages.getString("JavaEditorPreferencePage.typing.description")); //$NON-NLS-1$
- label = PreferencesMessages
- .getString("JavaEditorPreferencePage.wrapStrings");
- //$NON-NLS-1$
- Button button = addCheckBox(group, label,
- PreferenceConstants.EDITOR_WRAP_STRINGS, 1);
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.wrapWords");//$NON-NLS-1$
+ addCheckBox(group, label, PreferenceConstants.EDITOR_WRAP_WORDS, 1);
+
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.wrapStringsDQ");//$NON-NLS-1$
+ Button button = addCheckBox(group, label, PreferenceConstants.EDITOR_WRAP_STRINGS_DQ, 1);
- label = PreferencesMessages
- .getString("JavaEditorPreferencePage.escapeStrings");
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.escapeStringsDQ");//$NON-NLS-1$
+ fEscapeStringsButtonDQ = addCheckBox(group, label, PreferenceConstants.EDITOR_ESCAPE_STRINGS_DQ, 1);
+ createDependency(button, fEscapeStringsButtonDQ);
+
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.wrapStringsSQ");//$NON-NLS-1$
+ addCheckBox(group, label, PreferenceConstants.EDITOR_WRAP_STRINGS_SQ, 1);
+
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.escapeStringsSQ");
//$NON-NLS-1$
- fEscapeStringsButton = addCheckBox(group, label,
- PreferenceConstants.EDITOR_ESCAPE_STRINGS, 1);
- createDependency(button, fEscapeStringsButton);
+ fEscapeStringsButtonSQ = addCheckBox(group, label, PreferenceConstants.EDITOR_ESCAPE_STRINGS_SQ, 1);
+ createDependency(button, fEscapeStringsButtonSQ);
- label = PreferencesMessages
- .getString("JavaEditorPreferencePage.smartPaste");
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.smartPaste");
//$NON-NLS-1$
addCheckBox(group, label, PreferenceConstants.EDITOR_SMART_PASTE, 1);
- label = PreferencesMessages
- .getString("JavaEditorPreferencePage.insertSpaceForTabs");
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.insertSpaceForTabs");
//$NON-NLS-1$
addCheckBox(group, label, PreferenceConstants.EDITOR_SPACES_FOR_TABS, 1);
- label = PreferencesMessages
- .getString("JavaEditorPreferencePage.closeStrings");
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.closeStringsDQ");
+ //$NON-NLS-1$
+ addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_STRINGS_DQ_PHP, 1);
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.closeStringsSQ");
//$NON-NLS-1$
- addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_STRINGS_PHP, 1);
+ addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_STRINGS_SQ_PHP, 1);
- label = PreferencesMessages
- .getString("JavaEditorPreferencePage.closeBrackets");
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.closeBrackets");
//$NON-NLS-1$
addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_BRACKETS_PHP, 1);
-// label = PreferencesMessages
-// .getString("JavaEditorPreferencePage.closeBraces");
-// //$NON-NLS-1$
-// addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_BRACES, 1);
-
-// label = PreferencesMessages
-// .getString("JavaEditorPreferencePage.closeJavaDocs");
-// //$NON-NLS-1$
-// button = addCheckBox(group, label,
-// PreferenceConstants.EDITOR_CLOSE_JAVADOCS, 1);
-//
-// label = PreferencesMessages
-// .getString("JavaEditorPreferencePage.addJavaDocTags");
-// //$NON-NLS-1$
-// fAddJavaDocTagsButton = addCheckBox(group, label,
-// PreferenceConstants.EDITOR_ADD_JAVADOC_TAGS, 1);
-// createDependency(button, fAddJavaDocTagsButton);
+ // label = PreferencesMessages
+ // .getString("JavaEditorPreferencePage.closeBraces");
+ // //$NON-NLS-1$
+ // addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_BRACES, 1);
+
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.closeJavaDocs");
+ //$NON-NLS-1$
+ button = addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_JAVADOCS, 1);
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.formatJavaDocs");
+ //$NON-NLS-1$
+ button = addCheckBox(group, label, PreferenceConstants.EDITOR_FORMAT_JAVADOCS, 1);
+
+ label = PreferencesMessages.getString("JavaEditorPreferencePage.p_rtrim_on_save");
+ addCheckBox(group, label, PreferenceConstants.EDITOR_P_RTRIM_ON_SAVE, 1);
+ //
+ // label = PreferencesMessages
+ // .getString("JavaEditorPreferencePage.addJavaDocTags");
+ // //$NON-NLS-1$
+ // fAddJavaDocTagsButton = addCheckBox(group, label,
+ // PreferenceConstants.EDITOR_ADD_JAVADOC_TAGS, 1);
+ // createDependency(button, fAddJavaDocTagsButton);
return composite;
}
@@ -1366,8 +1189,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
}
private void addCompletionRadioButtons(Composite contentAssistComposite) {
- Composite completionComposite = new Composite(contentAssistComposite,
- SWT.NONE);
+ Composite completionComposite = new Composite(contentAssistComposite, SWT.NONE);
GridData ccgd = new GridData();
ccgd.horizontalSpan = 2;
completionComposite.setLayoutData(ccgd);
@@ -1403,130 +1225,116 @@ public class JavaEditorPreferencePage extends PreferencePage implements
GridLayout layout = new GridLayout();
layout.numColumns = 2;
composite.setLayout(layout);
- // String text=
- // PreferencesMessages.getString("JavaEditorPreferencePage.navigation.browserLikeLinks");
- // //$NON-NLS-1$
- // fBrowserLikeLinksCheckBox= addCheckBox(composite, text,
- // PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS, 0);
- // fBrowserLikeLinksCheckBox.addSelectionListener(new SelectionListener() {
- // public void widgetSelected(SelectionEvent e) {
- // boolean state= fBrowserLikeLinksCheckBox.getSelection();
- // fBrowserLikeLinksKeyModifierText.setEnabled(state);
- // handleBrowserLikeLinksKeyModifierModified();
- // }
- // public void widgetDefaultSelected(SelectionEvent e) {
- // }
- // });
- // Text field for modifier string
- // text=
- // PreferencesMessages.getString("JavaEditorPreferencePage.navigation.browserLikeLinksKeyModifier");
- // //$NON-NLS-1$
- // fBrowserLikeLinksKeyModifierText= addTextField(composite, text,
- // PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER, 20, 0,
- // false);
- // fBrowserLikeLinksKeyModifierText.setTextLimit(Text.LIMIT);
- //
- // if
- // (computeStateMask(fOverlayStore.getString(PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER))
- // == -1) {
- // // Fix possible illegal modifier string
- // int stateMask=
- // fOverlayStore.getInt(PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER_MASK);
- // if (stateMask == -1)
- // fBrowserLikeLinksKeyModifierText.setText(""); //$NON-NLS-1$
- // else
- // fBrowserLikeLinksKeyModifierText.setText(EditorUtility.getModifierString(stateMask));
- // }
- // fBrowserLikeLinksKeyModifierText.addKeyListener(new KeyListener() {
- // private boolean isModifierCandidate;
- // public void keyPressed(KeyEvent e) {
- // isModifierCandidate= e.keyCode > 0 && e.character == 0 && e.stateMask ==
- // 0;
- // }
- //
- // public void keyReleased(KeyEvent e) {
- // if (isModifierCandidate && e.stateMask > 0 && e.stateMask == e.stateMask
- // && e.character == 0) {// && e.time -time < 1000) {
- // String modifierString= fBrowserLikeLinksKeyModifierText.getText();
- // Point selection= fBrowserLikeLinksKeyModifierText.getSelection();
- // int i= selection.x - 1;
- // while (i > -1 && Character.isWhitespace(modifierString.charAt(i))) {
- // i--;
- // }
- // boolean needsPrefixDelimiter= i > -1 &&
- // !String.valueOf(modifierString.charAt(i)).equals(DELIMITER);
- //
- // i= selection.y;
- // while (i < modifierString.length() &&
- // Character.isWhitespace(modifierString.charAt(i))) {
- // i++;
- // }
- // boolean needsPostfixDelimiter= i < modifierString.length() &&
- // !String.valueOf(modifierString.charAt(i)).equals(DELIMITER);
- //
- // String insertString;
- //
- // if (needsPrefixDelimiter && needsPostfixDelimiter)
- // insertString=
- // PreferencesMessages.getFormattedString("JavaEditorPreferencePage.navigation.insertDelimiterAndModifierAndDelimiter",
- // new String[] {Action.findModifierString(e.stateMask)}); //$NON-NLS-1$
- // else if (needsPrefixDelimiter)
- // insertString=
- // PreferencesMessages.getFormattedString("JavaEditorPreferencePage.navigation.insertDelimiterAndModifier",
- // new String[] {Action.findModifierString(e.stateMask)}); //$NON-NLS-1$
- // else if (needsPostfixDelimiter)
- // insertString=
- // PreferencesMessages.getFormattedString("JavaEditorPreferencePage.navigation.insertModifierAndDelimiter",
- // new String[] {Action.findModifierString(e.stateMask)}); //$NON-NLS-1$
- // else
- // insertString= Action.findModifierString(e.stateMask);
- //
- // fBrowserLikeLinksKeyModifierText.insert(insertString);
- // }
- // }
- // });
- //
- // fBrowserLikeLinksKeyModifierText.addModifyListener(new ModifyListener()
- // {
- // public void modifyText(ModifyEvent e) {
- // handleBrowserLikeLinksKeyModifierModified();
- // }
- // });
+ String text = PreferencesMessages.getString("JavaEditorPreferencePage.navigation.browserLikeLinks");
+ //$NON-NLS-1$
+ fBrowserLikeLinksCheckBox = addCheckBox(composite, text, PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS, 0);
+ fBrowserLikeLinksCheckBox.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ boolean state = fBrowserLikeLinksCheckBox.getSelection();
+ fBrowserLikeLinksKeyModifierText.setEnabled(state);
+ handleBrowserLikeLinksKeyModifierModified();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ // Text field for modifier string
+ text = PreferencesMessages.getString("JavaEditorPreferencePage.navigation.browserLikeLinksKeyModifier");
+ //$NON-NLS-1$
+ fBrowserLikeLinksKeyModifierText = addTextField(composite, text, PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER,
+ 20, 0, false);
+ fBrowserLikeLinksKeyModifierText.setTextLimit(Text.LIMIT);
+
+ if (computeStateMask(fOverlayStore.getString(PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER)) == -1) {
+ // Fix possible illegal modifier string
+ int stateMask = fOverlayStore.getInt(PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER_MASK);
+ if (stateMask == -1)
+ fBrowserLikeLinksKeyModifierText.setText(""); //$NON-NLS-1$
+ else
+ fBrowserLikeLinksKeyModifierText.setText(EditorUtility.getModifierString(stateMask));
+ }
+ fBrowserLikeLinksKeyModifierText.addKeyListener(new KeyListener() {
+ private boolean isModifierCandidate;
+
+ public void keyPressed(KeyEvent e) {
+ isModifierCandidate = e.keyCode > 0 && e.character == 0 && e.stateMask == 0;
+ }
+
+ public void keyReleased(KeyEvent e) {
+ if (isModifierCandidate && e.stateMask > 0 && e.stateMask == e.stateMask && e.character == 0) {// && e.time -time < 1000) {
+ String modifierString = fBrowserLikeLinksKeyModifierText.getText();
+ Point selection = fBrowserLikeLinksKeyModifierText.getSelection();
+ int i = selection.x - 1;
+ while (i > -1 && Character.isWhitespace(modifierString.charAt(i))) {
+ i--;
+ }
+ boolean needsPrefixDelimiter = i > -1 && !String.valueOf(modifierString.charAt(i)).equals(DELIMITER);
+
+ i = selection.y;
+ while (i < modifierString.length() && Character.isWhitespace(modifierString.charAt(i))) {
+ i++;
+ }
+ boolean needsPostfixDelimiter = i < modifierString.length()
+ && !String.valueOf(modifierString.charAt(i)).equals(DELIMITER);
+
+ String insertString;
+
+ if (needsPrefixDelimiter && needsPostfixDelimiter)
+ insertString = PreferencesMessages.getFormattedString(
+ "JavaEditorPreferencePage.navigation.insertDelimiterAndModifierAndDelimiter", new String[] { Action
+ .findModifierString(e.stateMask) }); //$NON-NLS-1$
+ else if (needsPrefixDelimiter)
+ insertString = PreferencesMessages.getFormattedString("JavaEditorPreferencePage.navigation.insertDelimiterAndModifier",
+ new String[] { Action.findModifierString(e.stateMask) }); //$NON-NLS-1$
+ else if (needsPostfixDelimiter)
+ insertString = PreferencesMessages.getFormattedString("JavaEditorPreferencePage.navigation.insertModifierAndDelimiter",
+ new String[] { Action.findModifierString(e.stateMask) }); //$NON-NLS-1$
+ else
+ insertString = Action.findModifierString(e.stateMask);
+
+ fBrowserLikeLinksKeyModifierText.insert(insertString);
+ }
+ }
+ });
+
+ fBrowserLikeLinksKeyModifierText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ handleBrowserLikeLinksKeyModifierModified();
+ }
+ });
return composite;
}
private void handleBrowserLikeLinksKeyModifierModified() {
- // String modifiers= fBrowserLikeLinksKeyModifierText.getText();
- // int stateMask= computeStateMask(modifiers);
- // if (fBrowserLikeLinksCheckBox.getSelection() && (stateMask == -1 ||
- // (stateMask & SWT.SHIFT) != 0)) {
- // if (stateMask == -1)
- // fBrowserLikeLinksKeyModifierStatus= new StatusInfo(IStatus.ERROR,
- // PreferencesMessages.getFormattedString("JavaEditorPreferencePage.navigation.modifierIsNotValid",
- // modifiers)); //$NON-NLS-1$
- // else
- // fBrowserLikeLinksKeyModifierStatus= new StatusInfo(IStatus.ERROR,
- // PreferencesMessages.getString("JavaEditorPreferencePage.navigation.shiftIsDisabled"));
- // //$NON-NLS-1$
- // setValid(false);
- // StatusUtil.applyToStatusLine(this, fBrowserLikeLinksKeyModifierStatus);
- // } else {
- // fBrowserLikeLinksKeyModifierStatus= new StatusInfo();
- // updateStatus(fBrowserLikeLinksKeyModifierStatus);
- // }
+ String modifiers = fBrowserLikeLinksKeyModifierText.getText();
+ int stateMask = computeStateMask(modifiers);
+ if (fBrowserLikeLinksCheckBox.getSelection() && (stateMask == -1 || (stateMask & SWT.SHIFT) != 0)) {
+ if (stateMask == -1)
+ fBrowserLikeLinksKeyModifierStatus = new StatusInfo(IStatus.ERROR, PreferencesMessages.getFormattedString(
+ "JavaEditorPreferencePage.navigation.modifierIsNotValid", modifiers)); //$NON-NLS-1$
+ else
+ fBrowserLikeLinksKeyModifierStatus = new StatusInfo(IStatus.ERROR, PreferencesMessages
+ .getString("JavaEditorPreferencePage.navigation.shiftIsDisabled"));
+ //$NON-NLS-1$
+ setValid(false);
+ StatusUtil.applyToStatusLine(this, fBrowserLikeLinksKeyModifierStatus);
+ } else {
+ fBrowserLikeLinksKeyModifierStatus = new StatusInfo();
+ updateStatus(fBrowserLikeLinksKeyModifierStatus);
+ }
+ }
+
+ 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
- * '.'
+ * the string with the modifiers, separated by '+', '-', ';', ',' or '.'
* @return the state mask or -1 if the input is invalid
*/
private int computeStateMask(String modifiers) {
@@ -1535,11 +1343,9 @@ public class JavaEditorPreferencePage extends PreferencePage implements
if (modifiers.length() == 0)
return SWT.NONE;
int stateMask = 0;
- StringTokenizer modifierTokenizer = new StringTokenizer(modifiers,
- ",;.:+-* "); //$NON-NLS-1$
+ StringTokenizer modifierTokenizer = new StringTokenizer(modifiers, ",;.:+-* "); //$NON-NLS-1$
while (modifierTokenizer.hasMoreTokens()) {
- int modifier = EditorUtility.findLocalizedModifier(modifierTokenizer
- .nextToken());
+ int modifier = EditorUtility.findLocalizedModifier(modifierTokenizer.nextToken());
if (modifier == 0 || (stateMask & modifier) == modifier)
return -1;
stateMask = stateMask | modifier;
@@ -1559,12 +1365,10 @@ public class JavaEditorPreferencePage extends PreferencePage implements
folder.setLayout(new TabFolderLayout());
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
TabItem item = new TabItem(folder, SWT.NONE);
- item.setText(PreferencesMessages
- .getString("JavaEditorPreferencePage.general")); //$NON-NLS-1$
+ item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.general")); //$NON-NLS-1$
item.setControl(createAppearancePage(folder));
item = new TabItem(folder, SWT.NONE);
- item.setText(PreferencesMessages
- .getString("JavaEditorPreferencePage.colors")); //$NON-NLS-1$
+ item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.colors")); //$NON-NLS-1$
item.setControl(createSyntaxPage(folder));
// item = new TabItem(folder, SWT.NONE);
@@ -1573,25 +1377,21 @@ public class JavaEditorPreferencePage extends PreferencePage implements
// //$NON-NLS-1$
// item.setControl(createAnnotationsPage(folder));
item = new TabItem(folder, SWT.NONE);
- item.setText(PreferencesMessages
- .getString("JavaEditorPreferencePage.typing.tabTitle"));
+ item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.typing.tabTitle"));
//$NON-NLS-1$
item.setControl(createTypingPage(folder));
item = new TabItem(folder, SWT.NONE);
- item.setText(PreferencesMessages
- .getString("JavaEditorPreferencePage.hoverTab.title"));
+ item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.hoverTab.title"));
//$NON-NLS-1$
- fJavaEditorHoverConfigurationBlock = new JavaEditorHoverConfigurationBlock(
- this, fOverlayStore);
+ fJavaEditorHoverConfigurationBlock = new JavaEditorHoverConfigurationBlock(this, fOverlayStore);
item.setControl(fJavaEditorHoverConfigurationBlock.createControl(folder));
- // item= new TabItem(folder, SWT.NONE);
- // item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.navigationTab.title"));
+ item = new TabItem(folder, SWT.NONE);
+ item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.navigationTab.title"));
// //$NON-NLS-1$
- // item.setControl(createNavigationPage(folder));
+ item.setControl(createNavigationPage(folder));
item = new TabItem(folder, SWT.NONE);
- item.setText(PreferencesMessages
- .getString("JavaEditorPreferencePage.folding.title")); //$NON-NLS-1$
+ item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.folding.title")); //$NON-NLS-1$
item.setControl(fFoldingConfigurationBlock.createControl(folder));
initialize();
@@ -1665,19 +1465,16 @@ public class JavaEditorPreferencePage extends PreferencePage implements
String key = (String) fTextFields.get(t);
t.setText(fOverlayStore.getString(key));
}
- RGB rgb = PreferenceConverter.getColor(fOverlayStore,
- PreferenceConstants.EDITOR_BACKGROUND_COLOR);
+ RGB rgb = PreferenceConverter.getColor(fOverlayStore, PreferenceConstants.EDITOR_BACKGROUND_COLOR);
fBackgroundColorEditor.setColorValue(rgb);
- boolean default_ = fOverlayStore
- .getBoolean(PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR);
+ boolean default_ = fOverlayStore.getBoolean(PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR);
fBackgroundDefaultRadioButton.setSelection(default_);
fBackgroundCustomRadioButton.setSelection(!default_);
fBackgroundColorButton.setEnabled(!default_);
-// boolean closeJavaDocs = fOverlayStore
-// .getBoolean(PreferenceConstants.EDITOR_CLOSE_JAVADOCS);
-// fAddJavaDocTagsButton.setEnabled(closeJavaDocs);
- fEscapeStringsButton.setEnabled(fOverlayStore
- .getBoolean(PreferenceConstants.EDITOR_WRAP_STRINGS));
+ boolean closeJavaDocs = fOverlayStore.getBoolean(PreferenceConstants.EDITOR_CLOSE_JAVADOCS);
+ // fAddJavaDocTagsButton.setEnabled(closeJavaDocs);
+ fEscapeStringsButtonDQ.setEnabled(fOverlayStore.getBoolean(PreferenceConstants.EDITOR_WRAP_STRINGS_DQ));
+ fEscapeStringsButtonSQ.setEnabled(fOverlayStore.getBoolean(PreferenceConstants.EDITOR_WRAP_STRINGS_SQ));
// boolean fillMethodArguments=
// fOverlayStore.getBoolean(PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES);
// fGuessMethodArgumentsButton.setEnabled(fillMethodArguments);
@@ -1686,7 +1483,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
// fCompletionInsertsRadioButton.setSelection(completionInserts);
// fCompletionOverwritesRadioButton.setSelection(! completionInserts);
//
- // fBrowserLikeLinksKeyModifierText.setEnabled(fBrowserLikeLinksCheckBox.getSelection());
+ fBrowserLikeLinksKeyModifierText.setEnabled(fBrowserLikeLinksCheckBox.getSelection());
// boolean markOccurrences=
// fOverlayStore.getBoolean(PreferenceConstants.EDITOR_MARK_OCCURRENCES);
// fStickyOccurrencesButton.setEnabled(markOccurrences);
@@ -1694,23 +1491,15 @@ public class JavaEditorPreferencePage extends PreferencePage implements
}
private void initializeDefaultColors() {
- if (!getPreferenceStore().contains(
- PreferenceConstants.EDITOR_BACKGROUND_COLOR)) {
- RGB rgb = getControl().getDisplay().getSystemColor(
- SWT.COLOR_LIST_BACKGROUND).getRGB();
- PreferenceConverter.setDefault(fOverlayStore,
- PreferenceConstants.EDITOR_BACKGROUND_COLOR, rgb);
- PreferenceConverter.setDefault(getPreferenceStore(),
- PreferenceConstants.EDITOR_BACKGROUND_COLOR, rgb);
+ if (!getPreferenceStore().contains(PreferenceConstants.EDITOR_BACKGROUND_COLOR)) {
+ RGB rgb = getControl().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB();
+ PreferenceConverter.setDefault(fOverlayStore, PreferenceConstants.EDITOR_BACKGROUND_COLOR, rgb);
+ PreferenceConverter.setDefault(getPreferenceStore(), PreferenceConstants.EDITOR_BACKGROUND_COLOR, rgb);
}
- if (!getPreferenceStore().contains(
- PreferenceConstants.EDITOR_FOREGROUND_COLOR)) {
- RGB rgb = getControl().getDisplay().getSystemColor(
- SWT.COLOR_LIST_FOREGROUND).getRGB();
- PreferenceConverter.setDefault(fOverlayStore,
- PreferenceConstants.EDITOR_FOREGROUND_COLOR, rgb);
- PreferenceConverter.setDefault(getPreferenceStore(),
- PreferenceConstants.EDITOR_FOREGROUND_COLOR, rgb);
+ if (!getPreferenceStore().contains(PreferenceConstants.EDITOR_FOREGROUND_COLOR)) {
+ RGB rgb = getControl().getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND).getRGB();
+ PreferenceConverter.setDefault(fOverlayStore, PreferenceConstants.EDITOR_FOREGROUND_COLOR, rgb);
+ PreferenceConverter.setDefault(getPreferenceStore(), PreferenceConstants.EDITOR_FOREGROUND_COLOR, rgb);
}
}
@@ -1732,8 +1521,8 @@ public class JavaEditorPreferencePage extends PreferencePage implements
public boolean performOk() {
// fJavaEditorHoverConfigurationBlock.performOk();
fFoldingConfigurationBlock.performOk();
- // fOverlayStore.setValue(PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER_MASK,
- // computeStateMask(fBrowserLikeLinksKeyModifierText.getText()));
+ fOverlayStore.setValue(PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER_MASK,
+ computeStateMask(fBrowserLikeLinksKeyModifierText.getText()));
fOverlayStore.propagate();
PHPeclipsePlugin.getDefault().savePluginPreferences();
return true;
@@ -1774,8 +1563,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
super.dispose();
}
- private Button addCheckBox(Composite parent, String label, String key,
- int indentation) {
+ private Button addCheckBox(Composite parent, String label, String key, int indentation) {
Button checkBox = new Button(parent, SWT.CHECK);
checkBox.setText(label);
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
@@ -1787,10 +1575,8 @@ public class JavaEditorPreferencePage extends PreferencePage implements
return checkBox;
}
- private Text addTextField(Composite composite, String label, String key,
- int textLimit, int indentation, boolean isNumber) {
- return getTextControl(addLabelledTextField(composite, label, key,
- textLimit, indentation, isNumber));
+ private Text addTextField(Composite composite, String label, String key, int textLimit, int indentation, boolean isNumber) {
+ return getTextControl(addLabelledTextField(composite, label, key, textLimit, indentation, isNumber));
}
private static Label getLabelControl(Control[] labelledTextField) {
@@ -1802,13 +1588,11 @@ public class JavaEditorPreferencePage extends PreferencePage implements
}
/**
- * Returns an array of size 2: - first element is of type Label
-
- * second element is of type Text
Use
- * getLabelControl
and getTextControl
to get the
- * 2 controls.
+ * Returns an array of size 2: - first element is of type Label
- second element is of type Text
Use
+ * getLabelControl
and getTextControl
to get the 2 controls.
*/
- private Control[] addLabelledTextField(Composite composite, String label,
- String key, int textLimit, int indentation, boolean isNumber) {
+ private Control[] addLabelledTextField(Composite composite, String label, String key, int textLimit, int indentation,
+ boolean isNumber) {
Label labelControl = new Label(composite, SWT.NONE);
labelControl.setText(label);
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
@@ -1835,8 +1619,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
StringBuffer buffer = new StringBuffer(512);
BufferedReader reader = null;
try {
- reader = new BufferedReader(new InputStreamReader(getClass()
- .getResourceAsStream(filename)));
+ reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
while ((line = reader.readLine()) != null) {
buffer.append(line);
buffer.append(separator);
@@ -1865,17 +1648,14 @@ public class JavaEditorPreferencePage extends PreferencePage implements
private IStatus validatePositiveNumber(String number) {
StatusInfo status = new StatusInfo();
if (number.length() == 0) {
- status.setError(PreferencesMessages
- .getString("JavaEditorPreferencePage.empty_input")); //$NON-NLS-1$
+ status.setError(PreferencesMessages.getString("JavaEditorPreferencePage.empty_input")); //$NON-NLS-1$
} else {
try {
int value = Integer.parseInt(number);
if (value < 0)
- status.setError(PreferencesMessages.getFormattedString(
- "JavaEditorPreferencePage.invalid_input", number)); //$NON-NLS-1$
+ status.setError(PreferencesMessages.getFormattedString("JavaEditorPreferencePage.invalid_input", number)); //$NON-NLS-1$
} catch (NumberFormatException e) {
- status.setError(PreferencesMessages.getFormattedString(
- "JavaEditorPreferencePage.invalid_input", number)); //$NON-NLS-1$
+ status.setError(PreferencesMessages.getFormattedString("JavaEditorPreferencePage.invalid_input", number)); //$NON-NLS-1$
}
}
return status;