Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342578

Summary: Quick fixes of errors in a generated MANIFEST.MF edit MANIFEST.MF rather than template.mf
Product: [RT] Virgo Reporter: Martin Lippert <mlippert>
Component: toolingAssignee: Project Inbox <virgo-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: eclipse, mlippert
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on:    
Bug Blocks: 368782    

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)