if (type == null) { return; }
ISelectionProvider sp= fEditor.getSelectionProvider(); if (sp == null) { return; } ITextSelection ts= (ITextSelection) sp.getSelection(); int lineNumber= ts.getStartLine() + 1; IJavaElement je= (IJavaElement) fEditor.getJavaSourceReferenceAt(ts.getOffset()); IType type= null; if (je instanceof IType) { type= (IType) je; } else if (je instanceof IMember) { type= ((IMember) je).getDeclaringType(); } if (type == null) { return; }  IMarker breakpoint= null; try { breakpoint= JDIDebugModel.createRunToLineBreakpoint(type, lineNumber, -1, -1); } catch (DebugException de) { errorDialog(de.getStatus()); return; } target.breakpointAdded(breakpoint); IDebugElement[] threads= target.getChildren(); for (int i= 0; i < threads.length; i++) { IThread thread= (IThread) threads[i]; if (thread.canResume()) { try { thread.resume(); } catch (DebugException de) {
	public void run() {		JDIDebugTarget target= getContext();		if (target == null) {			fEditor.getSite().getShell().getDisplay().beep();			return;		}		ISelectionProvider sp= fEditor.getSelectionProvider();		if (sp == null) {			return;		}		ITextSelection ts= (ITextSelection) sp.getSelection();		int lineNumber= ts.getStartLine() + 1;		IJavaElement je= (IJavaElement) fEditor.getJavaSourceReferenceAt(ts.getOffset());		IType type= null;		if (je instanceof IType) {			type= (IType) je;		} else			if (je instanceof IMember) {				type= ((IMember) je).getDeclaringType();			}		if (type == null) {			return;		}		IMarker breakpoint= null;		try {			breakpoint= JDIDebugModel.createRunToLineBreakpoint(type, lineNumber, -1, -1);		} catch (DebugException de) {			errorDialog(de.getStatus());			return;		} 		target.breakpointAdded(breakpoint);		IDebugElement[] threads= target.getChildren();		for (int i= 0; i < threads.length; i++) {			IThread thread= (IThread) threads[i];			if (thread.canResume()) {				try {					thread.resume();				} catch (DebugException de) {					errorDialog(de.getStatus());				}				break;			}		}	}