Bug 5225 1.0 -- Casting problem in RunToLineAction class
The Java editor fails to open a java source file when we have PICLDebugTargets in the debug view. There is java.lang.ClassCastException at org.eclipse.jdt.internal.ui.javaeditor.RunToLineAction.getContextFromModel (RunToLineAction.java:111) The getContextFromModel() method incorrectly assumes that all debug targets are of type JDIDebugTarget. I see a few other spots in RunToLineAction where a debug target is blindly cast to a JDIDebugTarget without checking it first. I am seeing this with the R1.0 (0.137 build) driver. I don't think this is a new problem.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/RunToLineAction.java
/**
	 * Resolves a debug target context from the model
	 */
	protected JDIDebugTarget getContextFromModel() throws DebugException {
		IDebugTarget[] dts= DebugPlugin.getDefault().getLaunchManager().getDebugTargets();
		for (int i= 0; i < dts.length; i++) {
			JDIDebugTarget dt= (JDIDebugTarget)dts[i];
			if (getContextFromDebugTarget(dt) != null) {
				return dt;
			}
		}
		return null;
	}
	/**
	 * Resolves a debug target context from the model
	 */
	protected JDIDebugTarget getContextFromThread(IThread thread) throws DebugException {
		if (thread.isSuspended()) {
			return (JDIDebugTarget) thread.getDebugTarget();
		}
		return null;
	}
	/**
	 * Resolves a stack frame context from the UI
	 */
	protected JDIDebugTarget getContextFromUI() throws DebugException {
		
		IWorkbenchPage page= fEditor.getSite().getWorkbenchWindow().getActivePage();
		if (page == null)
			return null;