Fragment can be considered as a small segment of the plug-in,
Sometimes it can be used in the plug-in. If you want to use it, you can install, uninstall, update, etc. You can think that fragment is attached to the plug-in. In fragment, you only need to specify its host plugin, after this parameter is specified, fragment can be referenced toCode, As shown below
Fragment can be used to save many other information about plugin. For example, a plug-in may have a lib package, which is applicable to a specific operating system, window system, or language pack, these can be added to fragment as plug-in information, recorded by fragment. Create a fragment and associate it with its host plugin. In any case, fragment and plugin are similar in files, but there are also some differences, such:
1>. In fragment, a lot of information exists in fragment. XML, while in plugin, there is in plugin. xml.
2>. The root node of the file in fragment is <fragment/>, and the value is <plugin/>.
3>. fragment can automatically inherit the code in host plugin or directly reference it. However, the host plugin cannot depend on fragment.
Apart from this, a fragment can be said to be no different from plugin. It also has its own Lib, extensions, and so on. When fragment is loaded by the plug-in platform, it is logically incorporated into the host plugin, rather than physical integration. You can directly copy the items in manifest in fragment to the host plugin. Therefore, the classpath required by fragment can also be written to the host plugin. As mentioned above, classes in fragment can be directly written to hostplugin, or directly referenced to the class in host plugin, or even some plublic methods. Some methods can be used to find and open plugin. These are the relative paths installed by some plug-ins of the parameters. They can all be localized or read from the fragment installation path.