/** * Set the label provider for the column. Subclasses may extend but must * call the super implementation. * * @param labelProvider * the new {@link CellLabelProvider} */ public void setLabelProvider(CellLabelProvider labelProvider) { setLabelProvider(labelProvider, true); }
private void saveEditorValue(CellEditor cellEditor) { ViewerColumn part = viewer.getViewerColumn(cell.getColumnIndex()); if (part != null && part.getEditingSupport() != null) { part.getEditingSupport().saveCellEditorValue(cellEditor, cell); } }
/** * Returns the label provider associated with the column at the given index * or <code>null</code> if no column with this index is known. * * @param columnIndex * the column index * @return the label provider associated with the column or * <code>null</code> if no column with this index is known */ public CellLabelProvider getLabelProvider(int columnIndex) { ViewerColumn column = getViewerColumn(columnIndex); if (column != null) { return column.getLabelProvider(); } return null; }
void clearLegacyEditingSetup() { if (!getControl().isDisposed() && getCellEditors() != null) { int count = doGetColumnCount(); for (int i = 0; i < count || i == 0; i++) { Widget owner = getColumnViewerOwner(i); if (owner != null && !owner.isDisposed()) { ViewerColumn column = (ViewerColumn) owner .getData(ViewerColumn.COLUMN_VIEWER_KEY); if (column != null) { EditingSupport e = column.getEditingSupport(); // Ensure that only EditingSupports are wiped that are // setup // for Legacy reasons if (e != null && e.isLegacySupport()) { column.setEditingSupport(null); } } } } } }
columnViewer.refresh(cellToUpdate);
private void handleDispose(ColumnViewer viewer) { handleDispose(); viewer.clearLegacyEditingSetup(); }
viewer.setEditingSupport(new EditingSupport(this) {
void clearLegacyEditingSetup() { if (!getControl().isDisposed() && getCellEditors() != null) { int count = doGetColumnCount(); for (int i = 0; i < count || i == 0; i++) { Widget owner = getColumnViewerOwner(i); if (owner != null && !owner.isDisposed()) { ViewerColumn column = (ViewerColumn) owner .getData(ViewerColumn.COLUMN_VIEWER_KEY); if (column != null) { EditingSupport e = column.getEditingSupport(); // Ensure that only EditingSupports are wiped that are // setup // for Legacy reasons if (e != null && e.isLegacySupport()) { column.setEditingSupport(null); } } } } } }
columnViewer.refresh(cellToUpdate);
private void handleDispose(ColumnViewer viewer) { handleDispose(); viewer.clearLegacyEditingSetup(); }
viewer.setEditingSupport(new EditingSupport(this) {
/** * Set the label provider for the column. Subclasses may extend but must * call the super implementation. * * @param labelProvider * the new {@link CellLabelProvider} */ public void setLabelProvider(CellLabelProvider labelProvider) { setLabelProvider(labelProvider, true); }
private void saveEditorValue(CellEditor cellEditor) { ViewerColumn part = viewer.getViewerColumn(cell.getColumnIndex()); if (part != null && part.getEditingSupport() != null) { part.getEditingSupport().saveCellEditorValue(cellEditor, cell); } }
/** * Returns the label provider associated with the column at the given index * or <code>null</code> if no column with this index is known. * * @param columnIndex * the column index * @return the label provider associated with the column or * <code>null</code> if no column with this index is known * * @since 3.3 */ public CellLabelProvider getLabelProvider(int columnIndex) { ViewerColumn column = getViewerColumn(columnIndex); if (column != null) { return column.getLabelProvider(); } return null; }
void clearLegacyEditingSetup() { if (!getControl().isDisposed() && getCellEditors() != null) { int count = doGetColumnCount(); for( int i = 0; i < count || i == 0; i++ ) { Widget owner = getColumnViewerOwner(i); if( owner != null && ! owner.isDisposed() ) { ViewerColumn column = (ViewerColumn) owner .getData(ViewerColumn.COLUMN_VIEWER_KEY); if( column != null ) { EditingSupport e = column.getEditingSupport(); // Ensure that only EditingSupports are wiped that are // setup // for Legacy reasons if (e != null && e.isLegacySupport()) { column.setEditingSupport(null); } } } } } }
columnViewer.refresh(cellToUpdate);
private void handleDispose(ColumnViewer viewer) { handleDispose(); viewer.clearLegacyEditingSetup(); }
viewer.setEditingSupport(new EditingSupport(this) {
/** * Set the label provider for the column. Subclasses may extend but must * call the super implementation. * * @param labelProvider * the new {@link CellLabelProvider} */ public void setLabelProvider(CellLabelProvider labelProvider) { setLabelProvider(labelProvider, true); }
private void saveEditorValue(CellEditor cellEditor) { ViewerColumn part = viewer.getViewerColumn(cell.getColumnIndex()); if (part != null && part.getEditingSupport() != null) { part.getEditingSupport().saveCellEditorValue(cellEditor, cell); } }