Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Matela2019-07-06 10:42:30 +0000
committerMickael Istria2019-09-17 09:56:22 +0000
commit5f90916aa35368e9894d559308845c7f5c5d6a23 (patch)
treebb5b657380376356dd8e3509466421f9f4d7f585 /org.eclipse.ui.workbench.texteditor
parent812fe47c98daf733d10a208cfe4717109fdd59f7 (diff)
downloadeclipse.platform.text-5f90916aa35368e9894d559308845c7f5c5d6a23.tar.gz
eclipse.platform.text-5f90916aa35368e9894d559308845c7f5c5d6a23.tar.xz
eclipse.platform.text-5f90916aa35368e9894d559308845c7f5c5d6a23.zip
Bug 483846 - [typing] Spaces only mode: backspace key to remove manyI20190918-0300I20190917-1800
spaces Change-Id: I162b412281bc0028aba4e763a859410d86f34aa6 Signed-off-by: Mateusz Matela <mateusz.matela@gmail.com>
Diffstat (limited to 'org.eclipse.ui.workbench.texteditor')
-rw-r--r--org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.ui.workbench.texteditor/pom.xml2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java17
3 files changed, 19 insertions, 2 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF b/org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF
index d54a2a892f7..d0305f87d1e 100644
--- a/org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF
+++ b/org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ui.workbench.texteditor; singleton:=true
-Bundle-Version: 3.13.100.qualifier
+Bundle-Version: 3.14.0.qualifier
Bundle-Activator: org.eclipse.ui.internal.texteditor.TextEditorPlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
diff --git a/org.eclipse.ui.workbench.texteditor/pom.xml b/org.eclipse.ui.workbench.texteditor/pom.xml
index c8a4c9557f8..21141551320 100644
--- a/org.eclipse.ui.workbench.texteditor/pom.xml
+++ b/org.eclipse.ui.workbench.texteditor/pom.xml
@@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.ui</groupId>
<artifactId>org.eclipse.ui.workbench.texteditor</artifactId>
- <version>3.13.100-SNAPSHOT</version>
+ <version>3.14.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
index b3105d2de16..267c21201e4 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
@@ -7274,6 +7274,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
TabsToSpacesConverter tabToSpacesConverter= new TabsToSpacesConverter();
tabToSpacesConverter.setLineTracker(new DefaultLineTracker());
tabToSpacesConverter.setNumberOfSpacesPerTab(tabWidth);
+ tabToSpacesConverter.setDeleteSpacesAsTab(isSpacesAsTabsDeletionEnabled());
((ITextViewerExtension7)fSourceViewer).setTabsToSpacesConverter(tabToSpacesConverter);
updateIndentPrefixes();
}
@@ -7308,6 +7309,22 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
+ * Tells whether delete and backspace keys should remove multiple spaces as
+ * if they were a tab. Only relevant when
+ * {@link #isTabsToSpacesConversionEnabled()} returns true.
+ *
+ * <p>
+ * Subclasses may override this method.
+ * </p>
+ *
+ * @return <code>true</code> if spaces should be removed as tabs
+ * @since 3.14
+ */
+ protected boolean isSpacesAsTabsDeletionEnabled() {
+ return false;
+ }
+
+ /**
* Updates the source viewer's indent prefixes with
* the values provided by the source viewer configuration.
*

Back to the top