'Edit as Table' visibility check for EditorPopup is too restrictive

Hi,

IntelliJ provides the nice feature to edit (text) files in a table like view (https://www.jetbrains.com/help/idea/editing-csv-and-similar-files-in-table-format.html).

However, when using a plugin for a certain file type (e.g. *.csv) that comes with an own Language definition, the option 'Edit as Table' becomes unavailable in the context menu (while it is still usable/accessible via Toolbar -> Edit -> 'Edit as Table').

The reason for the disappearance in the context menu is a check whether the Language class of the currently edited file is PlainTextLanguage.INSTANCE, which becomes obviously false when providing an own Language class.

I understand that this option shouldn't be visible for arbitrary languages, but the check

language == PlainTextLanguage.INSTANCE

is quite too strict. IMO it should be

language.isKindOf(PlainTextLanguage.INSTANCE)

 

What do you think?

Thanks, Martin

4 comments
Comment actions Permalink

Wow - this was a fast response! Thanks!

0
Comment actions Permalink

I still do not see this button

PhpStorm 2017.3.3

0
Comment actions Permalink

Works fine for me in PhpStorm 2018.1 EAD:

AFAIK the change was implemented for version 2017.3.3

0

Please sign in to leave a comment.