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

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

Introduction

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

Prototype

@Override
public void performCut() 

Source Link

Document

The TextCellEditor implementation of this CellEditor method cuts the current selection to the clipboard.

Usage

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

License:Apache License

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

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

    return null;
}