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