1 11 package org.eclipse.jdt.internal.debug.ui.actions; 12 13 14 import org.eclipse.jdt.internal.debug.ui.launcher.IClasspathViewer; 15 import org.eclipse.jdt.internal.debug.ui.launcher.RuntimeClasspathAdvancedDialog; 16 import org.eclipse.jface.action.IAction; 17 import org.eclipse.jface.dialogs.Dialog; 18 19 22 public class AddAdvancedAction extends RuntimeClasspathAction { 23 24 private IAction[] fActions; 25 26 public AddAdvancedAction(IClasspathViewer viewer, IAction[] actions) { 27 super(ActionMessages.AddAdvancedAction_Ad_vanced____1, viewer); 28 fActions = actions; 29 setViewer(viewer); 30 } 31 32 37 public void run() { 38 Dialog dialog = new RuntimeClasspathAdvancedDialog(getShell(), fActions, getViewer()); 39 dialog.open(); 40 } 41 42 45 public void setViewer(IClasspathViewer viewer) { 46 super.setViewer(viewer); 47 if (fActions != null) { 48 for (int i = 0; i < fActions.length; i++) { 49 if (fActions[i] instanceof RuntimeClasspathAction) { 50 ((RuntimeClasspathAction)fActions[i]).setViewer(viewer); 51 } 52 } 53 } 54 } 55 56 protected int getActionType() { 57 return ADD; 58 } 59 } 60 | Popular Tags |