Thanks for the reply Benno. If a user selects a java file and a package, how can I get both the package and the file inside the action.

In case you are interested, what I want to do is pass the java files and the packages user selects into PlantUML dependency so that it generates a plantuml file. But, turns out plantuml dependency only accepts one directory at a time. No multiple directories or files, so for now I have no need for this. Thanks for the answer though.