FrameworkDirectoryNode (@NotNull VirtualFile dir, @NotNull Map<VirtualFile, FrameworkDirectoryNode> nodes) { final FrameworkDirectoryNode node = nodes.get(dir); if (node != null) { return node; } final FrameworkDirectoryNode newNode = new FrameworkDirectoryNode(dir); nodes.put(dir, newNode); final VirtualFile parent = dir.getParent(); if (parent != null) { createDirectoryNodes(parent, nodes).add(newNode); } return newNode; }