InspectionProfileImpl (String inspectionSettings) { var profileSettings = """ <profile version="1.0"> <option name="myName" value="Test" /> %s </profile> """.formatted(inspectionSettings); var profile = new InspectionProfileImpl("Test", InspectionToolRegistrar.getInstance(), new InspectionProfileImpl("base")); try { profile.readExternal(JDOMUtil.load(profileSettings)); } catch (IOException | JDOMException e) { throw new RuntimeException(e); } return profile; }