FileIncludeProvider -- what it's for?


I've implemented FileIncludeProvider, but I've got no idea what it's actually for (first I thought it would be providing a reference to other files, but obviously it doesn't -- I guess I need a separate ReferenceProvider for that).

Also, there is no information on FileIncludeInfo, especially on the "offset" and the flag "runtimeOnly".

Any info would be quite helpful.



Comment actions Permalink

FileIncludeProvider is used, i.e., to handle a reference to the file when you import a file in CSS with @import "path/to/file". See for some implementation examples.



Comment actions Permalink

Dear Jakub,

thank you for your answer. However, I have to admit that there was no gain in knowledge for me. I would suggest that the API and it's purpose should be clearly documented.

Comment actions Permalink

It is used by com.intellij.psi.impl.include.FileIncludeManager to build list of including/included files.

'offset' can be used to locate the actual include element in com.intellij.psi.impl.include.FileIncludeManager#processIncludingFiles "Processor"

'runtimeOnly'/'compileTimeOnly' can be used to distinguish different scopes (e.g. project vs libraries)


Please sign in to leave a comment.