use of com.intellij.ide.plugins.IdeaPluginDescriptor in project Intellij-Plugin by getgauge.
the class GaugeExceptionHandler method createNotification.
private Notification createNotification(String stacktrace) {
IdeaPluginDescriptor plugin = PluginManager.getPlugin(PluginId.findId("com.thoughtworks.gauge"));
String pluginVersion = plugin == null ? "" : plugin.getVersion();
String apiVersion = ApplicationInfo.getInstance().getApiVersion();
String ideaVersion = ApplicationInfo.getInstance().getFullVersion();
String gaugeVersion = GaugeVersion.getVersion(false).version;
String body = String.format(ISSUE_TEMPLATE, stacktrace, ideaVersion, apiVersion, pluginVersion, gaugeVersion);
String content = String.format(NOTIFICATION_TEMPLATE, LINE_BREAK, body);
return new Notification("Gauge Exception", NOTIFICATION_TITLE, content, NotificationType.ERROR, NotificationListener.URL_OPENING_LISTENER);
}
Aggregations