override fun update()

in src/main/kotlin/mobi/hsz/idea/gitignore/actions/NewFileAction.kt [58:65]


    override fun update(e: AnActionEvent) {
        val project = e.getData(CommonDataKeys.PROJECT)
        val view = e.getData(LangDataKeys.IDE_VIEW)
        val directory = view?.directories
        if (directory.isNullOrEmpty() || project == null || !fileType.ignoreLanguage.isNewAllowed) {
            e.presentation.isVisible = false
        }
    }