Question

Specifically, I would like to know exactly what happens when Eclipse loads a plugin.

To explain what I'm looking for: I am currently trying to decipher a plugin that reformats Java code to make nicer comparisons (found HERE).

The main class that gets things going is apparently the class JavaContentViewerCreator which implements IViewerCreator. I came to this conclusion because it's the only class mentioned in the plugin.xml file.

JavaContentViewerCreator requires two parameters for the one method it has; a Composite object, and a CompareConfiguration object. What is passing JavaContentViewerCreator these parameters? Where is being called from?

Mainly, what is calling JavaContentViewerCreator and what triggers this plugin to execute all the other classes?

I'd like to know generally how plugins get started (where's the starting point) and how to trace the rest of it from there.

All answers, other than "read a book" (which I am), will be greatly appreciated.

Was it helpful?

Solution

  1. Lookup extension point ID in that plugin. In your plugin.xml there will be element like <extension point="org.eclipse.ui.commands"> - "com.eclipse.ui.commands" is the extension point id.
  2. Lookup that ID in Eclipse documentation - Platform or Java Development Tools. If the ID is not in either document - post it in comment here.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top