boolean () { myModel.revalidate(); if (myList.size() == myModel.size()) { int index = 0; for (NavBarItem eachLabel : myList) { Object eachElement = myModel.get(index); if (eachLabel.getObject() == null || !eachLabel.getObject().equals(eachElement)) { return true; } if (eachLabel.getObject() instanceof PsiFile && myForcedFileUpdateQueue.remove(eachLabel.getObject())) { return true; } if (!StringUtil.equals(eachLabel.getText(), getPresentation().getPresentableText(eachElement, false))) { return true; } if (!Objects.equals(eachLabel.getIcon(), getPresentation().getIcon(eachElement))) { return true; } SimpleTextAttributes modelAttributes1 = myPresentation.getTextAttributes(eachElement, true); SimpleTextAttributes modelAttributes2 = myPresentation.getTextAttributes(eachElement, false); SimpleTextAttributes labelAttributes = eachLabel.getAttributes(); if (!modelAttributes1.toTextAttributes().equals(labelAttributes.toTextAttributes()) && !modelAttributes2.toTextAttributes().equals(labelAttributes.toTextAttributes())) { return true; } index++; } return false; } else { return true; } }