1 /******************************************************************************* 2 * Copyright (c) 2006, 2011 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.debug.internal.ui.viewers.model.provisional; 15 16 import org.eclipse.jface.viewers.CellEditor; 17 import org.eclipse.jface.viewers.ICellModifier; 18 import org.eclipse.swt.widgets.Composite; 19 20 /** 21 * Creates context specific cell modifiers and editors for elements. 22 * 23 * @since 3.3 24 */ 25 public interface IElementEditor { 26 27 /** 28 * Returns a cell editor to use for the specified column and object or <code>null</code> 29 * if none. 30 * 31 * @param context presentation context 32 * @param columnId column id 33 * @param element object to be edited 34 * @param parent parent control to create the cell editor in 35 * @return cell editor or <code>null</code> 36 */ getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent)37 CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent); 38 39 /** 40 * Returns a cell modifier for the specified element in the given context 41 * or <code>null</code> if none. 42 * @param context Presentation context 43 * @param element Model element. 44 * 45 * @return cell modifier or <code>null</code> 46 */ getCellModifier(IPresentationContext context, Object element)47 ICellModifier getCellModifier(IPresentationContext context, Object element); 48 49 } 50