@Override TextEdit replace(ISelection selection, String replacement) throws BadLocationException { return replace(selection, replacement, false); }
@Override TextEdit backspace(ISelection selection) throws BadLocationException { IBlockTextSelection cts= (IBlockTextSelection)selection; if (isEmpty(selection) && cts.getStartColumn() > 0) { selection= new BlockTextSelection(fDocument, cts.getStartLine(), cts.getStartColumn() - 1, cts.getEndLine(), cts.getEndColumn(), fTabWidth); } return replace(selection, ""); //$NON-NLS-1$ }
@Override TextEdit replace(ISelection selection, String replacement) throws BadLocationException { return replace(selection, replacement, false); }
@Override TextEdit delete(ISelection selection) throws BadLocationException { if (isEmpty(selection)) { IBlockTextSelection cts= (IBlockTextSelection)selection; selection= new BlockTextSelection(fDocument, cts.getStartLine(), cts.getStartColumn(), cts.getEndLine(), cts.getEndColumn() + 1, fTabWidth); } return replace(selection, "", true); //$NON-NLS-1$ }
@Override TextEdit delete(ISelection selection) throws BadLocationException { if (isEmpty(selection)) { IBlockTextSelection cts= (IBlockTextSelection)selection; selection= new BlockTextSelection(fDocument, cts.getStartLine(), cts.getStartColumn(), cts.getEndLine(), cts.getEndColumn() + 1, fTabWidth); } return replace(selection, "", true); //$NON-NLS-1$ }
@Override TextEdit backspace(ISelection selection) throws BadLocationException { IBlockTextSelection cts= (IBlockTextSelection)selection; if (isEmpty(selection) && cts.getStartColumn() > 0) { selection= new BlockTextSelection(fDocument, cts.getStartLine(), cts.getStartColumn() - 1, cts.getEndLine(), cts.getEndColumn(), fTabWidth); } return replace(selection, ""); //$NON-NLS-1$ }