Search in sources :

Example 1 with ElixirFileType

use of org.elixir_lang.ElixirFileType in project intellij-elixir by KronicDeth.

the class SetupSDKNotificationProvider method createNotificationPanel.

@Nullable
@Override
public EditorNotificationPanel createNotificationPanel(@NotNull VirtualFile file, @NotNull FileEditor fileEditor) {
    if (!(file.getFileType() instanceof ElixirFileType))
        return null;
    PsiFile psiFile = PsiManager.getInstance(myProject).findFile(file);
    if (psiFile == null || psiFile.getLanguage() != ElixirLanguage.INSTANCE)
        return null;
    ElixirSdkRelease sdkRelease = ElixirSdkType.getRelease(psiFile);
    if (sdkRelease != null)
        return null;
    return createPanel(myProject, psiFile);
}
Also used : ElixirSdkRelease(org.elixir_lang.sdk.ElixirSdkRelease) PsiFile(com.intellij.psi.PsiFile) ElixirFileType(org.elixir_lang.ElixirFileType) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

PsiFile (com.intellij.psi.PsiFile)1 ElixirFileType (org.elixir_lang.ElixirFileType)1 ElixirSdkRelease (org.elixir_lang.sdk.ElixirSdkRelease)1 Nullable (org.jetbrains.annotations.Nullable)1