https://kotlinlang.org logo
r

ragunathjawahar

06/03/2021, 6:37 AM
Folks, I am trying to get access to a
FileSystemTree
instance from my action. But, I haven’t succeeded yet. I have tried the following, Attempt 1
Copy code
val fileSystemTree = e.getData(FileSystemTree.DATA_KEY) // returns null
Attempt 2 After looking into implementations of
LightEditGotoOpenedFileAction
and
NewFileAction
, I tried extending my action from
com.intellij.openapi.fileChooser.actions.FileChooserAction
. However, the extended action is always disabled on the UI (Despite overriding the
update
function). Also, my action cannot be
DumbAware
, therefore even if using a
FileChooserAction
gave me an instance of the
FileSystemTree
, it wouldn’t be relevant to my use case. Pointers are appreciated. Thank you in advance.