ernesto
ernesto

Reputation: 1989

How to debug Eclipse source code

I am having tough time to figure out debugging UI parts of Eclipse. I couldn't find any information on google (or) Eclipse web site.

All I wanted to do is to find out the code that gets executed when we double-click a file in project explorer to open the file in Editor.

I tried to bring up Eclipse source code from Plug-ins view -> right click on the plugins -> import as Source Project. But, I am unsure what are all the components that constitutes to the UI part. I get some weird errors when I try to import everything that's found in plug-ins view.

Where can I find the information related to debugging Eclipse source code?

Upvotes: 2

Views: 946

Answers (1)

Jed Anderson
Jed Anderson

Reputation: 931

Instead of using Plug-ins->Import as Source Project, I would recommend opening the Plug-ins view, selecting all plug-ins, right click, and Add to Java Search.

Then you can use Open Type Ctrl-Shift-t to search for class names and the source will be attached so you can read it, set breakpoints, and debug.

In your case, I think you want to investigate IWorkbench, IWorkbenchWindow, and IWorkbenchPage. The openEditor(*) methods on IWorkbenchPage will be of particular interest.

You may also want to take a look at the org.eclipse.ui.editors and org.eclipse.core.contenttype.contentTypes extension points.

Upvotes: 3

Related Questions