InspectionToolResultExporter (@NotNull InspectionToolWrapper<?, ?> toolWrapper) { String presentationClass = StringUtil .notNullize(toolWrapper.myEP == null ? null : toolWrapper.myEP.presentation, DefaultInspectionToolResultExporter.class.getName()); try { InspectionToolResultExporter presentation; InspectionEP extension = toolWrapper.getExtension(); ClassLoader classLoader = extension == null ? getClass().getClassLoader() : extension.getPluginDescriptor().getPluginClassLoader(); Constructor<?> constructor = Class.forName(presentationClass, true, classLoader) .getConstructor(InspectionToolWrapper.class, GlobalInspectionContextEx.class); presentation = (InspectionToolResultExporter)constructor.newInstance(toolWrapper, this); return presentation; } catch (Exception e) { LOG.error(e); throw new RuntimeException(e); } }