To debug the platform, make sure that at least one plug-in project is open and that it depends on the plug-ins that need to be debugged. This allows the editor to be opened for any of the classes for debugging.
com.packtpub.e4.hello.ui
or com.packtpub.e4.clock.ui
. This will ensure that the platform classes are available.Shell
and select the Shell from the org.eclipse.swt.widgets
package. Double-click or click on OK to open the file.If the source code isn't shown, verify that the Eclipse Platform Plug-in Developer Resources plug-in has been installed and that there is an open plug-in project that depends on org.eclipse.ui
or org.eclipse.swt
. If the Open Type menu isn't shown, switch to the Java perspective or the Java Browsing perspective to enable it, or open a Java source file.
setText
method and put a breakpoint in at the start of the method.Being able to understand Eclipse bugs and start to fix them requires being able to debug through the platform. This requires being able to see the source code and know how to be able to step through the code as it's executing.
When a class file is loaded in the debugger, or a file is opened through direct (or indirect) navigation, Eclipse tries to find the source code associated with the plug-in and show that instead. Each Jar on the project's classpath can have an associated Java Source Attachment or a Javadoc Location with it.
When PDE loads a project, the entries under the Plug-in Dependencies tab will show the dependencies for the project, and if the corresponding source
plug-in is also installed and available in the workspace, then it will be wired up to both the Java Source Attachment and the Javadoc Location as well. As a result, when the class file is loaded, the source attachment will be searched for the corresponding file and will be shown automatically.
The title being set triggers the breakpoint in the Shell
class (which is SWT's equivalent of a window). This call will be triggered from a number of different call paths; one way of understanding how Eclipse works is to put a breakpoint in a known location and see where it is being called.
18.118.120.109