Every time you mention a problem with the Eclipse plug-in startup, the natural response in your mind is that you can set it to be org.eclipse.ui.startup, otherwise the default is lazy to start (Lazy start), only when the functionality in the plug-in is actually invoked , the plugin will not be started. Maybe people are also lazy, and have not been to pay attention to how the eclipse of the bottom of the implementation of this lazy load, but there is a general guess, it is estimated that the hook mechanism. Yesterday, a concrete look at the implementation, it is a similar realization. The following is roughly shared with you, said not necessarily accurate, only for reference ~_~.
Directly into the subject, our Eclipse instance starts to be sure to construct the workspace, then Resourcesplugin will definitely be started, we will set a breakpoint in the Resourcesplugin.startup method, the debug stack is as follows:
Suppose we are not aware of the plug-in type loading details, guess the approximate process as follows:
1. Defaultclassloader loading type (org.eclipse.core.resources.IContainer)
2, Eclipselazystarter.prefindlocalclass
3. Start Resource plugin: Resourcesplugin.startup