Skip to content
Merged
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 @@ -11,6 +11,7 @@
package com.redhat.devtools.lsp4ij.ui;

import com.intellij.ide.util.PropertiesComponent;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.fileEditor.FileEditor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
Expand Down Expand Up @@ -138,19 +139,23 @@ private EditorNotificationPanel buildPanel(@NotNull String filePattern,
NewLanguageServerDialog dialog = new NewLanguageServerDialog(project);
dialog.loadFromTemplate(template);
dialog.show();
// Refresh notifications to hide it
EditorNotifications.getInstance(project)
.updateAllNotifications();
// Refresh notifications to hide it (deferred to avoid race condition)
ApplicationManager.getApplication().invokeLater(() -> {
EditorNotifications.getInstance(project)
.updateAllNotifications();
});
});
});

// Dismiss button (can be enhanced to persist dismissal if needed)
panel.createActionLabel(LanguageServerBundle.message("language.server.suggest.install.dismiss"), () -> {
// Store preference to disable future notifications
PropertiesComponent.getInstance().setValue(DISABLE_KEY, true);
// Refresh notifications to hide the panel
EditorNotifications.getInstance(project)
.updateAllNotifications();
// Refresh notifications to hide the panel (deferred to avoid race condition)
ApplicationManager.getApplication().invokeLater(() -> {
EditorNotifications.getInstance(project)
.updateAllNotifications();
});
});

return panel;
Expand Down
Loading