Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 320951 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jface/viewers/ContentViewer.java (+6 lines)
Lines 262-267 Link Here
262
     * if required.
262
     * if required.
263
     */
263
     */
264
    public void setInput(Object input) {
264
    public void setInput(Object input) {
265
    	Control control = getControl();
266
		if (control == null || control.isDisposed()) {
267
			throw new IllegalStateException(
268
					"Need an underlying widget to be able to set the input." + //$NON-NLS-1$
269
							"(Has the widget been disposed?)"); //$NON-NLS-1$
270
		}
265
        Assert
271
        Assert
266
                .isTrue(getContentProvider() != null,
272
                .isTrue(getContentProvider() != null,
267
                        "ContentViewer must have a content provider when input is set."); //$NON-NLS-1$
273
                        "ContentViewer must have a content provider when input is set."); //$NON-NLS-1$
(-)src/org/eclipse/jface/viewers/StructuredViewer.java (-1 / +6 lines)
Lines 1655-1661 Link Here
1655
	 * @see org.eclipse.jface.viewers.Viewer#setInput(java.lang.Object)
1655
	 * @see org.eclipse.jface.viewers.Viewer#setInput(java.lang.Object)
1656
	 */
1656
	 */
1657
	public final void setInput(Object input) {
1657
	public final void setInput(Object input) {
1658
1658
		Control control = getControl();
1659
		if (control == null || control.isDisposed()) {
1660
			throw new IllegalStateException(
1661
					"Need an underlying widget to be able to set the input." + //$NON-NLS-1$
1662
							"(Has the widget been disposed?)"); //$NON-NLS-1$
1663
		}
1659
		try {
1664
		try {
1660
			//		fInChange= true;
1665
			//		fInChange= true;
1661
1666

Return to bug 320951