diff options
author | Pawel Piech | 2009-12-01 19:01:48 +0000 |
---|---|---|
committer | Pawel Piech | 2009-12-01 19:01:48 +0000 |
commit | 6b1962dc35c92ba073611140cce5b8043e69f072 (patch) | |
tree | f5d10074bf6484fea311cffb8a67b597efa4f81c | |
parent | 06a5dbc013a58b3e362f0e3ecbba7aee93f3442d (diff) | |
download | eclipse.platform.debug-FlexBreakpointView.tar.gz eclipse.platform.debug-FlexBreakpointView.tar.xz eclipse.platform.debug-FlexBreakpointView.zip |
Merged fix for bug 295771 from HEAD.FlexBreakpointView
27 files changed, 453 insertions, 403 deletions
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java index 1d0816d3e..9c37e6185 100644 --- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java +++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java @@ -68,6 +68,7 @@ abstract public class CheckTests extends TestCase { fViewer.removeLabelUpdateListener(fListener); fViewer.removeViewerUpdateListener(fListener); fViewer.removeModelChangedListener(fListener); + fViewer.getPresentationContext().dispose(); // Close the shell and exit. fShell.close(); diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java index b5eb53f1a..339a319f2 100644 --- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java +++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java @@ -65,6 +65,7 @@ abstract public class ContentTests extends TestCase { fViewer.removeLabelUpdateListener(fListener); fViewer.removeViewerUpdateListener(fListener); fViewer.removeModelChangedListener(fListener); + fViewer.getPresentationContext().dispose(); // Close the shell and exit. fShell.close(); diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java index 5f6886270..887a1ff76 100644 --- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java +++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java @@ -71,6 +71,7 @@ abstract public class DeltaTests extends TestCase { fViewer.removeLabelUpdateListener(fListener); fViewer.removeViewerUpdateListener(fListener); fViewer.removeModelChangedListener(fListener); + fViewer.getPresentationContext().dispose(); // Close the shell and exit. fShell.close(); diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PerformanceTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PerformanceTests.java index f4c0786c6..9da1d4b34 100644 --- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PerformanceTests.java +++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PerformanceTests.java @@ -66,6 +66,7 @@ abstract public class PerformanceTests extends TestCase implements ITestModelUpd fViewer.removeLabelUpdateListener(fListener); fViewer.removeViewerUpdateListener(fListener); fViewer.removeModelChangedListener(fListener); + fViewer.getPresentationContext().dispose(); // Close the shell and exit. fShell.close(); diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PresentationContextTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PresentationContextTests.java index 8e5028935..7e4d2d280 100644 --- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PresentationContextTests.java +++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PresentationContextTests.java @@ -48,6 +48,7 @@ public class PresentationContextTests extends TestCase { assertEquals("Wrong value restored", new Integer(1), context.getProperty("integer")); assertEquals("Wrong value restored", new Boolean(true), context.getProperty("boolean")); assertEquals("Wrong value restored", ResourcesPlugin.getWorkspace().getRoot(), context.getProperty("persistable")); + context.dispose(); } } diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java index aa1155466..b6f725b60 100644 --- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java +++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java @@ -69,6 +69,7 @@ abstract public class SelectionTests extends TestCase { fViewer.removeLabelUpdateListener(fListener); fViewer.removeViewerUpdateListener(fListener); fViewer.removeModelChangedListener(fListener); + fViewer.getPresentationContext().dispose(); // Close the shell and exit. fShell.close(); diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java index 0044ac1fd..159327e88 100644 --- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java +++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java @@ -71,6 +71,7 @@ abstract public class StateTests extends TestCase implements ITestModelUpdatesLi fViewer.removeViewerUpdateListener(fListener); fViewer.removeModelChangedListener(fListener); fViewer.addStateUpdateListener(fListener); + fViewer.getPresentationContext().dispose(); // Close the shell and exit. fShell.close(); diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java index eff52f495..7b981af18 100644 --- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java +++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java @@ -66,6 +66,7 @@ abstract public class UpdateTests extends TestCase { fViewer.removeLabelUpdateListener(fListener); fViewer.removeViewerUpdateListener(fListener); fViewer.removeModelChangedListener(fListener); + fViewer.getPresentationContext().dispose(); // Close the shell and exit. fShell.close(); diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerLazyModeTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerLazyModeTests.java index 6afa8f6de..93ec9344e 100644 --- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerLazyModeTests.java +++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerLazyModeTests.java @@ -68,6 +68,7 @@ public class VirtualViewerLazyModeTests extends TestCase { fViewer.removeLabelUpdateListener(fListener); fViewer.removeViewerUpdateListener(fListener); fViewer.removeModelChangedListener(fListener); + fViewer.getPresentationContext().dispose(); // Close the shell and exit. fShell.close(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java index e03194433..4262489eb 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java @@ -11,10 +11,17 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.actions.breakpoints; +import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener; +import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta; +import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer; import org.eclipse.debug.ui.AbstractDebugView; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.TreePath; +import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IViewActionDelegate; import org.eclipse.ui.IViewPart; @@ -24,6 +31,8 @@ import org.eclipse.ui.IViewPart; public class BreakpointsExpandAllAction implements IViewActionDelegate { private AbstractDebugView fView; + + private boolean fFinishedExpanding; /* (non-Javadoc) * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart) @@ -36,7 +45,34 @@ public class BreakpointsExpandAllAction implements IViewActionDelegate { * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ public void run(IAction action) { - ((TreeViewer) fView.getViewer()).expandAll(); + Display display = fView.getSite().getShell().getDisplay(); + + VirtualTreeModelViewer virtualViewer = new VirtualTreeModelViewer( + display, 0, ((ITreeModelViewer)fView.getViewer()).getPresentationContext()); + + fFinishedExpanding = false; + virtualViewer.setAutoExpandLevel(-1); + virtualViewer.addViewerUpdateListener(new IViewerUpdateListener() { + public void viewerUpdatesComplete() { + fFinishedExpanding = true; + } + + public void viewerUpdatesBegin() {} + public void updateStarted(IViewerUpdate update) {} + public void updateComplete(IViewerUpdate update) {} + }); + + virtualViewer.setInput(fView.getViewer().getInput()); + + while (!fFinishedExpanding) { + if (!display.readAndDispatch ()) display.sleep (); + } + + ModelDelta stateDelta = new ModelDelta(virtualViewer.getInput(), IModelDelta.NO_CHANGE); + virtualViewer.saveElementState(TreePath.EMPTY, stateDelta, IModelDelta.EXPAND); + ((ITreeModelViewer) fView.getViewer()).updateViewer(stateDelta); + + virtualViewer.dispose(); } /* (non-Javadoc) diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/AbstractBreakpointManagerInput.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/AbstractBreakpointManagerInput.java index c178e7860..148a03b5e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/AbstractBreakpointManagerInput.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/AbstractBreakpointManagerInput.java @@ -23,7 +23,7 @@ public abstract class AbstractBreakpointManagerInput { /**
* The presentation context of the breakpoints view.
*/
- final protected IPresentationContext fContext;
+ final private IPresentationContext fContext;
/**
* Constructor.
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultBreakpointManagerInput.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultBreakpointManagerInput.java index ee19e4359..ae0ab52e2 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultBreakpointManagerInput.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultBreakpointManagerInput.java @@ -34,8 +34,8 @@ public class DefaultBreakpointManagerInput extends AbstractBreakpointManagerInpu * @see java.lang.Object#hashCode()
*/
public int hashCode() {
- if (fContext != null) {
- return fContext.hashCode();
+ if (getContext() != null) {
+ return getContext().hashCode();
} else {
return 1;
}
@@ -48,9 +48,9 @@ public class DefaultBreakpointManagerInput extends AbstractBreakpointManagerInpu public boolean equals(Object arg0) {
if ( (arg0 != null) && arg0.getClass().equals(this.getClass()) ) {
- IPresentationContext context = ((DefaultBreakpointManagerInput) arg0).fContext;
- if (fContext != null && context != null)
- return fContext.equals(context);
+ IPresentationContext context = ((DefaultBreakpointManagerInput) arg0).getContext();
+ if (getContext() != null && context != null)
+ return getContext().equals(context);
}
return super.equals(arg0);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java index cacf33d08..b37edcaef 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java @@ -1875,6 +1875,10 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende fTableViewer.dispose(); } + if (fPresentationContext != null) { + fPresentationContext.dispose(); + } + if (!fToolTipShell.isDisposed()) { fToolTipShell.dispose(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/AbstractBreakpointManagerContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/AbstractBreakpointManagerContentProvider.java index f76122781..dbfeb3a30 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/AbstractBreakpointManagerContentProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/AbstractBreakpointManagerContentProvider.java @@ -12,15 +12,16 @@ package org.eclipse.debug.internal.ui.model.elements; import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.core.DebugPlugin;
@@ -29,6 +30,7 @@ import org.eclipse.debug.core.IBreakpointsListener; import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointUIConstants;
import org.eclipse.debug.internal.ui.elements.adapters.AbstractBreakpointManagerInput;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
@@ -37,9 +39,9 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta; import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
import org.eclipse.debug.internal.ui.views.breakpoints.ElementComparator;
-import org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointFilterListener;
-import org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointOrganizerListener;
import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.IStructuredSelection;
/**
@@ -48,43 +50,36 @@ import org.eclipse.jface.viewers.IStructuredSelection; * @since 3.6
*/
public abstract class AbstractBreakpointManagerContentProvider extends ElementContentProvider
- implements IBreakpointFilterListener, IBreakpointOrganizerListener, IBreakpointsListener {
+ implements IBreakpointsListener {
/**
* Breakpoint input data. Contains all input specific data.
*
* @since 3.6
*/
- protected class InputData {
+ private class InputData {
/**
* Breakpoint manager input
*/
- AbstractBreakpointManagerInput fInput;
+ private AbstractBreakpointManagerInput fInput;
/**
* Model proxy of the input
*/
- AbstractModelProxy fProxy;
-
- /**
- * Selection filter, will be use to provide debug context filtering
- */
- IStructuredSelection fSelectionFilter;
+ private List/*<AbstractModelProxy>*/ fProxies = new ArrayList(1);
/**
* Element comparator, use to compare the ordering of elements for the model
+ * <br/> Note: We assume that the comparator does not change.
*/
- ElementComparator fComparator;
-
- /**
- * A list of breakpoint organizers
- */
- IBreakpointOrganizer[] fOrganizers;
+ private ElementComparator fComparator;
/**
- * The breakpoint root container
+ * The breakpoint root container.<br/>
+ * Note: The final qualifier guarantees that fContainer will be
+ * initialized before the class is accessed on other threads.
*/
- BreakpointContainer fContainer;
+ final private BreakpointContainer fContainer;
/**
* Constructor
@@ -94,58 +89,172 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo * @param filter the debug context selection
* @param comparator the element comparator
*/
- InputData(AbstractBreakpointManagerInput input, AbstractModelProxy proxy, IStructuredSelection filter, ElementComparator comparator) {
+ InputData(AbstractBreakpointManagerInput input) {
fInput = input;
- fProxy = proxy;
- fSelectionFilter = filter;
- fComparator = comparator;
+ fProxies = new ArrayList(1);
+ fComparator = (ElementComparator)
+ input.getContext().getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_ELEMENT_COMPARATOR);
+
+ IBreakpointOrganizer[] organizers = (IBreakpointOrganizer[])
+ input.getContext().getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_ORGANIZERS);
+
+ // Create the initial container.
+ ModelDelta initialDelta = new ModelDelta(fInput, 0, IModelDelta.NO_CHANGE, -1);
+ fContainer = createRootContainer(initialDelta, fInput, organizers, fBpManager);
}
+ synchronized void proxyInstalled(AbstractModelProxy proxy) {
+ fProxies.add(proxy);
+
+ // Generate an install delta
+
+ ModelDelta rootDelta = new ModelDelta(fInput, 0, IModelDelta.NO_CHANGE, -1);
+ buildInstallDelta(rootDelta, fContainer);
+ proxy.fireModelChanged(rootDelta);
+ }
+
+ synchronized void proxyDisposed(AbstractModelProxy proxy) {
+ fProxies.remove(proxy);
+ }
+
/**
* Change the breakpoint organizers for the root container.
*
* @param organizers the new organizers.
*/
synchronized void setOrganizers(IBreakpointOrganizer[] organizers) {
- fOrganizers = organizers;
-
- if (fContainer == null) {
- ModelDelta initialDelta = new ModelDelta(fInput, 0, IModelDelta.NO_CHANGE, -1);
- fContainer = createRootContainer(initialDelta, fInput, fOrganizers, fBpManager);
- initialDelta.setChildCount(fContainer.getChildren().length);
-
- // select the first breakpoint
- IBreakpoint[] breakpoints = fContainer.getBreakpoints();
- if (breakpoints.length > 0)
- appendModelDeltaToElement(initialDelta, breakpoints[0], IModelDelta.SELECT);
-
- fireModelChanged(fInput, initialDelta, "Organizer Changed - Initial Container."); //$NON-NLS-1$
- } else {
- // create a reference container, use for deleting elements and adding elements
- ModelDelta dummyDelta = new ModelDelta(null, IModelDelta.NO_CHANGE);
- BreakpointContainer refContainer = createRootContainer(dummyDelta, fInput, organizers, fBpManager);
+ // create a reference container, use for deleting elements and adding elements
+ ModelDelta dummyDelta = new ModelDelta(null, IModelDelta.NO_CHANGE);
+ BreakpointContainer refContainer = createRootContainer(dummyDelta, fInput, organizers, fBpManager);
- // delete the removed elements
- ModelDelta deletedDelta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
- deleteRemovedElements(fContainer, refContainer, deletedDelta);
- fireModelChanged(fInput, deletedDelta, "setOrganizers - Delete removed elements"); //$NON-NLS-1$
-
- // adjust the old organizer with the reference organizer
- BreakpointContainer.copyOrganizers(fContainer, refContainer);
-
- // insert the added elements
- ModelDelta addedDelta = new ModelDelta(fInput, 0, IModelDelta.NO_CHANGE, -1);
- IBreakpoint newBreakpoint = insertAddedElements(fContainer, refContainer, addedDelta);
- addedDelta.setChildCount(fContainer.getChildren().length);
-
- // select the new breakpoint
- if (newBreakpoint != null)
- appendModelDeltaToElement(addedDelta, newBreakpoint, IModelDelta.SELECT);
-
- fireModelChanged(fInput, addedDelta, "setOrganizers - Insert added elements"); //$NON-NLS-1$
- }
+ // delete the removed elements
+ ModelDelta deletedDelta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
+ deleteRemovedElements(fContainer, refContainer, deletedDelta);
+ fireModelChanged(fInput, deletedDelta, "setOrganizers - Delete removed elements"); //$NON-NLS-1$
+
+ // adjust the old organizer with the reference organizer
+ BreakpointContainer.copyOrganizers(fContainer, refContainer);
+
+ // insert the added elements
+ ModelDelta addedDelta = new ModelDelta(fInput, 0, IModelDelta.NO_CHANGE, -1);
+ IBreakpoint newBreakpoint = insertAddedElements(fContainer, refContainer, addedDelta);
+ addedDelta.setChildCount(fContainer.getChildren().length);
+
+ // select the new breakpoint
+ if (newBreakpoint != null)
+ appendModelDeltaToElement(addedDelta, newBreakpoint, IModelDelta.SELECT);
+
+ fireModelChanged(fInput, addedDelta, "setOrganizers - Insert added elements"); //$NON-NLS-1$
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.actions.breakpoints.IBreakpointFilterContentProvider#setFilterSelection(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ synchronized public void setFilterSelection(IStructuredSelection ss) {
+ ModelDelta delta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
+
+ Set existingBreakpoints = new HashSet(Arrays.asList(fContainer.getBreakpoints()));
+ IBreakpoint[] allBreakpoints = fBpManager.getBreakpoints();
+
+ for (int i = 0; i < allBreakpoints.length; ++i) {
+ boolean supported = supportsBreakpoint(ss, allBreakpoints[i]);
+ boolean contain = existingBreakpoints.contains(allBreakpoints[i]);
+
+ if (supported) {
+ if (!contain)
+ fContainer.addBreakpoint(allBreakpoints[i], delta);
+ } else {
+ if (contain)
+ fContainer.removeBreakpoint(allBreakpoints[i], delta);
+ }
+
+ }
+
+ fireModelChanged(fInput, delta, "setFilterSelection"); //$NON-NLS-1$
+ }
+
+ /**
+ * Helper method to add breakpoints to the given input.
+ *
+ * @param data the input to add the breakpoints
+ * @param breakpoints the breakpoints
+ */
+ synchronized void breakpointsAdded(IBreakpoint[] breakpoints) {
+ IBreakpoint[] filteredBreakpoints = filterBreakpoints(fInput, breakpoints);
+ ModelDelta delta = new ModelDelta(fInput, 0, IModelDelta.NO_CHANGE, -1);
+ for (int i = 0; i < filteredBreakpoints.length; ++i) {
+ fContainer.addBreakpoint(filteredBreakpoints[i], delta);
+ }
+ delta.setChildCount(fContainer.getChildren().length);
+
+ // select the breakpoint
+ if (filteredBreakpoints.length > 0) {
+ appendModelDeltaToElement(delta, filteredBreakpoints[0], IModelDelta.SELECT);
+ }
+
+ fireModelChanged(fInput, delta, "breakpointsAddedInput"); //$NON-NLS-1$
+ }
+
+ /**
+ * Helper method to remove breakpoints from a given input.
+ *
+ * @param data the input to add the breakpoints
+ * @param breakpoints the breakpoints
+ */
+ synchronized void breakpointsRemoved(IBreakpoint[] breakpoints) {
+ IBreakpoint[] filteredBreakpoints = filterBreakpoints(fInput, breakpoints);
+ ModelDelta delta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
+ for (int i = 0; i < filteredBreakpoints.length; ++i) {
+ fContainer.removeBreakpoint(filteredBreakpoints[i], delta);
+ }
+ fireModelChanged(fInput, delta, "breakpointsRemovedInput"); //$NON-NLS-1$
+ }
+
+ synchronized void breakpointsChanged(IBreakpoint[] breakpoints) {
+ IBreakpoint[] filteredBreakpoints = filterBreakpoints(fInput, breakpoints);
+
+ // If the change caused a breakpoint to be added (installed) or remove (un-installed) update accordingly.
+ List removed = new ArrayList();
+ List added = new ArrayList();
+ List filteredAsList = Arrays.asList(filteredBreakpoints);
+ for (int i = 0; i < breakpoints.length; i++) {
+ IBreakpoint bp = breakpoints[i];
+ boolean oldContainedBp = fContainer.contains(bp);
+ boolean newContained = filteredAsList.contains(bp);
+ if (oldContainedBp && !newContained) {
+ removed.add(bp);
+ } else if (!oldContainedBp && newContained) {
+ added.add(bp);
+ }
+ }
+ if (!added.isEmpty()) {
+ breakpointsAdded((IBreakpoint[]) added.toArray(new IBreakpoint[added.size()]));
+ }
+ if (!removed.isEmpty()) {
+ breakpointsRemoved((IBreakpoint[]) removed.toArray(new IBreakpoint[removed.size()]));
+ }
+
+ ModelDelta delta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
+ for (int i = 0; i < filteredBreakpoints.length; ++i)
+ appendModelDelta(fContainer, delta, IModelDelta.STATE, filteredBreakpoints[i]);
+ fireModelChanged(fInput, delta, "breakpointsChanged"); //$NON-NLS-1$
+ }
+
+
+ private void buildInstallDelta(ModelDelta delta, BreakpointContainer container) {
+ Object[] children = container.getChildren();
+ delta.setChildCount(children.length);
+ for (int i = 0; i < children.length; i++) {
+ ModelDelta childDelta = delta.addNode(children[i], i, IModelDelta.NO_CHANGE);
+ if (children[i] instanceof BreakpointContainer) {
+ buildInstallDelta(childDelta, (BreakpointContainer)children[i]);
+ } else if (children[i] instanceof IBreakpoint) {
+ childDelta.setFlags(IModelDelta.INSTALL);
+ }
+ }
+ }
+
/**
* Insert elements from the reference container to an existing container.
*
@@ -263,6 +372,32 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo }
}
+ private class InputDataMap extends LinkedHashMap {
+ private static final long serialVersionUID = 1L;
+
+ public InputDataMap() {
+ super(1, (float)0.75, true);
+ }
+
+ protected boolean removeEldestEntry(java.util.Map.Entry arg0) {
+ InputData data = (InputData)arg0.getValue();
+ return size() > getMaxInputsCache() && data.fProxies.isEmpty();
+ }
+ }
+
+ private class PresentationContextListener implements IPropertyChangeListener {
+ final private IPresentationContext fContext;
+
+ PresentationContextListener(IPresentationContext context) {
+ fContext = context;
+ fContext.addPropertyChangeListener(this);
+ }
+
+ public void propertyChange(PropertyChangeEvent event) {
+ contextPropertyChanged(fContext, event);
+ }
+ }
+
// debug flags
public static boolean DEBUG_BREAKPOINT_DELTAS = false;
@@ -274,18 +409,22 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo /**
* A map of input to info data cache
*/
- protected Map fInputToData;
+ final private Map fInputToData = Collections.synchronizedMap(new InputDataMap());
+
+ /**
+ * A map of presetnation context listeners.
+ */
+ final private Map fContextListeners = Collections.synchronizedMap(new HashMap());
/**
* The breakpoint manager.
*/
- protected IBreakpointManager fBpManager = null;
+ final private IBreakpointManager fBpManager;
/**
* Constructor.
*/
protected AbstractBreakpointManagerContentProvider() {
- fInputToData = new HashMap();
fBpManager = DebugPlugin.getDefault().getBreakpointManager();
}
@@ -308,6 +447,78 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo protected abstract boolean supportsBreakpoint(IStructuredSelection ss, IBreakpoint breakpoint);
/**
+ * Maximum number of breakpoint manager input objects that this provider
+ * will cache data for. This method is called once upon class creation
+ * when setting up the data cache. Sub-classes may override to provide
+ * a custom setting.
+ *
+ * @return Maximum data cache size
+ */
+ protected int getMaxInputsCache() {
+ return 2;
+ }
+
+ /**
+ * Handles the propety changed events in presentation contexts.
+ * Sub-classes may override to perform additional handling.
+ *
+ * @param context Presetnation context that was disposed.
+ */
+ protected void contextPropertyChanged(IPresentationContext context, PropertyChangeEvent event) {
+ if (IBreakpointUIConstants.PROP_BREAKPOINTS_ORGANIZERS.equals(event.getProperty())) {
+ IBreakpointOrganizer[] organizers = (IBreakpointOrganizer[])event.getNewValue();
+ InputData[] contextDatas = getContextInputDatas(context);
+ for (int i = 0; i < contextDatas.length; i++) {
+ contextDatas[i].setOrganizers(organizers);
+ }
+ }
+ else if (IBreakpointUIConstants.PROP_BREAKPOINTS_FILTER_SELECTION.equals(event.getProperty())) {
+ IStructuredSelection selection = (IStructuredSelection)event.getNewValue();
+ InputData[] contextDatas = getContextInputDatas(context);
+ for (int i = 0; i < contextDatas.length; i++) {
+ contextDatas[i].setFilterSelection(selection);
+ }
+ }
+ }
+
+ private InputData[] getContextInputDatas(IPresentationContext context) {
+ List list = new ArrayList(fInputToData.size());
+ synchronized (fInputToData) {
+ for (Iterator itr = fInputToData.values().iterator(); itr.hasNext();) {
+ InputData data = (InputData)itr.next();
+ if (context.equals( data.fInput.getContext() )) {
+ list.add(data);
+ }
+ }
+ }
+ return (InputData[]) list.toArray(new InputData[list.size()]);
+ }
+
+ /**
+ * Handles the event when a presentation context is dispoed.
+ * Sub-classes may override to perform additional cleanup.
+ *
+ * @param context Presetnation context that was disposed.
+ */
+ protected void contextDisposed(IPresentationContext context) {
+ synchronized (fInputToData) {
+ for (Iterator itr = fInputToData.entrySet().iterator(); itr.hasNext();) {
+ Map.Entry entry = (Map.Entry)itr.next();
+ IPresentationContext entryContext = ((AbstractBreakpointManagerInput)entry.getKey()).getContext();
+ if (context.equals(entryContext)) {
+ itr.remove();
+ }
+ }
+ }
+
+ // Remove the context listener.
+ PresentationContextListener listener = (PresentationContextListener)fContextListeners.remove(context);
+ if (listener != null) {
+ context.removePropertyChangeListener(listener);
+ }
+ }
+
+ /**
* Register the breakpoint manager input with this content provider.
*
* @param input the breakpoint manager input to register.
@@ -316,18 +527,12 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo * @param selectionFilter the selection filter, can be <code>null</code>.
* @param comparator the element comparator.
*/
- public void registerModelProxy(AbstractBreakpointManagerInput input, AbstractModelProxy proxy,
- IBreakpointOrganizer[] organizers, IStructuredSelection selectionFilter, ElementComparator comparator) {
-
- if (fInputToData.size() == 0)
+ public void registerModelProxy(AbstractBreakpointManagerInput input, AbstractModelProxy proxy) {
+ if (fInputToData.isEmpty()) {
fBpManager.addBreakpointListener(this);
+ }
- InputData data = new InputData(input, proxy, selectionFilter, comparator);
-
- // cache the input and it's data
- fInputToData.put(input, data);
-
- data.setOrganizers(organizers);
+ getInputData(input).proxyInstalled(proxy);
}
/**
@@ -335,23 +540,35 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo *
* @param input the breakpoint manager input to unregister.
*/
- public void unregisterModelProxy(AbstractBreakpointManagerInput input) {
- InputData data = (InputData) fInputToData.remove(input);
- Assert.isNotNull(data);
+ public void unregisterModelProxy(AbstractBreakpointManagerInput input, AbstractModelProxy proxy) {
+ getInputData(input).proxyDisposed(proxy);
- if (fInputToData.size() == 0)
+ if (fInputToData.isEmpty()) {
fBpManager.removeBreakpointListener(this);
+ }
}
-
- /**
- * Returns the input data from the cache.
- *
- * @param input the input.
- * @return the input data cache, can be <code>null</code>.
- */
- protected InputData getInputData(Object input) {
- return (InputData) fInputToData.get(input);
+ private InputData getInputData(AbstractBreakpointManagerInput input) {
+ InputData data = null;
+ synchronized (fInputToData) {
+ data = (InputData)fInputToData.get(input);
+ if (data == null) {
+ data = new InputData(input);
+ fInputToData.put(input, data);
+ }
+ }
+
+ // Also make sure that we're listening to the presentation context properties
+ synchronized (fContextListeners) {
+ IPresentationContext context = input.getContext();
+ if ( !Boolean.TRUE.equals(context.getProperty(IPresentationContext.PROPERTY_DISPOSED)) &&
+ !fContextListeners.containsKey(context) )
+ {
+ fContextListeners.put(context, new PresentationContextListener(context));
+ }
+ }
+
+ return data;
}
/**
@@ -360,43 +577,21 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo * @param input the input.
* @return the model proxy.
*/
- public AbstractModelProxy getModelProxy(Object input) {
+ private List getModelProxies(AbstractBreakpointManagerInput input) {
InputData data = getInputData(input);
- return data != null ? data.fProxy : null;
+ return data != null ? data.fProxies : null;
}
-// /**
-// * Returns the root breakpoint container for the input.
-// *
-// * @param input the input.
-// * @return the breakpoint container.
-// */
-// public BreakpointContainer getBreakpointContainer(Object input) {
-// InputData data = getInputData(input);
-// return data != null ? data.fContainer : null;
-// }
-//
-// /**
-// * Sets the breakpoint input root container.
-// *
-// * @param input the input.
-// * @param container the breakpoint container.
-// */
-// public void setBreakpointContainer(Object input, BreakpointContainer container) {
-// InputData data = getInputData(input);
-// if (data != null) {
-// data.fContainer = container;
-// }
-// }
-
/**
* Returns the selection filter for the input.
*
* @param input the selection.
*/
- public IStructuredSelection getSelectionFilter(Object input) {
- InputData data = getInputData(input);
- return data != null ? data.fSelectionFilter : null;
+ protected IStructuredSelection getSelectionFilter(Object input) {
+ if (input instanceof AbstractBreakpointManagerInput) {
+ return (IStructuredSelection) ((AbstractBreakpointManagerInput)input).getContext().getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_FILTER_SELECTION);
+ }
+ return null;
}
/**
@@ -406,13 +601,15 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo * @param delta the model delta.
* @param debugReason the debug string.
*/
- public void fireModelChanged(Object input, IModelDelta delta, String debugReason) {
- AbstractModelProxy proxy = getModelProxy(input);
- if (proxy != null) {
- if (DEBUG_BREAKPOINT_DELTAS)
- System.out.println("FIRE BREAKPOINT DELTA (" + debugReason + ")\n" + delta.toString()); //$NON-NLS-1$ //$NON-NLS-2$
-
- proxy.fireModelChanged(delta);
+ protected void fireModelChanged(AbstractBreakpointManagerInput input, IModelDelta delta, String debugReason) {
+ List proxies = getModelProxies(input);
+
+ if (DEBUG_BREAKPOINT_DELTAS && proxies.size() > 0) {
+ System.out.println("FIRE BREAKPOINT DELTA (" + debugReason + ")\n" + delta.toString()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ for (int i = 0; i < proxies.size(); i++) {
+ ((AbstractModelProxy)proxies.get(i)).fireModelChanged(delta);
}
}
@@ -427,10 +624,11 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
- InputData data = getInputData(element);
- if (data != null && data.fContainer != null)
- return data.fContainer.getChildren().length;
-
+ Object input = monitor.getViewerInput();
+ if (input instanceof AbstractBreakpointManagerInput) {
+ AbstractBreakpointManagerInput bpManagerInput = (AbstractBreakpointManagerInput)input;
+ return getInputData(bpManagerInput).fContainer.getChildren().length;
+ }
return 0;
}
@@ -438,166 +636,47 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
- InputData data = getInputData(parent);
- if (data != null && data.fContainer != null)
- return getElements(data.fContainer.getChildren(), index, length);
+ Object input = monitor.getViewerInput();
+ if (input instanceof AbstractBreakpointManagerInput) {
+ AbstractBreakpointManagerInput bpManagerInput = (AbstractBreakpointManagerInput)input;
+ Object[] children = getInputData(bpManagerInput).fContainer.getChildren();
+ return getElements(children, index, length);
+ }
return EMPTY;
}
/*
* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointOrganizerListener#setOrganizers(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointOrganizer[])
- */
- synchronized public void setOrganizers(Object input, IPresentationContext context, IBreakpointOrganizer[] organizers) {
- InputData data = getInputData(input);
- if (data != null)
- data.setOrganizers(organizers);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.breakpoints.IBreakpointFilterContentProvider#setFilterSelection(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.jface.viewers.IStructuredSelection)
- */
- synchronized public void setFilterSelection(Object input, IPresentationContext context, IStructuredSelection ss) {
- InputData data = getInputData(input);
- if (data == null) return;
-
- data.fSelectionFilter = ss;
-
- BreakpointContainer container = data.fContainer;
- if (container != null) {
- ModelDelta delta = new ModelDelta(input, IModelDelta.NO_CHANGE);
-
- Set existingBreakpoints = new HashSet(Arrays.asList(container.getBreakpoints()));
- IBreakpoint[] allBreakpoints = fBpManager.getBreakpoints();
-
- for (int i = 0; i < allBreakpoints.length; ++i) {
- boolean supported = supportsBreakpoint(ss, allBreakpoints[i]);
- boolean contain = existingBreakpoints.contains(allBreakpoints[i]);
-
- if (supported) {
- if (!contain)
- container.addBreakpoint(allBreakpoints[i], delta);
- } else {
- if (contain)
- container.removeBreakpoint(allBreakpoints[i], delta);
- }
-
- }
-
- fireModelChanged(input, delta, "setFilterSelection"); //$NON-NLS-1$
- }
- }
-
- /**
- * Helper method to add breakpoints to the given input.
- *
- * @param data the input to add the breakpoints
- * @param breakpoints the breakpoints
- */
- private void breakpointsAddedInput(InputData data, IBreakpoint[] breakpoints) {
- if (data == null || data.fContainer == null) {
- return;
- }
- IBreakpoint[] filteredBreakpoints = filterBreakpoints(data.fInput, breakpoints);
- ModelDelta delta = new ModelDelta(data.fInput, 0, IModelDelta.NO_CHANGE, -1);
- for (int i = 0; i < filteredBreakpoints.length; ++i) {
- data.fContainer.addBreakpoint(filteredBreakpoints[i], delta);
- }
- delta.setChildCount(data.fContainer.getChildren().length);
-
- // select the breakpoint
- if (filteredBreakpoints.length > 0) {
- appendModelDeltaToElement(delta, filteredBreakpoints[0], IModelDelta.SELECT);
- }
-
- fireModelChanged(data.fInput, delta, "breakpointsAddedInput"); //$NON-NLS-1$
- }
- /*
- * (non-Javadoc)
* @see org.eclipse.debug.core.IBreakpointsListener#breakpointsAdded(org.eclipse.debug.core.model.IBreakpoint[])
*/
- synchronized public void breakpointsAdded(IBreakpoint[] breakpoints) {
- Iterator it = fInputToData.keySet().iterator();
- while (it.hasNext()) {
- AbstractBreakpointManagerInput input = (AbstractBreakpointManagerInput) it.next();
- InputData data = getInputData(input);
- breakpointsAddedInput(data, breakpoints);
+ public void breakpointsAdded(IBreakpoint[] breakpoints) {
+ InputData[] datas = (InputData[])fInputToData.values().toArray(new InputData[0]);
+ for (int i = 0; i < datas.length; i++) {
+ datas[i].breakpointsAdded(breakpoints);
}
}
- /**
- * Helper method to remove breakpoints from a given input.
- *
- * @param data the input to add the breakpoints
- * @param breakpoints the breakpoints
- */
- private void breakpointsRemovedInput(InputData data, IBreakpoint[] breakpoints) {
- if (data == null || data.fContainer == null) {
- return;
- }
-
- IBreakpoint[] filteredBreakpoints = filterBreakpoints(data.fInput, breakpoints);
- ModelDelta delta = new ModelDelta(data.fInput, IModelDelta.NO_CHANGE);
- for (int i = 0; i < filteredBreakpoints.length; ++i) {
- data.fContainer.removeBreakpoint(filteredBreakpoints[i], delta);
- }
- fireModelChanged(data.fInput, delta, "breakpointsRemovedInput"); //$NON-NLS-1$
-
- }
/*
* (non-Javadoc)
* @see org.eclipse.debug.core.IBreakpointsListener#breakpointsRemoved(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
*/
- synchronized public void breakpointsRemoved(final IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
- Iterator it = fInputToData.keySet().iterator();
- while (it.hasNext()) {
- AbstractBreakpointManagerInput input = (AbstractBreakpointManagerInput) it.next();
- InputData data = getInputData(input);
- breakpointsRemovedInput(data, breakpoints);
- }
+ public void breakpointsRemoved(final IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
+ InputData[] datas = (InputData[])fInputToData.values().toArray(new InputData[0]);
+ for (int i = 0; i < datas.length; i++) {
+ datas[i].breakpointsRemoved(breakpoints);
+ }
}
/*
* (non-Javadoc)
* @see org.eclipse.debug.core.IBreakpointsListener#breakpointsChanged(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
*/
- synchronized public void breakpointsChanged(final IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
- Iterator it = fInputToData.keySet().iterator();
- while (it.hasNext()) {
- AbstractBreakpointManagerInput input = (AbstractBreakpointManagerInput) it.next();
- InputData data = getInputData(input);
- if (data == null || data.fContainer == null) continue;
-
- IBreakpoint[] filteredBreakpoints = filterBreakpoints(input, breakpoints);
-
- // If the change caused a breakpoint to be added (installed) or remove (un-installed) update accordingly.
- List removed = new ArrayList();
- List added = new ArrayList();
- List filteredAsList = Arrays.asList(filteredBreakpoints);
- for (int i = 0; i < breakpoints.length; i++) {
- IBreakpoint bp = breakpoints[i];
- boolean oldContainedBp = data.fContainer.contains(bp);
- boolean newContained = filteredAsList.contains(bp);
- if (oldContainedBp && !newContained) {
- removed.add(bp);
- } else if (!oldContainedBp && newContained) {
- added.add(bp);
- }
- }
- if (!added.isEmpty()) {
- breakpointsAddedInput(data, (IBreakpoint[]) added.toArray(new IBreakpoint[added.size()]));
- }
- if (!removed.isEmpty()) {
- breakpointsRemovedInput(data, (IBreakpoint[]) removed.toArray(new IBreakpoint[removed.size()]));
- }
-
- ModelDelta delta = new ModelDelta(input, IModelDelta.NO_CHANGE);
- for (int i = 0; i < filteredBreakpoints.length; ++i)
- appendModelDelta(data.fContainer, delta, IModelDelta.STATE, filteredBreakpoints[i]);
- fireModelChanged(input, delta, "breakpointsChanged"); //$NON-NLS-1$
- }
+ public void breakpointsChanged(final IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
+ InputData[] datas = (InputData[])fInputToData.values().toArray(new InputData[0]);
+ for (int i = 0; i < datas.length; i++) {
+ datas[i].breakpointsChanged(breakpoints);
+ }
}
/**
* Appends the model delta flags to child containers that contains the breakpoint.
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java index d4e94bba1..d7346537c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java @@ -165,16 +165,6 @@ public class InternalTreeModelViewer extends TreeViewer private boolean fNotifyUnmap = true; /** - * Flag indicating whether the viewer is a pop-up viewer. A pop-up viewer - * is transient and does not automatically expand and select elements up - * when requested by the model. It also does not dispose the presentation - * context when its control is disposed. - * - * @since 3.5 - */ - private boolean fIsPopup; - - /** * Persist column sizes when they change. * * @since 3.2 @@ -1019,8 +1009,9 @@ public class InternalTreeModelViewer extends TreeViewer setContentProvider(createContentProvider()); setLabelProvider(createLabelProvider()); - fIsPopup = (style & SWT.POP_UP) != 0; - if (fIsPopup) { + // A pop-up viewer is transient and does not automatically expand + // and select elements up when requested by the model + if ((style & SWT.POP_UP) != 0) { ((ITreeModelContentProvider)getContentProvider()).setModelDeltaMask( ~ITreeModelContentProvider.ALL_MODEL_DELTA_FLAGS & ~ITreeModelContentProvider.CONTROL_MODEL_DELTA_FLAGS); } @@ -1146,9 +1137,6 @@ public class InternalTreeModelViewer extends TreeViewer } fCellModifier.dispose(); - if (!fIsPopup) { - fContext.dispose(); - } super.handleDispose(event); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java index c0c229bed..8dfc928da 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java @@ -951,7 +951,6 @@ public class InternalVirtualTreeModelViewer extends Viewer if (fColumnPresentation != null) { fColumnPresentation.dispose(); } - fContext.dispose(); if (fContentProvider != null) { fContentProvider.dispose(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java index 780d18a6e..f8ef91019 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java @@ -22,13 +22,23 @@ import org.eclipse.jface.util.IPropertyChangeListener; * @since 3.2 */ public interface IPresentationContext { - + /** * Property name used for property change notification when the columns * in a presentation context change. */ public static final String PROPERTY_COLUMNS = "PROPERTY_COLUMNS"; //$NON-NLS-1$ - + + /** + * Property indicating whether the presentation context is disposed. + * It is set to <code>Boolean.TRUE</code> after the presentation context + * is disposed. This property may be <code>null</code>, which indicates + * that context is not yet disposed. + * + * @since 3.6 + */ + public static final String PROPERTY_DISPOSED = "PROPERTY_DISPOSED"; //$NON-NLS-1$ + /** * Returns identifiers of the visible columns in the order * labels should be provided, or <code>null</code> if columns diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java index 22c752441..b79b67859 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java @@ -98,8 +98,9 @@ public class PresentationContext implements IPresentationContext { * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext#dispose() */ public void dispose() { + fProperties.clear(); + setProperty(PROPERTY_DISPOSED, Boolean.TRUE); fListeners.clear(); - fProperties.clear(); } /* (non-Javadoc) diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java index d926571eb..29a72545c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java @@ -10,16 +10,12 @@ *****************************************************************/
package org.eclipse.debug.internal.ui.viewers.update;
-import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
-import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointUIConstants;
import org.eclipse.debug.internal.ui.elements.adapters.AbstractBreakpointManagerInput;
import org.eclipse.debug.internal.ui.model.elements.AbstractBreakpointManagerContentProvider;
import org.eclipse.debug.internal.ui.viewers.model.ViewerAdapterService;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
-import org.eclipse.debug.internal.ui.views.breakpoints.ElementComparator;
-import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.Viewer;
/**
@@ -39,21 +35,6 @@ public class BreakpointManagerProxy extends AbstractModelProxy { protected AbstractBreakpointManagerInput fInput;
/**
- * The root breakpoint organizer for this model proxy
- */
- protected IBreakpointOrganizer[] fOrganizers;
-
- /**
- * The element comparator for this model proxy
- */
- protected ElementComparator fComparator;
-
- /**
- * The initial selection for this model proxy
- */
- protected IStructuredSelection fSelection;
-
- /**
* Constructor.
*
* @param input the breakpoint manager input
@@ -69,9 +50,6 @@ public class BreakpointManagerProxy extends AbstractModelProxy { IElementContentProvider provider = ViewerAdapterService.getContentProvider(input);
if (provider instanceof AbstractBreakpointManagerContentProvider) {
fProvider = (AbstractBreakpointManagerContentProvider) provider;
- fOrganizers = (IBreakpointOrganizer[]) context.getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_ORGANIZERS);
- fSelection = (IStructuredSelection) context.getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_FILTER_SELECTION);
- fComparator = (ElementComparator) context.getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_ELEMENT_COMPARATOR);
}
}
}
@@ -83,7 +61,7 @@ public class BreakpointManagerProxy extends AbstractModelProxy { public void installed(Viewer viewer) {
super.installed(viewer);
if (fProvider != null) {
- fProvider.registerModelProxy(fInput, this, fOrganizers, fSelection, fComparator);
+ fProvider.registerModelProxy(fInput, this);
}
}
@@ -93,7 +71,7 @@ public class BreakpointManagerProxy extends AbstractModelProxy { */
public synchronized void dispose() {
if (fProvider != null) {
- fProvider.unregisterModelProxy(fInput);
+ fProvider.unregisterModelProxy(fInput, this);
}
super.dispose();
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java index 9d61e00aa..a032a73bc 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java @@ -36,8 +36,6 @@ import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganize import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointUIConstants; import org.eclipse.debug.internal.ui.elements.adapters.DefaultBreakpointManagerInput; import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants; -import org.eclipse.debug.internal.ui.viewers.model.ViewerAdapterService; -import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider; import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputUpdate; import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer; @@ -542,13 +540,6 @@ public class BreakpointsView extends VariablesView implements ISelectionListener if (viewer != null) { // update the presentation context organizer viewer.getPresentationContext().setProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_ORGANIZERS, fOrganizers); - - // notify input the organizer has changed - Object input = viewer.getInput(); - IElementContentProvider provider = ViewerAdapterService.getContentProvider(input); - if (provider instanceof IBreakpointOrganizerListener) { - ((IBreakpointOrganizerListener) provider).setOrganizers(input, viewer.getPresentationContext(), organizers); - } } } @@ -564,13 +555,6 @@ public class BreakpointsView extends VariablesView implements ISelectionListener if (viewer != null) { // update the presentation context filter viewer.getPresentationContext().setProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_FILTER_SELECTION, fFilterSelection); - - // notify input the filter has changed - Object input = viewer.getInput(); - IElementContentProvider provider = ViewerAdapterService.getContentProvider(input); - if (provider instanceof IBreakpointFilterListener) { - ((IBreakpointFilterListener) provider).setFilterSelection(input, viewer.getPresentationContext(), ss); - } } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/IBreakpointFilterListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/IBreakpointFilterListener.java deleted file mode 100644 index b9a509ad9..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/IBreakpointFilterListener.java +++ /dev/null @@ -1,32 +0,0 @@ -/*****************************************************************
- * Copyright (c) 2009 Texas Instruments 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
- *****************************************************************/
-package org.eclipse.debug.internal.ui.views.breakpoints;
-
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-/**
- * This interface can be implemented by a breakpoint manager content provider to provides filtering support.
- *
- * @since 3.6
- */
-public interface IBreakpointFilterListener {
-
- /**
- * Sets the filter selection for the given input, the selection is the new selection of the debug view.
- *
- * @param input the view input.
- * @param context the presentation context.
- * @param ss the selection.
- */
- void setFilterSelection(Object input, IPresentationContext context, IStructuredSelection ss);
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/IBreakpointOrganizerListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/IBreakpointOrganizerListener.java deleted file mode 100644 index 189a58028..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/IBreakpointOrganizerListener.java +++ /dev/null @@ -1,31 +0,0 @@ -/*****************************************************************
- * Copyright (c) 2009 Texas Instruments 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
- *****************************************************************/
-package org.eclipse.debug.internal.ui.views.breakpoints;
-
-import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-
-/**
- * This interface can be implements by a breakpoint manager provider.
- *
- * @since 3.6
- */
-public interface IBreakpointOrganizerListener {
-
- /**
- * Set the breakpoint organizers for the given input.
- *
- * @param input the view input.
- * @param context the presentation context.
- * @param organizers the new organizers, can be <code>null</code>.
- */
- void setOrganizers(Object input, IPresentationContext context, IBreakpointOrganizer[] organizers);
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetCategory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetCategory.java index 99293d41f..5b3c899b2 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetCategory.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetCategory.java @@ -133,5 +133,9 @@ public class WorkingSetCategory extends PlatformObject implements IWorkbenchAdap private boolean isDefault() { return fWorkingSet.equals(BreakpointSetOrganizer.getDefaultWorkingSet()); } + + public String toString() { + return fWorkingSet.getName(); + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java index 327dfc817..b17575779 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java @@ -63,6 +63,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedList import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDeltaVisitor; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate; import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener; import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer; @@ -173,6 +174,8 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi */ private IDebugModelPresentation fPresentation = null; + private IPresentationContext fPresentationContext; + private EditLaunchConfigurationAction fEditConfigAction = null; private AddToFavoritesAction fAddToFavoritesAction = null; private EditSourceLookupPathAction fEditSourceAction = null; @@ -771,9 +774,10 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi */ protected Viewer createViewer(Composite parent) { fPresentation = new DelegatingModelPresentation(); + fPresentationContext = new DebugModelPresentationContext(IDebugUIConstants.ID_DEBUG_VIEW, fPresentation); TreeModelViewer viewer = new TreeModelViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.VIRTUAL, - new DebugModelPresentationContext(IDebugUIConstants.ID_DEBUG_VIEW, fPresentation)); + fPresentationContext); viewer.addSelectionChangedListener(fTreeViewerSelectionChangedListener); viewer.getControl().addKeyListener(new KeyAdapter() { @@ -992,6 +996,9 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi viewer.removeSelectionChangedListener(fTreeViewerSelectionChangedListener); ((TreeModelViewer)viewer).removeViewerUpdateListener(this); } + if (fPresentationContext != null) { + fPresentationContext.dispose(); + } IWorkbenchPage page = getSite().getPage(); page.removePartListener((IPartListener2) this); IWorkbenchWindow window = getSite().getWorkbenchWindow(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java index 4862fdeb2..a54b69229 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java @@ -32,6 +32,7 @@ import org.eclipse.debug.internal.ui.DebugUIMessages; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.memory.provisional.MemoryViewPresentationContext; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.debug.ui.contexts.DebugContextEvent; @@ -74,6 +75,7 @@ public class MemoryBlocksTreeViewPane implements ISelectionListener, ISelectionC public static final String PANE_ID = DebugUIPlugin.getUniqueIdentifier() + ".MemoryView.MemoryBlocksTreeViewPane"; //$NON-NLS-1$ private IViewPart fParent; + private IPresentationContext fPresentationContext; private MemoryViewTreeViewer fTreeViewer; protected IMemoryBlockRetrieval fRetrieval; private ViewPaneSelectionProvider fSelectionProvider; @@ -291,8 +293,8 @@ public class MemoryBlocksTreeViewPane implements ISelectionListener, ISelectionC fLabel = label; IMemoryRenderingSite site = getMemoryRenderingSite(); - MemoryViewPresentationContext presentationContext = new MemoryViewPresentationContext(site, this, null); - fTreeViewer = new MemoryViewTreeViewer(parent, style, presentationContext); + fPresentationContext = new MemoryViewPresentationContext(site, this, null); + fTreeViewer = new MemoryViewTreeViewer(parent, style, fPresentationContext); IAdaptable context = DebugUITools.getDebugContext(); IMemoryBlockRetrieval retrieval = MemoryViewUtil.getMemoryBlockRetrieval(context); @@ -367,6 +369,7 @@ public class MemoryBlocksTreeViewPane implements ISelectionListener, ISelectionC fAddMemoryBlockAction.dispose(); DebugUITools.getDebugContextManager().getContextService(fParent.getSite().getWorkbenchWindow()).removeDebugContextListener(fDebugContextListener); fEvtHandler.dispose(); + fPresentationContext.dispose(); } /* (non-Javadoc) diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java index b44d3ca08..d43f4c76f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java @@ -358,6 +358,11 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis private SelectionProviderWrapper fSelectionProvider; /** + * Presentation context for this view. + */ + private IPresentationContext fPresentationContext; + + /** * Remove myself as a selection listener * and preference change listener. * @@ -374,6 +379,10 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis viewer.removeModelChangedListener(this); viewer.removeViewerUpdateListener(this); } + if (fPresentationContext != null) { + fPresentationContext.dispose(); + fPresentationContext = null; + } if (fDetailPane != null) fDetailPane.dispose(); fInputService.dispose(); fSelectionProvider.dispose(); @@ -581,8 +590,8 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis protected TreeModelViewer createTreeViewer(Composite parent) { int style = getViewerStyle(); - final TreeModelViewer variablesViewer = new TreeModelViewer(parent, style, - new DebugModelPresentationContext(getPresentationContextId(), getModelPresentation())); + fPresentationContext = new DebugModelPresentationContext(getPresentationContextId(), fModelPresentation); + final TreeModelViewer variablesViewer = new TreeModelViewer(parent, style, fPresentationContext); variablesViewer.getControl().addFocusListener(new FocusAdapter() { public void focusGained(FocusEvent e) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java index 2144d26a0..3c1eaa5fe 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java @@ -64,6 +64,7 @@ public class InspectPopupDialog extends DebugPopup { private static final int MIN_WIDTH = 300; private static final int MIN_HEIGHT = 250; + private IPresentationContext fContext; private TreeModelViewer fViewer; private SashForm fSashForm; private Composite fDetailPaneComposite; @@ -100,17 +101,17 @@ public class InspectPopupDialog extends DebugPopup { fSashForm.setLayoutData(new GridData(GridData.FILL_BOTH)); VariablesView view = getViewToEmulate(); - IPresentationContext context = new PresentationContext(IDebugUIConstants.ID_VARIABLE_VIEW); + fContext = new PresentationContext(IDebugUIConstants.ID_VARIABLE_VIEW); if (view != null) { // copy over properties IPresentationContext copy = ((TreeModelViewer)view.getViewer()).getPresentationContext(); String[] properties = copy.getProperties(); for (int i = 0; i < properties.length; i++) { String key = properties[i]; - context.setProperty(key, copy.getProperty(key)); + fContext.setProperty(key, copy.getProperty(key)); } } - fViewer = new TreeModelViewer(fSashForm, SWT.NO_TRIM | SWT.MULTI | SWT.VIRTUAL, context); + fViewer = new TreeModelViewer(fSashForm, SWT.NO_TRIM | SWT.MULTI | SWT.VIRTUAL, fContext); fViewer.setAutoExpandLevel(1); fDetailPaneComposite = SWTFactory.createComposite(fSashForm, 1, 1, GridData.FILL_BOTH); @@ -253,6 +254,7 @@ public class InspectPopupDialog extends DebugPopup { fExpression.dispose(); } fDetailPane.dispose(); + fContext.dispose(); return super.close(); } |