Skip to content

Commit

Permalink
Load services outside of constructors and class initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
nrayburn-tech committed Aug 19, 2024
1 parent b3c7c11 commit 5866980
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 5866980

Please sign in to comment.