View | Details | Raw Unified | Return to bug 68031 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/presentations/BasicStackList.java (-1 / +18 lines)
Lines 201-207 Link Here
201
    protected TableViewer createTableViewer(Composite parent, int style) {
201
    protected TableViewer createTableViewer(Composite parent, int style) {
202
        Table table = new Table(parent, SWT.SINGLE | (style & ~SWT.MULTI));
202
        Table table = new Table(parent, SWT.SINGLE | (style & ~SWT.MULTI));
203
        table.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
203
        table.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
204
        TableViewer tableViewer = new TableViewer(table);
204
        TableViewer tableViewer = new TableViewer(table) {
205
        	/* (non-Javadoc)
206
			 * @see org.eclipse.jface.viewers.TableViewer#internalRefresh(java.lang.Object)
207
			 */
208
			protected void internalRefresh(Object element) {
209
				boolean usingMotif = "motif".equals(SWT.getPlatform());
210
				try {
211
					// This avoids a "graphic is disposed" error on Motif by not letting
212
					// it redraw while we remove entries.  Some items in this table are
213
					// being removed and may have icons which may have already been
214
					// disposed elsewhere.
215
					if (usingMotif) getTable().setRedraw(false);
216
					super.internalRefresh(element);
217
				} finally {
218
					if (usingMotif) getTable().setRedraw(true);
219
				}
220
			}
221
        };
205
        tableViewer.addFilter(new NamePatternFilter());
222
        tableViewer.addFilter(new NamePatternFilter());
206
        tableViewer.setContentProvider(new BasicStackListContentProvider());
223
        tableViewer.setContentProvider(new BasicStackListContentProvider());
207
        tableViewer.setSorter(new BasicStackListViewerSorter());
224
        tableViewer.setSorter(new BasicStackListViewerSorter());

Return to bug 68031