* @todo this is already implemented in {@link org.mevenide.idea.project.actions.AbstractPomAnAction}
*/
private String getSelectedPomUrl(final AnActionEvent pEvent) {
if (PomManagerPanel.PLACE.equals(pEvent.getPlace())) {
final Component comp = pEvent.getInputEvent().getComponent();
final PomManagerPanel pomPanel = (PomManagerPanel) SwingUtilities.getAncestorOfClass(
PomManagerPanel.class,
comp);
return pomPanel.getSelectedPomUrl();
}
else {
final VirtualFile file = getVirtualFile(pEvent);
if (file == null || !file.isValid() || !FileUtils.exists(file))
return null;