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 178310 Details for
Bug 320951
[Viewers] ContentViewer gives bad error message when widget is disposed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch v01
patch_Bug_320951_1.txt (text/plain), 1.98 KB, created by
Hitesh
on 2010-09-07 07:10:06 EDT
(
hide
)
Description:
Patch v01
Filename:
MIME Type:
Creator:
Hitesh
Created:
2010-09-07 07:10:06 EDT
Size:
1.98 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jface >Index: src/org/eclipse/jface/viewers/ContentViewer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface/src/org/eclipse/jface/viewers/ContentViewer.java,v >retrieving revision 1.16 >diff -u -r1.16 ContentViewer.java >--- src/org/eclipse/jface/viewers/ContentViewer.java 25 May 2009 20:52:37 -0000 1.16 >+++ src/org/eclipse/jface/viewers/ContentViewer.java 7 Sep 2010 09:11:59 -0000 >@@ -15,6 +15,7 @@ > import org.eclipse.core.runtime.Status; > import org.eclipse.jface.internal.InternalPolicy; > import org.eclipse.jface.util.Policy; >+import org.eclipse.swt.SWT; > import org.eclipse.swt.events.DisposeEvent; > import org.eclipse.swt.events.DisposeListener; > import org.eclipse.swt.widgets.Control; >@@ -262,6 +263,10 @@ > * if required. > */ > public void setInput(Object input) { >+ Control control = getControl(); >+ if (control == null || control.isDisposed()) { >+ SWT.error(SWT.ERROR_WIDGET_DISPOSED); >+ } > Assert > .isTrue(getContentProvider() != null, > "ContentViewer must have a content provider when input is set."); //$NON-NLS-1$ >Index: src/org/eclipse/jface/viewers/StructuredViewer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java,v >retrieving revision 1.87 >diff -u -r1.87 StructuredViewer.java >--- src/org/eclipse/jface/viewers/StructuredViewer.java 25 Jun 2010 13:02:16 -0000 1.87 >+++ src/org/eclipse/jface/viewers/StructuredViewer.java 7 Sep 2010 09:12:01 -0000 >@@ -1655,7 +1655,10 @@ > * @see org.eclipse.jface.viewers.Viewer#setInput(java.lang.Object) > */ > public final void setInput(Object input) { >- >+ Control control = getControl(); >+ if (control == null || control.isDisposed()) { >+ SWT.error(SWT.ERROR_WIDGET_DISPOSED); >+ } > try { > // fInChange= true; >
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 320951
:
178310
|
178626