Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Gabrisch2020-10-20 16:54:43 +0000
committerChristian Gabrisch2020-10-21 12:31:10 +0000
commit49a5770c15f2cef2d0f10cfc9359312e9f38186b (patch)
treeb36506b6b64f36fed00f7c2dfcfa7ac2033d198b /org.eclipse.debug.ui/ui
parent5c202200d26fa8f0fb07c46d3f92f5e4338b2f32 (diff)
downloadeclipse.platform.debug-49a5770c15f2cef2d0f10cfc9359312e9f38186b.tar.gz
eclipse.platform.debug-49a5770c15f2cef2d0f10cfc9359312e9f38186b.tar.xz
eclipse.platform.debug-49a5770c15f2cef2d0f10cfc9359312e9f38186b.zip
Bug 491853 - Persist Console View "Word Wrap" settingsY20201021-1200I20201021-1800
The "Word Wrap" setting will be persisted in preference store of org.eclipse.ui.console plugin. Additionally, this setting is added to the Debug Console Settings preference page. Change-Id: I13659bf4441b75e0bdf9bdda8456201ec9afa01a Signed-off-by: Christian Gabrisch <eclipse@cgabrisch.de>
Diffstat (limited to 'org.eclipse.debug.ui/ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ConsolePreferencePage.java16
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.properties3
3 files changed, 20 insertions, 2 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ConsolePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ConsolePreferencePage.java
index aec2308b0..9ee4e6119 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ConsolePreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ConsolePreferencePage.java
@@ -82,6 +82,8 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements
private ConsoleIntegerFieldEditor fTabSizeEditor;
private BooleanFieldEditor autoScrollLockEditor;
+ private BooleanFieldEditor2 fWordWrapEditor;
+
private BooleanFieldEditor2 fInterpretControlCharactersEditor;
private BooleanFieldEditor2 fInterpretCrAsControlCharacterEditor;
@@ -149,6 +151,11 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements
autoScrollLockEditor = new BooleanFieldEditor(IConsoleConstants.P_CONSOLE_AUTO_SCROLL_LOCK, DebugPreferencesMessages.ConsolePreferencePage_Show__Console_View_enable_auto_scroll_lock, SWT.NONE, getFieldEditorParent());
addField(autoScrollLockEditor);
+
+ fWordWrapEditor = new BooleanFieldEditor2(IConsoleConstants.P_CONSOLE_WORD_WRAP,
+ DebugPreferencesMessages.ConsolePreferencePage_Enable_Word_Wrap_text, SWT.NONE, getFieldEditorParent());
+ addField(fWordWrapEditor);
+
addField(new BooleanFieldEditor(IDebugPreferenceConstants.CONSOLE_OPEN_ON_OUT, DebugPreferencesMessages.ConsolePreferencePage_Show__Console_View_when_there_is_program_output_3, SWT.NONE, getFieldEditorParent()));
addField(new BooleanFieldEditor(IDebugPreferenceConstants.CONSOLE_OPEN_ON_ERR, DebugPreferencesMessages.ConsolePreferencePage_Show__Console_View_when_there_is_program_error_3, SWT.NONE, getFieldEditorParent()));
@@ -203,6 +210,7 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements
updateAutoScrollLockEditor();
updateBufferSizeEditor();
updateInterpretCrAsControlCharacterEditor();
+ updateWordWrapEditorFromConsolePreferences();
}
/**
@@ -242,6 +250,14 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements
}
/**
+ * Update enablement of word wrapping from Console plugin preference store.
+ */
+ protected void updateWordWrapEditorFromConsolePreferences() {
+ fWordWrapEditor.setPreferenceStore(ConsolePlugin.getDefault().getPreferenceStore());
+ fWordWrapEditor.load();
+ }
+
+ /**
* @see org.eclipse.jface.preference.PreferencePage#performDefaults()
*/
@Override
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java
index 14fa191ee..7310f1cb6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -37,6 +37,7 @@ public class DebugPreferencesMessages extends NLS {
public static String ConsolePreferencePage_13;
public static String ConsolePreferencePage_Interpret_control_characters;
public static String ConsolePreferencePage_Interpret_cr_as_control_character;
+ public static String ConsolePreferencePage_Enable_Word_Wrap_text;
public static String DebugPreferencePage_1;
public static String DebugPreferencePage_2;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.properties
index 2a454274d..45717805a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2019 IBM Corporation and others.
+# Copyright (c) 2000, 2020 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -30,6 +30,7 @@ ConsolePreferencePage_13=Tab width must be between 1 and 100 inclusive.
ConsolePreferencePage_11=Back&ground color:
ConsolePreferencePage_Interpret_control_characters=Interpret ASCII &control characters
ConsolePreferencePage_Interpret_cr_as_control_character=Interpret Carriage &Return (\\r) as control character
+ConsolePreferencePage_Enable_Word_Wrap_text=E&nable word wrap
DebugPreferencePage_1=General Settings for Running and Debugging.
DebugPreferencePage_2=Re&use editor when displaying source code

Back to the top