| Summary: | Make "Organize Manifest" wizard run with Orbit projects | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Gunnar Wagenknecht <gunnar> | ||||||||
| Component: | UI | Assignee: | PDE-UI-Inbox <pde-ui-inbox> | ||||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | david_williams, dj.houghton, d_a_carver | ||||||||
| Version: | 3.7 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | stalebug | ||||||||||
| Bug Depends on: | 330278 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
One issue is that when "Ensure that all packages appear in the MANIFEST.MF is checked" new packages are not found and added. The cause for this seems to be in ManifestUtils.findPackageFragmentRoots(IManifestHeader, IProject) which requires for '.' to have a "source.." entry. Another issue is that it's not possible to re-scan class files for dependencies. For example, when a new version is committed to Orbit it's not possible to re-scan for additional or maybe now obsolete dependencies. It should be possible to also include class files into the analysis. That's what I'd expect when running the wizard. The wizard currently only uses the AddNewDependenciesOperation. However, when creating a new bundle project based on existing jars a modified version of the AddNewBinaryDependenciesOperation seems to be used. I think this should be also executed as part of the wizard. Created attachment 183133 [details]
patch for ManifestUtils
This patch addresses the issue in ManifestUtils. If no source entry is found in the 'build.properties' it will be tested if the library is a binary one.
I wonder if the surrounding if block can be removed:
if (!lib.equals(".")) { //$NON-NLS-1$
try {
root = javaProject.getPackageFragmentRoot(project.getFile(lib));
} catch (IllegalArgumentException e) {
return new IPackageFragmentRoot[0];
}
}
if (root != null && root.exists()) {
pkgFragRoots.add(root);
} else {
...
}
Created attachment 183143 [details]
patch for re-scanning of class files
This patch adds scanning of binary dependencies to the wizard. It also ensures that *all* found dependencies are added to the import package section by adding non-resolvable packages as optional imports.
This is what I would expect from the "Organize Manifest" wizard for binary (i.e., Orbit) projects.
Discovered a bug in PackageFinder while working on the second patch. Opend bug 330278 to track this. Created attachment 183160 [details]
patch for re-scanning of class files
updated patch
I wonder if I should include special handling for "about_files" folder. PDE now discovers it (correctly) as missing export package. :) However, that really is dedicated to Orbit and it doesn't feel right to hack such an exclude list into PDE. Thoughts? This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. Please remove the stalebug flag, if this issue is still relevant and can be reproduced on the latest release. |
The "Organize Manifest" is intended to aid with import/export packages. There are some issues which prevent it from being used for Orbit projects. The typical Orbit layout is build.properties: output.. = . bin.includes = META-INF/,\ com/,\ plugin.properties,\ about.html,\ about_files/ In the above case "com" is the first level package folder with all sub-packages containing class files. There is no source folder but a class folder. <classpathentry exported="true" kind="lib" path="" sourcepath="source-bundle"/> It seems that this is an issue for the "Organize Manifest" wizard.