diff options
Diffstat (limited to 'org.eclipse.ui.editors')
3 files changed, 36 insertions, 1 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties index 791596570e5..dccbacde3eb 100644 --- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties +++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties @@ -43,6 +43,8 @@ TextEditorPreferencePage.appearanceOptions=Appearance co&lor options: TextEditorPreferencePage.lineNumberForegroundColor=Line number foreground TextEditorPreferencePage.currentLineHighlighColor=Current line highlight TextEditorPreferencePage.printMarginColor=Print margin +TextEditorPreferencePage.accessibility.disableCustomCarets= Use onl&y standard caret +TextEditorPreferencePage.accessibility.wideCaret= Ena&ble thick caret TextEditorPreferencePage.empty_input=Empty input TextEditorPreferencePage.invalid_input=''{0}'' is not a valid input. diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorPreferencePage2.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorPreferencePage2.java index e08055eaecf..63013183a18 100644 --- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorPreferencePage2.java +++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorPreferencePage2.java @@ -166,6 +166,8 @@ public class TextEditorPreferencePage2 extends PreferencePage implements IWorkbe overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ExtendedTextEditorPreferenceConstants.QUICK_DIFF_ALWAYS_ON)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ExtendedTextEditorPreferenceConstants.QUICK_DIFF_DEFAULT_PROVIDER)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ExtendedTextEditorPreferenceConstants.QUICK_DIFF_CHARACTER_MODE)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ExtendedTextEditorPreferenceConstants.EDITOR_DISABLE_CUSTOM_CARETS)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ExtendedTextEditorPreferenceConstants.EDITOR_WIDE_CARET)); OverlayPreferenceStore.OverlayKey[] keys= new OverlayPreferenceStore.OverlayKey[overlayKeys.size()]; overlayKeys.toArray(keys); @@ -305,6 +307,11 @@ public class TextEditorPreferencePage2 extends PreferencePage implements IWorkbe label= TextEditorMessages.getString("TextEditorPreferencePage.showPrintMargin"); //$NON-NLS-1$ addCheckBox(appearanceComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN, 0); + label= TextEditorMessages.getString("TextEditorPreferencePage.accessibility.disableCustomCarets"); //$NON-NLS-1$ + addCheckBox(appearanceComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_DISABLE_CUSTOM_CARETS, 0); + + label= TextEditorMessages.getString("TextEditorPreferencePage.accessibility.wideCaret"); //$NON-NLS-1$ + addCheckBox(appearanceComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_WIDE_CARET, 0); Label l= new Label(appearanceComposite, SWT.LEFT ); GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ExtendedTextEditorPreferenceConstants.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ExtendedTextEditorPreferenceConstants.java index 2c11b3159f4..e6e19994d31 100644 --- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ExtendedTextEditorPreferenceConstants.java +++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ExtendedTextEditorPreferenceConstants.java @@ -184,7 +184,30 @@ public class ExtendedTextEditorPreferenceConstants { * @since 3.0 */ public static final String QUICK_DIFF_CHARACTER_MODE= "quickdiff.characterMode"; //$NON-NLS-1$ - + + /** + * A named preference that controls whether custom carets are allowed in the + * editor or not. + * <p> + * Value is of type <code>Boolean</code>. If <code>true</code>, only + * the default caret is used in the editor. + * </p> + * + * @since 3.0 + */ + public static final String EDITOR_DISABLE_CUSTOM_CARETS= AbstractTextEditor.PREFERENCE_DISABLE_CUSTOM_CARETS; + + /** + * A named preference that controls whether carets are drawn wide or not. + * <p> + * Value is of type <code>Boolean</code>. If <code>true</code>, the caret is + * twice as wide as the default caret. + * </p> + * + * @since 3.0 + */ + public static final String EDITOR_WIDE_CARET= AbstractTextEditor.PREFERENCE_WIDE_CARET; + /** * Initializes the given preference store with the default values. * @@ -213,6 +236,9 @@ public class ExtendedTextEditorPreferenceConstants { store.setDefault(ExtendedTextEditorPreferenceConstants.EDITOR_UNKNOWN_INDICATION_IN_OVERVIEW_RULER, false); PreferenceConverter.setDefault(store, ExtendedTextEditorPreferenceConstants.EDITOR_UNKNOWN_INDICATION_COLOR, new RGB(0, 0, 0)); + store.setDefault(ExtendedTextEditorPreferenceConstants.EDITOR_DISABLE_CUSTOM_CARETS, false); + store.setDefault(ExtendedTextEditorPreferenceConstants.EDITOR_WIDE_CARET, true); + MarkerAnnotationPreferences.initializeDefaultValues(store); } } |