mirror of
https://github.com/ilyakooo0/intellij-haskell.git
synced 2024-09-11 14:56:19 +03:00
Check if file is ignored before displaying panel to select missing SDK.
This commit is contained in:
parent
a6489f5ee7
commit
427fe7e95e
@ -4,7 +4,7 @@ import com.intellij.ProjectTopics
|
||||
import com.intellij.openapi.fileEditor.FileEditor
|
||||
import com.intellij.openapi.project.{Project, ProjectBundle}
|
||||
import com.intellij.openapi.roots.ui.configuration.ProjectSettingsService
|
||||
import com.intellij.openapi.roots.{ModuleRootEvent, ModuleRootListener}
|
||||
import com.intellij.openapi.roots.{ModuleRootEvent, ModuleRootListener, ProjectFileIndex}
|
||||
import com.intellij.openapi.util.Key
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.ui.{EditorNotificationPanel, EditorNotifications}
|
||||
@ -29,7 +29,12 @@ class SetupHaskellSdkNotificationProvider(project: Project, notifications: Edito
|
||||
override def createNotificationPanel(virtualFile: VirtualFile, fileEditor: FileEditor): EditorNotificationPanel = {
|
||||
if (HaskellProjectUtil.isHaskellProject(project) && HaskellProjectUtil.isSourceFile(project, virtualFile)) {
|
||||
HaskellProjectUtil.findModuleForVirtualFile(project, virtualFile).flatMap(m => HaskellSdkType.getSdkName(project, m)) match {
|
||||
case None => createSdkSetupPanel(project)
|
||||
case None =>
|
||||
if (ProjectFileIndex.getInstance(project).isExcluded(virtualFile)) {
|
||||
null
|
||||
} else {
|
||||
createSdkSetupPanel(project)
|
||||
}
|
||||
case _ => null
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user