void (final GuiEditor editor, final RadComponent component) { final RadContainer root = (RadContainer)getRoot(component); if (root == null) return; ComponentTreeBuilder builder = DesignerToolWindowManager.getInstance(editor).getComponentTreeBuilder(); // this can return null if the click to select the control also requested to grab the focus - // the component tree will be instantiated after the event has been processed completely if (builder != null) { builder.beginUpdateSelection(); } try { clearSelection(root); selectComponent(editor, component); editor.setSelectionAnchor(component); editor.scrollComponentInView(component); } finally { if (builder != null) { builder.endUpdateSelection(); } } }