"Mark as Plain Text" API?

Hi everyone!

I can't find how to mark some file as Plain Text like as at PhpStorm's context menu. I want mark as Plain Text all php files in chosen directory to prevent indexing.

3 comments

private boolean markFileAsPlainText (VirtualFile file) {           if (!file.exists() || file.isDirectory()) return false;           EnforcedPlainTextFileTypeManager typeManager = EnforcedPlainTextFileTypeManager.getInstance();           assert typeManager != null;           if (EnforcedPlainTextFileTypeManager.isApplicableFor(file) &&                     !typeManager.isMarkedAsPlainText(file)) {                typeManager.markAsPlainText(file);                return true;           }           return false;      }

0

Please sign in to leave a comment.