Skip to content

Commit

Permalink
Notification text update (#156)
Browse files Browse the repository at this point in the history
* Notification text update (premium), analytics landing click event
  • Loading branch information
ex3m1024 authored Nov 6, 2019
1 parent 139f950 commit 75886ec
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
updater.title=Graph Database Support plugin updated to v{0}
updater.notification=<b>New:</b> <br/>Now you can query TinkerPop Gremlin-enabled databases \
like Cosmos DB, Neptune and JanusGraph using Cypher.<br/><br/>\
updater.notification=New: querying TinkerPop Gremlin databases! <br/> \
Check out the premium features of the plugin: <a href="https://technologies.neueda.com/plugin">here</a> <br/><br/>\
<b>Improvements:</b><br/>\
- Gremlin support<br/>\
- Faster startup when using a number of databases.<br/>\
- Gremlin support <br/>\
- Execute Cypher queries in databases like Cosmos DB, Neptune and JanusGraph <br/>\
- Faster startup when using a number of databases <br/>\
- Graph metadata is refreshed in the background <br/>\
- DB connection testing is asynchronous <br/>\
- Improved UI <br/>\
- More intuitive graph view zoom <br/><br/>\
<b>Bugfixes:</b><br/>\
- Fix for CREATE without RETURN in Cosmos DB<br/>\
- Execute Query button in gutter<br/>\
<br/>\
<a href="https://github.com/neueda/jetbrains-plugin-graph-database-support">Github</a> | \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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);
}
}

}

0 comments on commit 75886ec

Please sign in to comment.