1 11 package org.eclipse.jdt.internal.debug.ui.actions; 12 13 14 import java.util.List ; 15 16 import org.eclipse.jdt.internal.debug.ui.launcher.IClasspathViewer; 17 import org.eclipse.jface.viewers.IStructuredSelection; 18 19 22 public class RemoveAction extends RuntimeClasspathAction { 23 24 public RemoveAction(IClasspathViewer viewer) { 25 super(ActionMessages.RemoveAction__Remove_1, viewer); 26 } 27 32 public void run() { 33 List targets = getOrderedSelection(); 34 List list = getEntriesAsList(); 35 list.removeAll(targets); 36 setEntries(list); 37 } 38 39 42 protected boolean updateSelection(IStructuredSelection selection) { 43 if (selection.isEmpty()) { 44 return false; 45 } 46 return getViewer().updateSelection(getActionType(), selection); 47 } 48 49 protected int getActionType() { 50 return REMOVE; 51 } 52 } 53 | Popular Tags |