Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342578 - Quick fixes of errors in a generated MANIFEST.MF edit MANIFEST.MF rather than template.mf
Summary: Quick fixes of errors in a generated MANIFEST.MF edit MANIFEST.MF rather than...
Status: NEW
Alias: None
Product: Virgo
Classification: RT
Component: tooling (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 368782
  Show dependency tree
 
Reported: 2011-04-12 10:41 EDT by Martin Lippert CLA
Modified: 2012-01-16 18:21 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Lippert CLA 2011-04-12 10:41:19 EDT
Quick fixes for errors in a generated manifest should be applied to template.mf as it is bad practice to edit a generated manifest. Unfortunately, the tooling applies the quick fixes to the generated manifest. This is not only bad form but the changes are deleted and the errors come back as soon as the manifest is regenerated after a change is made to Java code.

The workaround is to apply the quick fixes and then copy the new headers to template.mf.

Steps to recreate:

1. Create a new EclipseRT Bundle Project called Test, take all the defaults and end by clicking "Finish".

2. On the Overview pane of the project's src/META-INF/MANIFEST.MF, tick the option to automatically update MANIFEST.MF in background.

3. Then add a new file template.mf to the project. template.mf then has an error saying "Manifest has no main section". Sadly there is no quick fix for this and you need to add a line containing "Manifest-Version: 1.0" followed by a newline.

4. Now add a new class to the bundle project with package "test" and name "Test". This causes MANIFEST.MF to be regenerated without Bundle-ManifestVersion, Bundle-Version, or Bundle-SymbolicName.

5. The error is flagged against MANIFEST.MF, but unfortunately taking the quick fixes adds these headers to MANIFEST.MF when the correct course of action is to add them to template.mf.

(moved here from: https://issuetracker.springsource.com/browse/STS-1293)