use of org.eclipse.jface.viewers.CellEditor in project cubrid-manager by CUBRID.
the class TableDirectEditPolicy method revertOldEditValue.
@Override
protected void revertOldEditValue(DirectEditRequest request) {
CellEditor cellEditor = request.getCellEditor();
cellEditor.setValue(oldValue);
TablePart tablePart = (TablePart) getHost();
tablePart.revertNameChange();
}
use of org.eclipse.jface.viewers.CellEditor in project dbeaver by serge-rider.
the class NoteDirectEditPolicy method storeOldEditValue.
@Override
protected void storeOldEditValue(DirectEditRequest request) {
CellEditor cellEditor = request.getCellEditor();
oldValue = (String) cellEditor.getValue();
}
use of org.eclipse.jface.viewers.CellEditor in project dbeaver by serge-rider.
the class UIUtils method createPropertyEditor.
public static CellEditor createPropertyEditor(final IServiceLocator serviceLocator, Composite parent, DBPPropertySource source, DBPPropertyDescriptor property) {
if (source == null) {
return null;
}
final Object object = source.getEditableValue();
if (!property.isEditable(object)) {
return null;
}
CellEditor cellEditor = UIUtils.createCellEditor(parent, object, property);
if (cellEditor != null) {
final Control editorControl = cellEditor.getControl();
UIUtils.addFocusTracker(serviceLocator, UIUtils.INLINE_WIDGET_EDITOR_ID, editorControl);
editorControl.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
UIUtils.removeFocusTracker(serviceLocator, editorControl);
}
});
}
return cellEditor;
}
use of org.eclipse.jface.viewers.CellEditor in project dbeaver by serge-rider.
the class ColumnDirectEditPolicy method storeOldEditValue.
/**
* @param to
* Revert request
*/
@Override
protected void storeOldEditValue(DirectEditRequest request) {
CellEditor cellEditor = request.getCellEditor();
oldValue = (String) cellEditor.getValue();
}
use of org.eclipse.jface.viewers.CellEditor in project dbeaver by serge-rider.
the class NoteDirectEditPolicy method revertOldEditValue.
/**
* @param request
*/
@Override
protected void revertOldEditValue(DirectEditRequest request) {
CellEditor cellEditor = request.getCellEditor();
cellEditor.setValue(oldValue);
NotePart entityPart = (NotePart) getHost();
entityPart.revertNameChange();
}
Aggregations