Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 55597 Details for
Bug 167858
[Viewers] Make ColumnViewer#getViewerColumn and ViewerColumn#getLabelProvider public again
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Bring the new API to ColumnViewer
167858.patch (text/plain), 8.82 KB, created by
Thomas Schindl
on 2006-12-13 12:34:59 EST
(
hide
)
Description:
Bring the new API to ColumnViewer
Filename:
MIME Type:
Creator:
Thomas Schindl
Created:
2006-12-13 12:34:59 EST
Size:
8.82 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jface >Index: src/org/eclipse/jface/viewers/ColumnViewer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface/src/org/eclipse/jface/viewers/ColumnViewer.java,v >retrieving revision 1.20 >diff -u -r1.20 ColumnViewer.java >--- src/org/eclipse/jface/viewers/ColumnViewer.java 30 Nov 2006 18:53:06 -0000 1.20 >+++ src/org/eclipse/jface/viewers/ColumnViewer.java 13 Dec 2006 17:30:28 -0000 >@@ -49,7 +49,7 @@ > private AbstractViewerEditor viewerEditor; > > private int tabEditingStyle = EditingSupport.TABING_NONE; >- >+ > /** > * Create a new instance of the receiver. > */ >@@ -83,9 +83,11 @@ > } > > /** >- * Creates the viewer editor used for editing cell contents. To be implemented by subclasses. >+ * Creates the viewer editor used for editing cell contents. To be >+ * implemented by subclasses. > * >- * @return the editor, or <code>null</code> if this viewer does not support editing cell contents. >+ * @return the editor, or <code>null</code> if this viewer does not >+ * support editing cell contents. > */ > protected abstract AbstractViewerEditor createViewerEditor(); > >@@ -95,7 +97,8 @@ > * > * @param point > * the widget-relative coordinates >- * @return the cell or <code>null</code> if no cell is found at the given point >+ * @return the cell or <code>null</code> if no cell is found at the given >+ * point > */ > ViewerCell getCell(Point point) { > ViewerRow row = getViewerRow(point); >@@ -127,7 +130,8 @@ > /** > * Returns the viewer row associated with the given row widget. > * >- * @param item the row widget >+ * @param item >+ * the row widget > * @return ViewerRow the associated viewer row > */ > protected ViewerRow getViewerRowFromItem(Widget item) { >@@ -137,7 +141,8 @@ > /** > * Returns the column widget at the given column index. > * >- * @param columnIndex the column index >+ * @param columnIndex >+ * the column index > * @return Widget the column widget > */ > protected abstract Widget getColumnViewerOwner(int columnIndex); >@@ -150,7 +155,7 @@ > * @return the viewer column at the given index, or <code>null</code> if > * there is none for the given index > */ >- /* package */ ViewerColumn getViewerColumn(final int columnIndex) { >+ /* package */ViewerColumn getViewerColumn(final int columnIndex) { > > ViewerColumn viewer; > Widget columnOwner = getColumnViewerOwner(columnIndex); >@@ -176,7 +181,8 @@ > } > > /** >- * Sets up editing support for the given column based on the "old" cell editor API. >+ * Sets up editing support for the given column based on the "old" cell >+ * editor API. > * > * @param columnIndex > * @param viewer >@@ -229,15 +235,19 @@ > } > > /** >- * Creates a generic viewer column for the given column widget, based on the given label provider. >+ * Creates a generic viewer column for the given column widget, based on the >+ * given label provider. > * >- * @param columnOwner the column widget >- * @param labelProvider the label provider to use for the column >+ * @param columnOwner >+ * the column widget >+ * @param labelProvider >+ * the label provider to use for the column > * @return ViewerColumn the viewer column > */ > private ViewerColumn createViewerColumn(Widget columnOwner, > CellLabelProvider labelProvider) { >- ViewerColumn column = new ViewerColumn(this,columnOwner) {}; >+ ViewerColumn column = new ViewerColumn(this, columnOwner) { >+ }; > column.setLabelProvider(labelProvider, false); > return column; > } >@@ -269,19 +279,19 @@ > * @param column > * @return ViewerCell > */ >- /* package */ ViewerCell updateCell(ViewerRow rowItem, int column) { >+ /* package */ViewerCell updateCell(ViewerRow rowItem, int column) { > cell.update(rowItem, column); > return cell; > } > > /** > * Returns the {@link Item} at the given widget-relative coordinates, or >- * <code>null</code> if there is no item at the given coordinates. >+ * <code>null</code> if there is no item at the given coordinates. > * > * @param point > * the widget-relative coordinates >- * @return the {@link Item} at the coordinates or <code>null</code> if there >- * is no item at the given coordinates >+ * @return the {@link Item} at the coordinates or <code>null</code> if >+ * there is no item at the given coordinates > */ > protected abstract Item getItemAt(Point point); > >@@ -339,7 +349,7 @@ > > /** > * Cancels a currently active cell editor if one is active. All changes >- * already done in the cell editor are lost. >+ * already done in the cell editor are lost. > * > * @since 3.1 (in subclasses, added in 3.3 to abstract class) > */ >@@ -377,11 +387,11 @@ > > /** > * Return the CellEditors for the receiver, or <code>null</code> if no >- * cell editors are set. >+ * cell editors are set. > * <p> > * Since 3.3, an alternative API is available, see >- * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more flexible >- * way of editing values in a column viewer. >+ * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more >+ * flexible way of editing values in a column viewer. > * </p> > * > * @return CellEditor[] >@@ -398,12 +408,12 @@ > > /** > * Returns the cell modifier of this viewer, or <code>null</code> if none >- * has been set. >+ * has been set. > * > * <p> > * Since 3.3, an alternative API is available, see >- * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more flexible >- * way of editing values in a column viewer. >+ * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more >+ * flexible way of editing values in a column viewer. > * </p> > * > * @return the cell modifier, or <code>null</code> >@@ -425,8 +435,8 @@ > * > * <p> > * Since 3.3, an alternative API is available, see >- * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more flexible >- * way of editing values in a column viewer. >+ * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more >+ * flexible way of editing values in a column viewer. > * </p> > * > * @return the list of column properties >@@ -446,8 +456,8 @@ > * > * <p> > * Since 3.3, an alternative API is available, see >- * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more flexible >- * way of editing values in a column viewer. >+ * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more >+ * flexible way of editing values in a column viewer. > * </p> > * > * @return <code>true</code> if there is an active cell editor, and >@@ -469,8 +479,8 @@ > * > * <p> > * Since 3.3, an alternative API is available, see >- * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more flexible >- * way of editing values in a column viewer. >+ * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more >+ * flexible way of editing values in a column viewer. > * </p> > * > * @param editors >@@ -486,13 +496,13 @@ > } > > /** >- * Sets the cell modifier for this column viewer. This method does nothing if editing >- * is not supported by this viewer. >+ * Sets the cell modifier for this column viewer. This method does nothing >+ * if editing is not supported by this viewer. > * > * <p> > * Since 3.3, an alternative API is available, see >- * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more flexible >- * way of editing values in a column viewer. >+ * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more >+ * flexible way of editing values in a column viewer. > * </p> > * > * @param modifier >@@ -515,8 +525,8 @@ > * > * <p> > * Since 3.3, an alternative API is available, see >- * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more flexible >- * way of editing values in a column viewer. >+ * {@link ViewerColumn#setEditingSupport(EditingSupport)} for a more >+ * flexible way of editing values in a column viewer. > * </p> > * > * @param columnProperties >@@ -530,7 +540,7 @@ > viewerEditor.setColumnProperties(columnProperties); > } > } >- >+ > /** > * The tab-editing style used if the default implementation is used > * >@@ -544,4 +554,18 @@ > int getTabEditingStyle() { > return this.tabEditingStyle; > } >+ >+ /** >+ * @param columnIndex >+ * the column index you search the label provider for >+ * @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; >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 167858
: 55597