private SubmittedReportInfo submit(IdeaLoggingEvent[] ideaLoggingEvents, String description, String user,
Component component) {
final DataContext dataContext = DataManager.getInstance().getDataContext(component);
final Project project = PlatformDataKeys.PROJECT.getData(dataContext);
final IdeaLoggingEvent ideaLoggingEvent = ideaLoggingEvents[0];
final String throwableText = ideaLoggingEvent.getThrowableText();
this.myDescription = throwableText.substring(0, Math.min(Math.max(80, throwableText.length()), 80));
@SuppressWarnings("ThrowableResultOfMethodCallIgnored") Integer signature = ideaLoggingEvent.getThrowable()
.getStackTrace()[0].hashCode();
String existing = findExisting(signature);
if (existing != null) {
final SubmittedReportInfo reportInfo = new SubmittedReportInfo(SERVER_URL + "issue/" + existing,
existing, DUPLICATE);
popupResultInfo(reportInfo, project);
return reportInfo;
}
@NonNls StringBuilder descBuilder = new StringBuilder();
String platformBuild = ApplicationInfo.getInstance().getBuild().asString();
descBuilder.append("Platform Version: ").append(platformBuild).append('\n');
Throwable t = ideaLoggingEvent.getThrowable();
if (t != null) {
final PluginId pluginId = IdeErrorsDialog.findPluginId(t);
if (pluginId != null) {
final IdeaPluginDescriptor ideaPluginDescriptor = PluginManager.getPlugin(pluginId);
if (ideaPluginDescriptor != null && !ideaPluginDescriptor.isBundled()) {