Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2010-07-09 18:29:42 -0400
committerPawel Piech2010-07-09 18:29:42 -0400
commit5da855cba4a8f5235192ab142046c4ffa36626e2 (patch)
treedf6cd3457d411bc2f2f5a8744e9fc8161a90cd97
parent166f0e64d1ff8cab53971eb0b816754593e48baf (diff)
downloadeclipse.platform.debug-5da855cba4a8f5235192ab142046c4ffa36626e2.tar.gz
eclipse.platform.debug-5da855cba4a8f5235192ab142046c4ffa36626e2.tar.xz
eclipse.platform.debug-5da855cba4a8f5235192ab142046c4ffa36626e2.zip
Bug 317283 - Merged fix from HEAD
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java39
1 files changed, 26 insertions, 13 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
index 52ec2db1c..910b640f5 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -31,7 +31,6 @@ import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.jface.viewers.ViewerLabel;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.MenuDetectEvent;
import org.eclipse.swt.events.MenuDetectListener;
import org.eclipse.swt.events.TraverseEvent;
@@ -122,16 +121,6 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
}
});
-
- fContainer.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (fGradientBackground != null) {
- fGradientBackground.dispose();
- fGradientBackground = null;
- }
- }
- });
-
hookControl(fContainer);
int columns= 1000;
@@ -872,5 +861,29 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
private static int blend(int v1, int v2, int ratio) {
int b = (ratio * v1 + (100 - ratio) * v2) / 100;
return Math.min(255, b);
- }
+ }
+
+ /*
+ * @see
+ * org.eclipse.jface.viewers.StructuredViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
+ *
+ * @since 3.7
+ */
+ protected void handleDispose(DisposeEvent event) {
+ if (fGradientBackground != null) {
+ fGradientBackground.dispose();
+ fGradientBackground= null;
+ }
+
+ if (fBreadcrumbItems != null) {
+ Iterator iterator= fBreadcrumbItems.iterator();
+ while (iterator.hasNext()) {
+ BreadcrumbItem item= (BreadcrumbItem)iterator.next();
+ item.dispose();
+ }
+ }
+
+ super.handleDispose(event);
+ }
+
}

Back to the top