void () { if (myGradleHomePathField == null) return; File gradleHome = GradleInstallationManager.getInstance().getAutodetectedGradleHome(myProjectRef.get()); if (gradleHome == null) { new DelayedBalloonInfo(MessageType.WARNING, LocationSettingType.UNKNOWN, BALLOON_DELAY_MILLIS).run(); return; } myGradleHomeSettingType = LocationSettingType.DEDUCED; new DelayedBalloonInfo(MessageType.INFO, LocationSettingType.DEDUCED, BALLOON_DELAY_MILLIS).run(); myGradleHomePathField.setText(gradleHome.getPath()); myGradleHomePathField.getTextField().setForeground(LocationSettingType.DEDUCED.getColor()); }