void proxyInstalled(BreakpointManagerProxy proxy) { ModelDelta rootDelta = null; synchronized(this) { fProxies.add(proxy); // Generate an install delta rootDelta = new ModelDelta(fInput, 0, IModelDelta.NO_CHANGE, -1); buildInstallDelta(rootDelta, fContainer); if (DebugUIPlugin.DEBUG_BREAKPOINT_DELTAS) { DebugUIPlugin.trace("PROXY INSTALLED (" + proxy + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ } proxy.postModelChanged(rootDelta, false); } }
/** * Recursive function to build the model delta to install breakpoint * model proxies for all breakpoints and breakpoint containers. * * @param delta Delta node to build on * @param container Container element to build delta for. */ 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) { childDelta.setFlags(IModelDelta.INSTALL); buildInstallDelta(childDelta, (BreakpointContainer)children[i]); } else if (children[i] instanceof IBreakpoint) { childDelta.setFlags(IModelDelta.INSTALL); } } }