1 11 package org.eclipse.debug.internal.ui.sourcelookup; 12 13 import java.util.List ; 14 15 import org.eclipse.jface.viewers.IStructuredSelection; 16 17 21 public class RemoveAction extends SourceContainerAction { 22 public RemoveAction() { 23 super(SourceLookupUIMessages.sourceTab_removeButton); 24 } 25 30 public void run() { 31 List targets = getOrderedSelection(); 32 List list = getEntriesAsList(); 33 list.removeAll(targets); 34 setEntries(list); 35 } 36 37 40 protected boolean updateSelection(IStructuredSelection selection) { 41 return !selection.isEmpty() && getViewer().getTree().getSelection()[0].getParentItem()==null; 43 } 44 45 } 46 | Popular Tags |