1 17 package org.eclipse.emf.common.ui.celleditor; 18 19 20 import org.eclipse.jface.viewers.DialogCellEditor; 21 import org.eclipse.jface.viewers.ILabelProvider; 22 import org.eclipse.swt.widgets.Composite; 23 24 25 28 public abstract class ExtendedDialogCellEditor extends DialogCellEditor 29 { 30 protected ILabelProvider labelProvider; 31 32 public ExtendedDialogCellEditor(Composite composite, ILabelProvider labelProvider) 33 { 34 super(composite); 35 this.labelProvider = labelProvider; 36 } 37 38 protected void updateContents(Object object) 39 { 40 if (getDefaultLabel() != null && labelProvider != null) 41 { 42 getDefaultLabel().setText(labelProvider.getText(object)); 43 } 44 } 45 } 46 | Popular Tags |