Example usage for org.eclipse.jface.viewers TextCellEditor performDelete

List of usage examples for org.eclipse.jface.viewers TextCellEditor performDelete

Introduction

In this page you can find the example usage for org.eclipse.jface.viewers TextCellEditor performDelete.

Prototype

@Override
public void performDelete() 

Source Link

Document

The TextCellEditor implementation of this CellEditor method deletes the current selection or, if there is no selection, the character next character from the current position.

Usage

From source file:de.chdev.artools.sql.handler.ResultDeleteHandler.java

License:Apache License

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {

    IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
            .getActiveEditor();/*  ww w.j  a v a 2  s . co  m*/
    if (activeEditor instanceof SQLEditor) {
        SQLEditor sqlEditor = (SQLEditor) activeEditor;
        TextCellEditor cellEditor = sqlEditor.getTextCellEditor();
        if (cellEditor != null && cellEditor.isActivated() && cellEditor.isDeleteEnabled()) {
            cellEditor.performDelete();
        }
    }

    return null;
}