Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1132 Load services outside of constructors and class initializers #1138

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
final class InitialConfigurationStartupActivity implements StartupActivity.Background {

private static final String NOTIFICATION_TITLE = "Enable google-java-format";
private static final NotificationGroup NOTIFICATION_GROUP =
NotificationGroupManager.getInstance().getNotificationGroup(NOTIFICATION_TITLE);

@Override
public void runActivity(@NotNull Project project) {
Expand All @@ -43,9 +41,11 @@ public void runActivity(@NotNull Project project) {
}

private void displayNewUserNotification(Project project, GoogleJavaFormatSettings settings) {
NotificationGroupManager groupManager = NotificationGroupManager.getInstance();
NotificationGroup group = groupManager.getNotificationGroup(NOTIFICATION_TITLE);
Notification notification =
new Notification(
NOTIFICATION_GROUP.getDisplayId(),
group.getDisplayId(),
NOTIFICATION_TITLE,
"The google-java-format plugin is disabled by default. "
+ "<a href=\"enable\">Enable for this project</a>.",
Expand Down
Loading