Search in sources :

Example 1 with InfrastructureSignatureDeleteCellValueListener

use of org.palladiosimulator.editors.commons.tabs.operations.InfrastructureSignatureDeleteCellValueListener 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;
}
Also used : Control(org.eclipse.swt.widgets.Control) InfrastructureSignatureDeleteCellValueListener(org.palladiosimulator.editors.commons.tabs.operations.InfrastructureSignatureDeleteCellValueListener) TextCellEditor(org.eclipse.jface.viewers.TextCellEditor) CellEditor(org.eclipse.jface.viewers.CellEditor) DialogCellEditor(org.eclipse.jface.viewers.DialogCellEditor) DialogCellEditor(org.eclipse.jface.viewers.DialogCellEditor) EObject(org.eclipse.emf.ecore.EObject) ParametersDialog(org.palladiosimulator.editors.commons.dialogs.parameters.ParametersDialog) TextCellEditor(org.eclipse.jface.viewers.TextCellEditor)

Aggregations

EObject (org.eclipse.emf.ecore.EObject)1 CellEditor (org.eclipse.jface.viewers.CellEditor)1 DialogCellEditor (org.eclipse.jface.viewers.DialogCellEditor)1 TextCellEditor (org.eclipse.jface.viewers.TextCellEditor)1 Control (org.eclipse.swt.widgets.Control)1 ParametersDialog (org.palladiosimulator.editors.commons.dialogs.parameters.ParametersDialog)1 InfrastructureSignatureDeleteCellValueListener (org.palladiosimulator.editors.commons.tabs.operations.InfrastructureSignatureDeleteCellValueListener)1