| Summary: | [plan item] New source lookup for debugging Eclipse applications | ||
|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Mike Wilson <Mike_Wilson> |
| Component: | UI | Assignee: | PDE-UI-Inbox <pde-ui-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P4 | CC: | gunnar, pascal |
| Version: | 3.1 | Keywords: | plan |
| Target Milestone: | 3.2 M5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Mike Wilson
The interesting discussion took place in bug 65614. Source lookup when debugging all PDE launch configurations (Eclipse App, Equinox and Plugin/JUnit) now uses a source lookup mechanism that is faithful to the OSGi classloader. The solution involved a new source lookup director, which extends the standard lookup director. Here is how it works: 1. The debugger hits a breakpoint. 2. The director receives a stack frame object (IJavaStackFrame) for which it has to locate the source. 3. the director retrieves the classloader associated with the stack frame. This classloader is an instance of org.eclipse.core.runtime.adaptor.EclipseClassLoader and carries a member variable (hostdata) which holds the name/version/location of the bundle associated with this classloader. 4. PDE uses this info to zero in on the project/package fragment root/external archive containing the source for this bundle and returns it. This new source lookup is much faster than the standard linear Java lookup as it knows exactly where to look for source and what projects/libraries are involved. It is also very accurate and is not fooled by Java files by the same qualified name in the workspace. As a luxury bonus feature, you can now even debug an entire Eclipse Application, including stopping in Main, without having a single project in your host workbench. |