From 32502b5ebe9af819f3e34c9383d357559bf1634f Mon Sep 17 00:00:00 2001 From: "Vladislav.Soroka" Date: Tue, 4 Feb 2014 18:14:56 +0400 Subject: [PATCH] IDEA-119704 Disable "Unlinked Gradle project?" dialog doesn't work on OSX --- plugins/gradle/resources/i18n/GradleBundle.properties | 2 +- .../plugins/gradle/service/project/GradleStartupActivity.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/gradle/resources/i18n/GradleBundle.properties b/plugins/gradle/resources/i18n/GradleBundle.properties index 0dd8da3cbcf6..fddd05800345 100644 --- a/plugins/gradle/resources/i18n/GradleBundle.properties +++ b/plugins/gradle/resources/i18n/GradleBundle.properties @@ -26,7 +26,7 @@ gradle.notifications.hide.tip=Hide the tip gradle.notifications.apply.suggestion=Ok, apply suggestion! gradle.notifications.unlinked.project.found.title=Unlinked Gradle project? gradle.notifications.unlinked.project.found.msg=Import Gradle project, this will also enable Gradle Tool Window. -gradle.notifications.do.not.show=Don't want to see the message for the project again: press here. +gradle.notifications.do.not.show=Don't want to see the message for the project again: press here. gradle.codeInsight.action.apply_plugin.text=Add gradle plugin gradle.codeInsight.action.apply_plugin.description=Add selected gradle plugin to the project diff --git a/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/GradleStartupActivity.java b/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/GradleStartupActivity.java index 6f1ecc9ab50c..81ceaa3177e2 100644 --- a/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/GradleStartupActivity.java +++ b/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/GradleStartupActivity.java @@ -80,13 +80,14 @@ public class GradleStartupActivity implements StartupActivity { if (files != null && files.length != 0) { String message = String.format("%s
\n%s", GradleBundle.message("gradle.notifications.unlinked.project.found.msg", IMPORT_EVENT_DESCRIPTION), - GradleBundle.message("gradle.notifications.do.not.show", DO_NOT_SHOW_EVENT_DESCRIPTION)); + GradleBundle.message("gradle.notifications.do.not.show")); GradleNotification.getInstance(project).showBalloon( GradleBundle.message("gradle.notifications.unlinked.project.found.title"), message, NotificationType.INFORMATION, new NotificationListener.Adapter() { @Override protected void hyperlinkActivated(@NotNull Notification notification, @NotNull HyperlinkEvent e) { + notification.expire(); if (IMPORT_EVENT_DESCRIPTION.equals(e.getDescription())) { final ProjectDataManager projectDataManager = ServiceManager.getService(ProjectDataManager.class); GradleProjectImportBuilder gradleProjectImportBuilder = new GradleProjectImportBuilder(projectDataManager);