Intellij does not trigger custom ArchiveFileSystem (FileType added)

Answered

I tried implementing custom ArchiveFileSystem, but it is never triggered by the system. The goal is to be able to work with files from arc.abc archive the same way as with dependencies in .jar.

What I've tried:

  •  Added AbcFileSystem extending ArchiveFileSystem and registered it (overriden isCorrectFileType method)
  • Added AbcFileType and registered it
  • Added AbcFileTypeOverrider and registered it (JIC, because the majority of examoles for FileType are for LanguageFileType, and I was not sure if it will work)

Expected:

  • IntelliJ triggers methods of AbcFileSystem to get "some.abc" files

Observed:

  • Neither method of AbcFileSystem is triggered

Here's the dummy plugin project with dummy AbcFileSystem and AbcFileType https://github.com/Katalune/AbcFileSystem

Here's test project which contains arc.abc as a dependency https://github.com/Katalune/Testandroidapp

What I need to change to make IDE to trigger AbcFileSystem and to ask for files in arc.abc archive?

This is a follow-up to https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010870600-Intellij-does-not-trigger-custom-ArchiveFileSystem

2 comments
Comment actions Permalink

Is there a chance that this question will be answered? :( 

0
Comment actions Permalink

Custom filesystem is triggered when using corresponding URL/prefix ("abc://")

This dummy action triggers AbcFileSystem correctly

class TestAction: AnAction() {
override fun actionPerformed(e: AnActionEvent) {
val url = "abc://arc.abc"
val vf = VirtualFileManager.getInstance().findFileByUrl(url)
println(vf)
println(vf?.fileSystem)
}
}
1

Please sign in to leave a comment.