private void setStructureViewSelection(@NotNull final String propertyName) {
    if (myStructureViewComponent.isDisposed()) {
      return;
    }
    JTree tree = myStructureViewComponent.getTree();
    if (tree == null) {
      return;
    }

    Object root = tree.getModel().getRoot();
    if (AbstractTreeUi.isLoadingChildrenFor(root)) {
      mySelectionChangeAlarm.cancelAllRequests();
      mySelectionChangeAlarm.addRequest(
          new Runnable() {
            @Override
            public void run() {
              mySelectionChangeAlarm.cancelAllRequests();
              setStructureViewSelection(propertyName);
            }
          },
          500);
      return;
    }

    Stack<TreeElement> toCheck = ContainerUtilRt.newStack();
    toCheck.push(myStructureViewComponent.getTreeModel().getRoot());

    while (!toCheck.isEmpty()) {
      TreeElement element = toCheck.pop();
      PsiElement value =
          element instanceof ResourceBundlePropertyStructureViewElement
              ? ((ResourceBundlePropertyStructureViewElement) element).getValue()
              : null;
      if (value instanceof IProperty
          && propertyName.equals(((IProperty) value).getUnescapedKey())) {
        myStructureViewComponent.select(value, true);
        selectionChanged();
        return;
      } else {
        for (TreeElement treeElement : element.getChildren()) {
          toCheck.push(treeElement);
        }
      }
    }
  }