List of usage examples for org.eclipse.jface.viewers TextCellEditor isDeleteEnabled
@Override public boolean isDeleteEnabled()
TextCellEditor implementation of this CellEditor method returns true if there is a selection or if the caret is not positioned at the end of the text. 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();/*from w ww .ja v a 2 s. c o m*/ if (activeEditor instanceof SQLEditor) { SQLEditor sqlEditor = (SQLEditor) activeEditor; TextCellEditor cellEditor = sqlEditor.getTextCellEditor(); if (cellEditor != null && cellEditor.isActivated() && cellEditor.isDeleteEnabled()) { cellEditor.performDelete(); } } return null; }