aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Spungin2014-04-07 22:05:55 (EDT)
committerPaul Webster2014-04-16 15:34:35 (EDT)
commitdecc8b08a421bf765f735b4633d82e2cc1f974b0 (patch)
treedd5fea9e4d6f63eea90bf82fa69c9a8121a194e6
parentcd67790526d98cc71073208042b6817810c9e0cf (diff)
downloadeclipse.platform.ui-decc8b08a421bf765f735b4633d82e2cc1f974b0.zip
eclipse.platform.ui-decc8b08a421bf765f735b4633d82e2cc1f974b0.tar.gz
eclipse.platform.ui-decc8b08a421bf765f735b4633d82e2cc1f974b0.tar.bz2
Bug 401439 - [CSS] reoccuring widget is disposed errors refs/changes/99/24599/9
Change-Id: Ib50a96b3eb5cee2eff22b16c4f76e9c09288288d Signed-off-by: Steven Spungin <steven@spungin.tv>
-rw-r--r--bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ContentViewer.java30
1 files changed, 19 insertions, 11 deletions
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ContentViewer.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ContentViewer.java
index 4a30fd9..0ed26e5 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ContentViewer.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ContentViewer.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Steven Spungin <steven@spungin.tv> - Bug 401439
*******************************************************************************/
package org.eclipse.jface.viewers;
@@ -169,17 +170,24 @@ public abstract class ContentViewer extends Viewer {
* @param event a dispose event
*/
protected void handleDispose(DisposeEvent event) {
- if (contentProvider != null) {
- contentProvider.inputChanged(this, getInput(), null);
- contentProvider.dispose();
- contentProvider = null;
- }
- if (labelProvider != null) {
- labelProvider.removeListener(labelProviderListener);
- labelProvider.dispose();
- labelProvider = null;
- }
- input = null;
+ if (contentProvider != null) {
+ try {
+ contentProvider.inputChanged(this, getInput(), null);
+ } catch (Exception e) {
+ // ignore exception
+ String message = "Exception while calling ContentProvider.inputChanged from ContentViewer.handleDispose"; //$NON-NLS-1$
+ message += " (" + contentProvider.getClass().getName() + ")"; //$NON-NLS-1$//$NON-NLS-2$
+ Policy.getLog().log(new Status(IStatus.WARNING, Policy.JFACE, message, e));
+ }
+ contentProvider.dispose();
+ contentProvider = null;
+ }
+ if (labelProvider != null) {
+ labelProvider.removeListener(labelProviderListener);
+ labelProvider.dispose();
+ labelProvider = null;
+ }
+ input = null;
}
/**