Now I'm using CreateElementActionBase class, as base for my action class and override invokeDialog in it. The directory object passed to it, always returns the containing package when calling directory.getVirtualFile() and directory.getName(). I need to get the file path and name, not the containing folder.
Probably, I'm using the wrong base class. So, my questions:
1- How to get the file name and absolute path, when right clicking on it for example in Project tool window.
2- How to have Context Sensitive Popup Menus? For exmaple, I want to be able to control showing or not showing some items in right click menu, depending on the selected file.