Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.ui.editors')
-rw-r--r--org.eclipse.ui.editors/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.ui.editors/pom.xml4
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java9
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java3
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties3
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java10
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditorPreferenceConstants.java16
7 files changed, 37 insertions, 10 deletions
diff --git a/org.eclipse.ui.editors/META-INF/MANIFEST.MF b/org.eclipse.ui.editors/META-INF/MANIFEST.MF
index c3821be4c..ff421860f 100644
--- a/org.eclipse.ui.editors/META-INF/MANIFEST.MF
+++ b/org.eclipse.ui.editors/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ui.editors; singleton:=true
-Bundle-Version: 3.12.0.qualifier
+Bundle-Version: 3.13.0.qualifier
Bundle-Activator: org.eclipse.ui.internal.editors.text.EditorsPlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
diff --git a/org.eclipse.ui.editors/pom.xml b/org.eclipse.ui.editors/pom.xml
index 0a9f23b13..7bb1058f8 100644
--- a/org.eclipse.ui.editors/pom.xml
+++ b/org.eclipse.ui.editors/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2015 Eclipse Foundation and others.
+ Copyright (c) 2012, 2019 Eclipse Foundation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
@@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.ui</groupId>
<artifactId>org.eclipse.ui.editors</artifactId>
- <version>3.12.0-SNAPSHOT</version>
+ <version>3.13.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
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 fc766ccd0..47c22c621 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, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -732,6 +732,7 @@ public class TextEditorDefaultsPreferencePage extends PreferencePage implements
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractTextEditor.PREFERENCE_WORD_WRAP_ENABLED));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SPACES_FOR_TABS));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_DELETE_SPACES_AS_TABS));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN));
@@ -854,8 +855,12 @@ public class TextEditorDefaultsPreferencePage extends PreferencePage implements
label= TextEditorMessages.TextEditorPreferencePage_convertTabsToSpaces;
Preference spacesForTabs= new Preference(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SPACES_FOR_TABS, label, null);
- addCheckBox(appearanceComposite, spacesForTabs, new BooleanDomain(), 0);
+ final Button spacesForTabsButton= addCheckBox(appearanceComposite, spacesForTabs, new BooleanDomain(), 0);
+ label= TextEditorMessages.TextEditorDefaultsPreferencePage_deleteSpacesAsTabs;
+ Preference deleteSpacesAsTabs= new Preference(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_DELETE_SPACES_AS_TABS, label, null);
+ final Button deleteSpacesAsTabsButton= addCheckBox(appearanceComposite, deleteSpacesAsTabs, new BooleanDomain(), 0);
+ createDependency(spacesForTabsButton, spacesForTabs, new Control[] { deleteSpacesAsTabsButton });
label= TextEditorMessages.TextEditorPreferencePage_highlightCurrentLine;
Preference highlightCurrentLine= new Preference(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE, label, null);
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java
index 12568d9e9..93e6ea4c5 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -138,6 +138,7 @@ final class TextEditorMessages extends NLS {
public static String TextEditorDefaultsPreferencePage_carriageReturn;
public static String TextEditorDefaultsPreferencePage_transparencyLevel;
public static String TextEditorDefaultsPreferencePage_configureWhitespaceCharacterPainterProperties;
+ public static String TextEditorDefaultsPreferencePage_deleteSpacesAsTabs;
public static String TextEditorDefaultsPreferencePage_enclosed;
public static String TextEditorDefaultsPreferencePage_enrichHoverMode;
public static String TextEditorDefaultsPreferencePage_enrichHover_immediately;
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 a770961b5..a316d2436 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
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2018 IBM Corporation and others.
+# Copyright (c) 2000, 2019 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -40,6 +40,7 @@ TextEditorPreferencePage_accessibility_useSaturatedColorsInOverviewRuler=U&se sa
TextEditorDefaultsPreferencePage_carriageReturn=Carriage Return ( \u00a4 )
TextEditorDefaultsPreferencePage_transparencyLevel=&Transparency level (0 is transparent and 255 is opaque):
TextEditorDefaultsPreferencePage_configureWhitespaceCharacterPainterProperties=Configure visibility of whitespace characters in different regions of a line of text:
+TextEditorDefaultsPreferencePage_deleteSpacesAsTabs=Remove &multiple spaces on backspace/delete
TextEditorDefaultsPreferencePage_enclosed=Enclosed
TextEditorDefaultsPreferencePage_enrichHoverMode=When mouse mo&ved into hover:
TextEditorDefaultsPreferencePage_enrichHover_afterDelay=Enrich after delay
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
index 76e411f0c..7e884ee21 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -854,7 +854,8 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
return;
}
- if (AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SPACES_FOR_TABS.equals(property)) {
+ if (AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SPACES_FOR_TABS.equals(property)
+ || AbstractDecoratedTextEditorPreferenceConstants.EDITOR_DELETE_SPACES_AS_TABS.equals(property)) {
if (isTabsToSpacesConversionEnabled())
installTabsToSpacesConverter();
else
@@ -2232,4 +2233,9 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
protected boolean isTabsToSpacesConversionEnabled() {
return getPreferenceStore() != null && getPreferenceStore().getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SPACES_FOR_TABS);
}
+
+ @Override
+ protected boolean isSpacesAsTabsDeletionEnabled() {
+ return getPreferenceStore() != null && getPreferenceStore().getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_DELETE_SPACES_AS_TABS);
+ }
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditorPreferenceConstants.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditorPreferenceConstants.java
index 7f71c18e1..8d4281778 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditorPreferenceConstants.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditorPreferenceConstants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -91,6 +91,19 @@ public class AbstractDecoratedTextEditorPreferenceConstants {
public final static String EDITOR_SPACES_FOR_TABS= "spacesForTabs"; //$NON-NLS-1$
/**
+ * A named preference that specifies if the editor removes multiple spaces on delete/backspace
+ * key as if they were tabs. Only relevant when {@link #EDITOR_SPACES_FOR_TABS} preference is
+ * set to <code>true</code>.
+ * <p>
+ * Value is of type <code>Boolean</code>. If <code>true</code>, the editor removes multiple
+ * spaces.
+ * </p>
+ *
+ * @since 3.13
+ */
+ public final static String EDITOR_DELETE_SPACES_AS_TABS= "removeSpacesAsTabs"; //$NON-NLS-1$
+
+ /**
* A named preference that holds the size of the editor's undo history.
* <p>
* Value is of type <code>int</code>: 0 or positive int value specifying the size of
@@ -706,6 +719,7 @@ public class AbstractDecoratedTextEditorPreferenceConstants {
store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH, 4);
store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SPACES_FOR_TABS, false);
+ store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_DELETE_SPACES_AS_TABS, false);
store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_UNDO_HISTORY_SIZE, 200);

Back to the top