From 75886ec1486cd174f24bbd196a977b59c6a3686d Mon Sep 17 00:00:00 2001 From: Nikita R-T Date: Wed, 6 Nov 2019 14:10:47 +0300 Subject: [PATCH] Notification text update (#156) * Notification text update (premium), analytics landing click event --- .../graphdb/messages/GraphBundle.properties | 10 ++++++---- .../updater/PluginUpdateActivity.java | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/platform/src/main/resources/graphdb/messages/GraphBundle.properties b/platform/src/main/resources/graphdb/messages/GraphBundle.properties index d9075d9d..4f14abe2 100644 --- a/platform/src/main/resources/graphdb/messages/GraphBundle.properties +++ b/platform/src/main/resources/graphdb/messages/GraphBundle.properties @@ -1,14 +1,16 @@ updater.title=Graph Database Support plugin updated to v{0} -updater.notification=New:
Now you can query TinkerPop Gremlin-enabled databases \ -like Cosmos DB, Neptune and JanusGraph using Cypher.

\ +updater.notification=New: querying TinkerPop Gremlin databases!
\ +Check out the premium features of the plugin: here

\ Improvements:
\ -- Gremlin support
\ -- Faster startup when using a number of databases.
\ +- Gremlin support
\ +- Execute Cypher queries in databases like Cosmos DB, Neptune and JanusGraph
\ +- Faster startup when using a number of databases
\ - Graph metadata is refreshed in the background
\ - DB connection testing is asynchronous
\ - Improved UI
\ - More intuitive graph view zoom

\ Bugfixes:
\ +- Fix for CREATE without RETURN in Cosmos DB
\ - Execute Query button in gutter
\
\ Github | \ diff --git a/ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/component/updater/PluginUpdateActivity.java b/ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/component/updater/PluginUpdateActivity.java index d9e2f00f..b67c50ce 100644 --- a/ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/component/updater/PluginUpdateActivity.java +++ b/ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/component/updater/PluginUpdateActivity.java @@ -4,12 +4,15 @@ import com.intellij.openapi.project.DumbAware; import com.intellij.openapi.project.Project; import com.intellij.openapi.startup.StartupActivity; +import com.neueda.jetbrains.plugin.graphdb.jetbrains.component.analytics.Analytics; import com.neueda.jetbrains.plugin.graphdb.jetbrains.component.settings.SettingsComponent; import com.neueda.jetbrains.plugin.graphdb.jetbrains.util.PluginUtil; import com.neueda.jetbrains.plugin.graphdb.platform.GraphBundle; import com.neueda.jetbrains.plugin.graphdb.platform.GraphConstants; import org.jetbrains.annotations.NotNull; +import javax.swing.event.HyperlinkEvent; + public class PluginUpdateActivity implements StartupActivity, DumbAware { private static final String NOTIFICATION_ID = "GraphDatabaseSupportUpdateNotification"; @@ -36,9 +39,22 @@ private void showNotification(Project project, String currentVersion) { GraphBundle.message("updater.title", currentVersion), GraphBundle.message("updater.notification"), NotificationType.INFORMATION, - new NotificationListener.UrlOpeningListener(false) + new UrlOpeningListenerWithAnalytics(false) ); Notifications.Bus.notify(notification, project); } + static class UrlOpeningListenerWithAnalytics extends NotificationListener.UrlOpeningListener { + + UrlOpeningListenerWithAnalytics(boolean expireNotification) { + super(expireNotification); + } + + @Override + protected void hyperlinkActivated(@NotNull Notification notification, @NotNull HyperlinkEvent event) { + Analytics.event("landingPage", "landFromNotification"); + super.hyperlinkActivated(notification, event); + } + } + }