use of com.google.cloud.tools.intellij.flags.PropertiesFileFlagReader in project google-cloud-intellij by GoogleCloudPlatform.
the class CloudSdkServiceManager method showCloudSdkNotification.
@VisibleForTesting
void showCloudSdkNotification(String notificationMessage, NotificationType notificationType) {
if (!CloudSdkValidator.getInstance().isValidCloudSdk()) {
Notification invalidSdkWarning = new Notification(new PropertiesFileFlagReader().getFlagString("notifications.plugin.groupdisplayid"), GctBundle.message("settings.menu.item.cloud.sdk.text"), notificationMessage, notificationType);
// add a link to SDK settings for a quick fix.
invalidSdkWarning.addAction(new AnAction(GctBundle.message("appengine.deployment.error.sdk.settings.action")) {
@Override
public void actionPerformed(AnActionEvent e) {
ShowSettingsUtil.getInstance().showSettingsDialog(null, CloudSdkConfigurable.class);
// expire if action has been called to avoid error hanging out forever.
invalidSdkWarning.expire();
}
});
Notifications.Bus.notify(invalidSdkWarning);
}
}
Aggregations