List of usage examples for org.eclipse.jface.viewers TextCellEditor isActivated
public boolean isActivated()
From source file:de.chdev.artools.sql.handler.ResultCopyHandler.java
License:Apache License
@Override public Object execute(ExecutionEvent event) throws ExecutionException { IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() .getActiveEditor();// w w w. ja va 2 s .c o m if (activeEditor instanceof SQLEditor) { SQLEditor sqlEditor = (SQLEditor) activeEditor; TextCellEditor cellEditor = sqlEditor.getTextCellEditor(); if (cellEditor != null && cellEditor.isActivated() && cellEditor.isCopyEnabled()) { cellEditor.performCopy(); } } return null; }
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 . ja va2 s . c o m if (activeEditor instanceof SQLEditor) { SQLEditor sqlEditor = (SQLEditor) activeEditor; TextCellEditor cellEditor = sqlEditor.getTextCellEditor(); if (cellEditor != null && cellEditor.isActivated() && cellEditor.isCutEnabled()) { cellEditor.performCut(); } } return null; }
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 w w . ja 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; }
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();// ww w .j av a 2 s. c om if (activeEditor instanceof SQLEditor) { SQLEditor sqlEditor = (SQLEditor) activeEditor; TextCellEditor cellEditor = sqlEditor.getTextCellEditor(); if (cellEditor != null && cellEditor.isActivated() && cellEditor.isSelectAllEnabled()) { cellEditor.performSelectAll(); } } return null; }
From source file:de.chdev.artools.sql.handler.ResultRedoHandler.java
License:Apache License
@Override public Object execute(ExecutionEvent event) throws ExecutionException { IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() .getActiveEditor();/*w w w . java2 s.c om*/ if (activeEditor instanceof SQLEditor) { SQLEditor sqlEditor = (SQLEditor) activeEditor; TextCellEditor cellEditor = sqlEditor.getTextCellEditor(); if (cellEditor != null && cellEditor.isActivated() && cellEditor.isRedoEnabled()) { cellEditor.performRedo(); } } return null; }
From source file:de.chdev.artools.sql.handler.ResultUndoHandler.java
License:Apache License
@Override public Object execute(ExecutionEvent event) throws ExecutionException { IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() .getActiveEditor();/* w w w. j ava2 s . c o m*/ if (activeEditor instanceof SQLEditor) { SQLEditor sqlEditor = (SQLEditor) activeEditor; TextCellEditor cellEditor = sqlEditor.getTextCellEditor(); if (cellEditor != null && cellEditor.isActivated() && cellEditor.isUndoEnabled()) { cellEditor.performUndo(); } } return null; }