void (Element toElement) { for (WorkingContextProvider provider : WorkingContextProvider.EP_NAME.getExtensionList()) { try { Element child = new Element(provider.getId()); provider.saveContext(myProject, child); toElement.addContent(child); } catch (WriteExternalException e) { LOG.error(e); } } }