Search in sources :

Example 56 with EditorNotificationPanel

use of com.intellij.ui.EditorNotificationPanel in project go-lang-idea-plugin by go-lang-plugin-org.

the class GoFileIgnoredByBuildToolNotificationProvider method createIgnoredByBuildToolPanel.

private static EditorNotificationPanel createIgnoredByBuildToolPanel(@NotNull Project project, @NotNull VirtualFile file) {
    EditorNotificationPanel panel = new EditorNotificationPanel();
    String fileName = file.getName();
    panel.setText("'" + fileName + "' will be ignored by build tool since its name starts with '" + fileName.charAt(0) + "'");
    panel.createActionLabel("Do not show again", () -> {
        PropertiesComponent.getInstance().setValue(DO_NOT_SHOW_NOTIFICATION_ABOUT_IGNORE_BY_BUILD_TOOL, true);
        EditorNotifications.getInstance(project).updateAllNotifications();
    });
    return panel;
}
Also used : EditorNotificationPanel(com.intellij.ui.EditorNotificationPanel)

Aggregations

EditorNotificationPanel (com.intellij.ui.EditorNotificationPanel)56 Nullable (org.jetbrains.annotations.Nullable)20 NotNull (org.jetbrains.annotations.NotNull)13 FileEditor (com.intellij.openapi.fileEditor.FileEditor)7 VirtualFile (com.intellij.openapi.vfs.VirtualFile)7 PsiFile (com.intellij.psi.PsiFile)7 Editor (com.intellij.openapi.editor.Editor)6 TextEditor (com.intellij.openapi.fileEditor.TextEditor)5 Project (com.intellij.openapi.project.Project)4 Module (com.intellij.openapi.module.Module)3 PluginManagerConfigurable (com.intellij.ide.plugins.PluginManagerConfigurable)2 Document (com.intellij.openapi.editor.Document)2 FileEditorManager (com.intellij.openapi.fileEditor.FileEditorManager)2 Sdk (com.intellij.openapi.projectRoots.Sdk)2 Ref (com.intellij.openapi.util.Ref)2 PerlLocalSettings (com.perl5.lang.perl.idea.configuration.settings.PerlLocalSettings)2 File (java.io.File)2 List (java.util.List)2 AndroidModuleModel (com.android.tools.idea.gradle.project.model.AndroidModuleModel)1 ModelWizardDialog (com.android.tools.idea.wizard.model.ModelWizardDialog)1