Here's a thought I had recently:
A lot of stuff IDEA does to please us depends on additional
information about the edited files. Some of this information
is configurable via some setting or the other, some other
information is obtained by IDEA via "sophisticated guessing"
(like for String completion in all kinds of files or path
completion in HTML or JSP files) other type of information
is stored in annotations (like @Nullable) or comments (like
//noinspection comments) directly in the code.
Especially the latter type of information appears somewhat
ugly to me: I don't want my co-workers (who may not be
using IDEA) to be bothered by stuff in the code that they
don't need (even if it may be their own fault - why don't
they use IDEA, too).
So, my idea was to have "IDEA specific" information stored
in some other place, like a metadata file or database, and
still display it in the edited file in one way or the other
(like a footnote in the code or a gutter mark which allows
access to an appropriate metadata editor or a special
highlighting or a suitable combination of the above). Of
course, the structure of the metadata for known file types
would have to be tightly interwoven with the respective PSI
Some usages of file metadata have already been mentioned:
- "base paths" settings for path completion
- file specific (even statement specific) inspection
Other possible usages that come to my mind are:
- JSP bean type information for EL completion
- JDBC connection settings for SQL completion in a (not yet
written) SQL plugin (that works in the main editor as
opposed to a plugin tool window)
- target XML file for XSL autocompletion in XPathView plugin
I'm sure there are plenty of other usage scenarios.
The last examples I mentioned shows that the OpenAPI would
also greatly benefit from file metadata.
I could imagine many aspects of what I described are already
in place internally, so maybe it would just be a matter of
adding things to the OpenAPI.