void (DataContext dataContext, Object object) { try { NavBarModel model = myPanel.getModel(); if (dataContext != null) { Component parent = UIUtil.findUltimateParent(PlatformCoreDataKeys.CONTEXT_COMPONENT.getData(dataContext)); if (parent == null) return; Project project = parent instanceof IdeFrame ? ((IdeFrame)parent).getProject() : null; if (myPanel.getProject() != project || myPanel.isNodePopupActive()) { requestModelUpdate(null, myPanel.getContextObject(), true); return; } Window window = SwingUtilities.getWindowAncestor(myPanel); if (window != null && !window.isFocused()) { model.updateModelAsync(DataManager.getInstance().getDataContext(myPanel), null); } else { model.updateModelAsync(dataContext, null); } } else { model.updateModel(object); } queueRebuildUi(); } finally { myModelUpdating.set(false); } }