diff options
author | Pawel Piech | 2010-05-06 16:49:40 +0000 |
---|---|---|
committer | Pawel Piech | 2010-05-06 16:49:40 +0000 |
commit | 4c86aa38cee434c4b04693565ceebbe40b23f104 (patch) | |
tree | 7a3d80275a16332c153c24679bd7d0e074e29b7e /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints | |
parent | 4dd4658d22ada27f50ec555287ebf0ca30382270 (diff) | |
download | eclipse.platform.debug-4c86aa38cee434c4b04693565ceebbe40b23f104.tar.gz eclipse.platform.debug-4c86aa38cee434c4b04693565ceebbe40b23f104.tar.xz eclipse.platform.debug-4c86aa38cee434c4b04693565ceebbe40b23f104.zip |
Bug 305177 - import breakpoints does not refresh view properly
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java index caf556e3b..81bd9bff8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java @@ -398,6 +398,7 @@ public class BreakpointContainer extends ElementContentProvider implements IAdap List breakpoints = destContainer.fBreakpoints; destContainerDelta.addNode(breakpoint, index/*breakpoints.indexOf(breakpoint)*/, IModelDelta.ADDED|IModelDelta.INSTALL, 0); + destContainerDelta.setFlags(destContainerDelta.getFlags() | IModelDelta.EXPAND); // add the breakpoints to the parent containers. updateSelfAndAncestorsBreakpointCache(destContainer.getParent(), breakpoints, true); @@ -539,6 +540,19 @@ public class BreakpointContainer extends ElementContentProvider implements IAdap } return getContainers(); } + + /** + * Returns the index of the given child element (breakpoint or container. + * + * @param child Child to calculate index of. + * @return index of child + */ + public int getChildIndex(Object child) { + if (fChildContainers.isEmpty()) { + return fBreakpoints.indexOf(child); + } + return fChildContainers.indexOf(child); + } /** * Returns the containers nested in this container, possibly empty. |