/**
*
*/
package es.java.otro.command;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.actions.ActionDelegate;
import es.java.otro.model.Feed;
/**
* @author jaime
*
*/
public class DeleteFeedAction extends ActionDelegate {
private ISelection selection;
@Override
public void run(IAction action) {
System.out.println();;
Feed feed = (Feed) ((StructuredSelection)selection).getFirstElement();
feed.getRoot().removeFeed(feed);
}
@Override
public void selectionChanged(IAction action, ISelection selection) {
this.selection = selection;
}
}