Eclipse plug-in lazy start implementation principle analysis

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.