How to get selected modules in the project view?

I can get the project with
Project project = (Project)e.getDataContext().getData(DataConstants.PROJECT);
I can get the selected files and directories with
VirtualFile[] selectedFiles = (VirtualFile[]) e.getDataContext().getData(DataConstants.VIRTUAL_FILE_ARRAY);
And from the vFile I can get the module.

But how to get the modules when the module nodes are selected. When only module nodes are selected, vFile array returned is null.
e.getDataContext().getData(DataConstants.MODULE) works if only one node is selected, for multiple node selection it returns null.

Thanks,

-Sudhan

Please sign in to leave a comment.