use of org.eclipse.jface.viewers.CellEditor in project dbeaver by dbeaver.
the class NoteDirectEditPolicy method getDirectEditCommand.
@Override
protected Command getDirectEditCommand(DirectEditRequest request) {
CellEditor cellEditor = request.getCellEditor();
String newNote = (String) cellEditor.getValue();
return new NoteSetTextCommand((NotePart) getHost(), newNote);
}
use of org.eclipse.jface.viewers.CellEditor in project dbeaver by dbeaver.
the class AttributeDirectEditPolicy method revertOldEditValue.
@Override
protected void revertOldEditValue(DirectEditRequest request) {
CellEditor cellEditor = request.getCellEditor();
cellEditor.setValue(oldValue);
AttributePart attributePart = (AttributePart) getHost();
attributePart.revertNameChange(oldValue);
}
use of org.eclipse.jface.viewers.CellEditor in project dbeaver by dbeaver.
the class AttributeDirectEditPolicy 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 dbeaver.
the class EntityDirectEditPolicy method revertOldEditValue.
@Override
protected void revertOldEditValue(DirectEditRequest request) {
CellEditor cellEditor = request.getCellEditor();
cellEditor.setValue(oldValue);
EntityPart entityPart = (EntityPart) getHost();
entityPart.revertNameChange();
}
use of org.eclipse.jface.viewers.CellEditor in project Palladio-Editors-Sirius by PalladioSimulator.
the class InfrastructureSignaturesEditorSection method createViewerCellEditors.
/* (non-Javadoc)
* @see org.palladiosimulator.editors.commons.tabs.generic.EditorSection#createViewerCellEditors(org.eclipse.swt.widgets.Table)
*/
@Override
protected CellEditor[] createViewerCellEditors(Table table) {
CellEditor[] editors = new CellEditor[columnNames.length];
editors[SIGNATURENAME_COLUMN_INDEX] = new TextCellEditor(table);
// create 'DeleteCellValueListener' and as SelectionListener to the 'TableVewer'
InfrastructureSignatureDeleteCellValueListener cellValueListener = new InfrastructureSignatureDeleteCellValueListener(viewer);
viewer.addSelectionChangedListener(cellValueListener);
editors[PARAMETER_COLUMN_INDEX] = new DialogCellEditor(table) {
@Override
protected Object openDialogBox(Control cellEditorWindow) {
ParametersDialog dialog = new ParametersDialog(cellEditorWindow.getShell(), getSelectedSignature());
if (dialog.open() == Dialog.OK)
viewer.refresh();
return null;
}
};
return editors;
}
Aggregations