void (String text, GroupingElement group, List<? extends SimpleErrorData> children) { final List<NavigatableMessageElement> elements = new ArrayList<>(); for (SimpleErrorData child : children) { elements.add(new MyNavigatableWithDataElement( myProject, child.getKind(), group, child.getMessages(), child.getVf(), NewErrorTreeViewPanel.createExportPrefix(-1), NewErrorTreeViewPanel.createRendererPrefix(-1, -1)) ); } synchronized (myLock) { myGroupNames.add(text); myGroupNameToElementMap.put(text, group); myGroupNameToMessagesMap.put(text, elements); } }