Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2016-02-21 09:23:47 +0000
committerAndrey Loskutov2016-02-22 16:03:50 +0000
commit7ac23aba2856a9f56d61046e76b61f51fbbc1f56 (patch)
treede2d00f2230622c836a5b5d18d100975a25c289a /org.eclipse.ui.editors
parente462c416ddf66bbf893a0f0364be8f88a28963a4 (diff)
downloadeclipse.platform.text-7ac23aba2856a9f56d61046e76b61f51fbbc1f56.tar.gz
eclipse.platform.text-7ac23aba2856a9f56d61046e76b61f51fbbc1f56.tar.xz
eclipse.platform.text-7ac23aba2856a9f56d61046e76b61f51fbbc1f56.zip
Bug 488162 - [word wrap] Hide WW preference to avoid unexpectedI20160223-0800
performance impact Hide "Preferences->General->Editors->Text Editors->Enable word wrap when opening an editor" by default, unless the system property "eclipse.show.wrapByDefaultPreference" is set to "true". Users should not be able to persist this preference which can cause not acceptable editor performance slowdown while resizing/zooming. Change-Id: I459593edd731e3f6bb6f597583f5791f229a5cd9 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.ui.editors')
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java
index ad2fae6dc..3f878686f 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -819,9 +819,11 @@ public class TextEditorDefaultsPreferencePage extends PreferencePage implements
IntegerDomain tabWidthDomain= new IntegerDomain(1, 16);
addTextField(appearanceComposite, tabWidth, tabWidthDomain, 15, 0);
- label= TextEditorMessages.TextEditorPreferencePage_enableWordWrap;
- Preference enableWordWrap= new Preference(AbstractTextEditor.PREFERENCE_WORD_WRAP_ENABLED, label, null);
- addCheckBox(appearanceComposite, enableWordWrap, new BooleanDomain(), 0);
+ if(isWordWrapPreferenceAllowed()){
+ label= TextEditorMessages.TextEditorPreferencePage_enableWordWrap;
+ Preference enableWordWrap= new Preference(AbstractTextEditor.PREFERENCE_WORD_WRAP_ENABLED, label, null);
+ addCheckBox(appearanceComposite, enableWordWrap, new BooleanDomain(), 0);
+ }
label= TextEditorMessages.TextEditorPreferencePage_convertTabsToSpaces;
Preference spacesForTabs= new Preference(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SPACES_FOR_TABS, label, null);
@@ -1011,6 +1013,10 @@ public class TextEditorDefaultsPreferencePage extends PreferencePage implements
return appearanceComposite;
}
+ private boolean isWordWrapPreferenceAllowed() {
+ return Boolean.getBoolean("eclipse.show.wrapByDefaultPreference"); //$NON-NLS-1$
+ }
+
@Override
protected Control createContents(Composite parent) {

Back to the top