Community
Participate
Working Groups
You can click the little + in front of a jar file in the package explorer and it will show the contents of a jar file. On of the standard items in a jar file is a MANIFEST.MF. When you open the jar MANIFEST.MF file with eclipse 3.0.1, it uses the PDE editor to display the content, which does a poor job of displaying the data. When content-based editor selecting is working, (bug 37668) please update the PDE editor to use it, so that it will only be used for PDE manifests.
Even with the new content-based editor lookup, I still don't see how we can distinguish between the two MANIFEST.MF files. They are the same with the same format. RC, how do we resolve this defect?
One possible solution would be: - contribute a new content type for bundle manifests (based on JAR Manifest) that has a pickier content describer (for instance, requires the presence of one of the common headers specific to bundles to say contents are valid) - associate the PDE nature to the bundle manifest content type (bug 69640) - associate PDE editor to the bundle manifest content type Outcome would be: - in non-PDE projects (or in runtime libraries), MANIFEST.MF files would be considered JAR manifests, unless they have some OSGi related header - in PDE projects, MANIFEST.MF files would always be considered bundle manifests (due to the nature association). If you want to go in this direction, this would also require changing the content describer for JAR manifests to be more precise than it currently is. I would take care of submitting a patch to JDT/Core.
I think we should address it yes. It looks pretty bizzarre when you open a random manifest.mf in the multipage editor. The presence of a Bundle-SymbolicName header as a litmus test would be good.
Ok, I will take care of implementing the content describers (bug 89385). BTW: you will have to use the Eclipse-AutoStart header inyour bundle manifest, because content describers should not trigger auto-activation. A pity that doing that is not as easy as it used to be. <g>
by the way, Jeff was cheering me on as I was disposing of the Eclipse- Autostart section ;-)
Created attachment 21299 [details] patch for org.eclipse.pde
Created attachment 21300 [details] patch for org.eclipse.pde.ui
Proposed fix is different from what was originally planned. Only affects PDE/UI. org.eclipse.pde provides a bundle manifest content type. This content type checks the contents of the file looking for some common headers. If one of the headers exists, PDE's bundle manifest is the content type chosen, otherwise the plain JAR manifest contributed by org.eclipse.jdt.core wins. PDE's plug-in manifest is now associated to this new content type instead of to the JAR manifest content type. Wassim/Konrad, please review/release if good.
See bug 89426 comment 6 for an issue with opening editors for files inside JARs (only name matching is done)
thanks for the patch Rafael. Plays very well.