List<Object> (@NotNull DataContext dataContext) { if (updated && !isFixedComponent) return null; NavBarModelExtension ownerExtension = null; PsiElement psiElement = null; for (NavBarModelExtension extension : NavBarModelExtension.EP_NAME.getExtensionList()) { psiElement = extension.getLeafElement(dataContext); if (psiElement != null) { ownerExtension = extension; break; } } if (psiElement == null) { psiElement = CommonDataKeys.PSI_FILE.getData(dataContext); } if (psiElement == null) { psiElement = findFileSystemItem( CommonDataKeys.PROJECT.getData(dataContext), CommonDataKeys.VIRTUAL_FILE.getData(dataContext)); } if (ownerExtension == null) { psiElement = normalize(psiElement); } // Save to a local variable in order to avoid OutOfBounds exception while working with a volatile property final List<Object> model = myModel; if (!model.isEmpty() && Objects.equals(get(model, model.size() - 1), psiElement) && !myChanged) return null; if (psiElement != null && psiElement.isValid()) { return createModel(psiElement, dataContext, ownerExtension); } else { if (UISettings.getInstance().getShowNavigationBar() && !model.isEmpty()) return null; Object root = calculateRoot(dataContext); if (root != null) { return Collections.singletonList(root); } } return null; }