1 package org.simantics.scl.ui.editor;
3 import org.eclipse.jface.text.DocumentCommand;
4 import org.eclipse.jface.text.IAutoEditStrategy;
5 import org.eclipse.jface.text.IDocument;
7 public class ReplaceTabsBySpaces implements IAutoEditStrategy {
9 public void customizeDocumentCommand(IDocument d, DocumentCommand c) {
10 if (c.length == 0 && c.text != null && c.text.indexOf('\t') >= 0) {
11 c.text = c.text.replace("\t", " "); //$NON-NLS-1$ //$NON-NLS-2$