1 11 package org.eclipse.jdt.internal.debug.ui.actions; 12 13 14 import java.util.Iterator ; 15 16 import org.eclipse.debug.core.DebugException; 17 import org.eclipse.jdt.debug.core.IJavaStackFrame; 18 import org.eclipse.jdt.internal.debug.ui.ExceptionHandler; 19 import org.eclipse.jface.action.IAction; 20 import org.eclipse.jface.viewers.IStructuredSelection; 21 22 public class DropToFrameAction extends ObjectActionDelegate { 23 24 27 public void run(IAction action) { 28 IStructuredSelection selection= getCurrentSelection(); 29 if (selection == null) { 30 return; 31 } 32 Iterator itr= selection.iterator(); 33 34 while (itr.hasNext()) { 35 IJavaStackFrame frame= (IJavaStackFrame)itr.next(); 36 try { 37 frame.dropToFrame(); 38 } catch (DebugException de) { 39 String title= ActionMessages.getString("DropToFrameAction.Drop_to_Frame_1"); String message= ActionMessages.getString("DropToFrameAction.Exceptions_occurred_attempting_to_drop_to_frame._2"); ExceptionHandler.handle(de, title, message); 42 } 43 } 44 } 45 } 46 | Popular Tags |