Книга: Embedded Linux development using Eclipse

7.4.1 Clean Up and Organize the Manifests

7.4.1 Clean Up and Organize the Manifests

PDE provides an Organize Manifests wizard to help ensure that the information in your MANIFEST.MF file is complete and up to date. Among other things, it gives you the opportunity to override and extend options selected in the Manifest Editor.

The Organize Manifests wizard (Figure 7.9) is accessible from the Overview form in the Exporting section. The various options, which tend to be rather verbose, are:

• Ensure that all packages appear in the MANIFEST.MF: Adds Export-Package declarations for any package in the project that isn’t already exported.

• Mark as internal all packages that match the following filter: Can change the visibility of a package based on its name. The Package filter field is a regular expression that identifies packages to be marked as internal. Internal packages are not available for use by other plug-ins.

• Remove unresolved packages: Removes Export-Package entries that can’t be resolved, probably because they simply don’t exist in the project.

• Calculate ‘uses’ directive for public packages: Does the complex computations for the “uses” directive for packages that other plug-ins have access to. This requires code introspection and can be a lengthy process.

• Handle unresolved dependencies by: Offers the option of removing unresolved dependencies or declaring them as optional. The most common reason a dependency might be unresolved is that an optional plug-in is missing from the configuration.

• Remove unused dependencies: Analyzes the project code for references to unused dependencies, which could result in unnecessary plug-ins being installed at runtime. This can be a time consuming process.

• Add required dependencies: Sort of the complement of the previous option, it looks for dependencies that are not currently included in the manifest. This only finds dependencies for plug-ins listed in the Automated Management of Dependencies section of the Dependencies form of the Manifest Editor. This can be a time consuming operation.

• Remove unnecessary lazy activation headers: Removes so-called “lazy activation headers” if a Bundle-Activator is not defined. The lazy activation header isn’t necessary if a plug-in has nothing to contribute when it is started.

• Delete unnecessary plug-in manifest files: Removes plugin.xml files if a plug-in doesn’t contribute any extensions or extension points.

• Prefix icon paths in plug-in extensions with a $nl$ segment: Modifies icon paths to allow fragments to contribute unique icons for different locales.

• Remove unused keys from the plug-in’s properties file: Finds and removes unused keys in the properties file.

• In most cases the default values are fine.

Figure 7.9: Organize Manifests wizard.

Оглавление книги

Генерация: 0.034. Запросов К БД/Cache: 0 / 0
Вверх Вниз