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

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

Introduction

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

Prototype

@Override
public boolean isSelectAllEnabled() 

Source Link

Document

Returns true if this cell editor is able to perform the select all action.

Usage

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

License:Apache License

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

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

    return null;
}