private InspectionTool copyToolSettings(InspectionTool tool) throws WriteExternalException, InvalidDataException { @NonNls String tempRoot = "config"; Element config = new Element(tempRoot); tool.writeSettings(config); final InspectionTool inspectionTool = myRegistrar.createInspectionTool(tool.getShortName(), tool); inspectionTool.readSettings(config); return inspectionTool; }