if (project == null)
return;
final PomManager pomMgr = PomManager.getInstance(project);
if (PomManagerPanel.PLACE.equals(pEvent.getPlace())) {
final PomManagerPanel ui = pomMgr.getToolWindowComponent();
if (ui == null)
return;
final PomPluginGoalsManager plgMgr = PomPluginGoalsManager.getInstance(project);
final String[] projects = ui.getPomsWithSelectedGoals(false);
for (String url : projects) {
final Goal[] goals = ui.getSelectedGoalsForPom(url);
for (Goal goal : goals)
if (goal instanceof PluginGoal)
plgMgr.removePluginGoal(url, (PluginGoal) goal);
}