Bug 115274 - Multi-line entries in Manifest.mf
Summary: Multi-line entries in Manifest.mf
Status: RESOLVED DUPLICATE of bug 85883
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-07 03:48 EST by Eike Stepper CLA
Modified: 2005-11-08 09:50 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 Eike Stepper CLA 2005-11-07 03:48:21 EST
As of 3.2M3 manifest builder complains about space characters in the line
following a multi-line entry:

Export-Package: com.sympedia.density.eclipse,
 com.sympedia.density.eclipse.impl
 <- this one is evil!

Worse: The manifest editor automatically inserts a space, whem you paste a whole
line after such a multi-line entry.
Comment 1 Wassim Melhem CLA 2005-11-07 09:50:23 EST
Not exactly sure what the problem here is. 

Are the empty lines in the middle of the manifest.mf?  If so, they have always 
been disallowed by the JRE manifest parser, and PDE merely reports the error.

As for: "The manifest editor automatically inserts a space, whem you paste a 
whole line after such a multi-line entry."

can you give an example?
Comment 2 Eike Stepper CLA 2005-11-08 01:37:19 EST
Assume this is the end of the manifest.mf:

...
Eclipse-LazyStart: true
Export-Package: com.sympedia.density.eclipse,
 com.sympedia.density.eclipse.impl

Now place the cursor after "impl" and press return.
the line to be insterted will start with a space char and will be marked as an
error on save.

The other observation: If you cut the whole "LazyStart" line into the clipboard,
go to the line *after* "...eclipse.impl" and paste it in (that is moving a
complete line behind a multi-line entry), then PDE will again insert an
additional space at the end of the file. again it will be marked as an error on
save.
Comment 3 Wassim Melhem CLA 2005-11-08 02:03:22 EST
I see.

In any event, the PDE error marker is fine and valid.

PDE is not inserting anything.  This is the auto-indent behavior of the 
platform text editor.

Moving to Platform/Text to comment and/or close.
Comment 4 Eike Stepper CLA 2005-11-08 02:44:49 EST
I don't think that the PDE problem marker is valid or fine.
I'm not sure about the implementation of the manifest parser but from a
requirements point of view I would assume that the absence of a comma after the
last element of a multiline entry is enough. Irrespective of any whitespace...
Comment 5 Wassim Melhem CLA 2005-11-08 02:46:52 EST
take it up with Sun.  We are using the standard Manifest parser that comes 
with the JRE.
Comment 6 Dani Megert CLA 2005-11-08 06:22:49 EST
Wassim, I don't get the error when having this:
...
Require-Bundle: 
 org.eclipse.core.runtime,
 org.eclipse.core.resources,
 org.eclipse.ui,
<space>
 org.eclipse.ui.ide,
 org.eclipse.ui.workbench.texteditor,
 org.eclipse.jface.text,
 org.eclipse.ui.editors
...
but I get one ("extranous empty line") when having:
...
Require-Bundle: 
 org.eclipse.core.runtime,
 org.eclipse.core.resources,
 org.eclipse.ui,
<no space here>
 org.eclipse.ui.ide,
 org.eclipse.ui.workbench.texteditor,
 org.eclipse.jface.text,
 org.eclipse.ui.editors
...
Comment 7 Wassim Melhem CLA 2005-11-08 09:35:58 EST
Dani, what you have in comment 6 is a slight variation but of a different way 
of how strict the JRE manifest parser is.

If a completely empty line (no space) is present in a manifest.mf file, it 
must not be followed by anything.  Otherwise, the JRE parser will consider the 
file invalid.  A litmus test for you to see what is valid or not is to keep 
your eye on the outline view; when it goes blank, the file has become invalid.

The original problem has to do with the fact that the very last character in a 
file must be a newline character.  Otherwise, the last header in the file will 
be ignored.  So the extraneous space inserted upon pressing enter results in 
PDE flagging the error upon saving.
Comment 8 Dani Megert CLA 2005-11-08 09:46:09 EST
I see.
Comment 9 Dani Megert CLA 2005-11-08 09:50:24 EST

*** This bug has been marked as a duplicate of 85883 ***