Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Manifest: CTRL-F does not format long lines
Manifest: CTRL-F does not format long lines [message #524971] Sun, 04 April 2010 23:42 Go to next message
Jens Muehlenhoff is currently offline Jens MuehlenhoffFriend
Messages: 20
Registered: July 2009
Junior Member
Hello,

I want to format my MANIFEST.MF file, which contains a very long

Service-Component: OSGI-INF/Service0.xml, OSGI-INF/Service1.xml, OSGI-INF/Service2.xml

line.

* Is this a feature or a bug? (because Service-Component lines will not be formatted?)
* The error message says "This line is to long". How long could a MANIFEST.Mf line be? this would be
interesting, because I do not know and I have to format it on my own.

If it is a bug, where could I file it -- there are a lot of products, components in the bugzilla

Regards,

Jens
Re: Manifest: CTRL-F does not format long lines [message #524972 is a reply to message #524971] Sun, 04 April 2010 19:30 Go to previous messageGo to next message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 168
Registered: July 2009
Senior Member
Hi Jens,

> * The error message says "This line is to long". How long could a MANIFEST.Mf line be? this would be
> interesting, because I do not know and I have to format it on my own.

The JAR File spec
http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#JAR%2 0Manifest
states:

------------------------------------------------------------ ------------
* Line length:

No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If
a value would make the initial line longer than this, it should be continued on extra
lines (each starting with a single SPACE).
------------------------------------------------------------ --------------

> * Is this a feature or a bug? (because Service-Component lines will not be formatted?)

The Eclipse Manifest editor has no formatter. I also don't get a warning/error about long
lines. But when a bundle is exported, the MANIFEST.MF is properly formatted and long lines
are wrapped. Bugs for the manifest editor belong to PDE / UI.

Greetings,

Ralf


--
http://www.ralfebert.de/blog/
http://twitter.com/ralfebert/
Re: Manifest: CTRL-F does not format long lines [message #524973 is a reply to message #524972] Mon, 05 April 2010 00:24 Go to previous messageGo to next message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 168
Registered: July 2009
Senior Member
Hi again,

> The Eclipse Manifest editor has no formatter.

sorry, this should have been "the formatter for the eclipse manifest editor doesn't do
line wrapping".

Greetings,
Ralf


--
http://www.ralfebert.de/blog/
http://twitter.com/ralfebert/
Re: Manifest: CTRL-F does not format long lines [message #525256 is a reply to message #524973] Mon, 05 April 2010 15:50 Go to previous messageGo to next message
Jens Muehlenhoff is currently offline Jens MuehlenhoffFriend
Messages: 20
Registered: July 2009
Junior Member
Ralf Ebert wrote:
> sorry, this should have been "the formatter for the eclipse manifest
> editor doesn't do line wrapping".

Hello Ralf,

it does some kind of line wrapping. E.g. one line with

Import-Package: de.kue.osgi.scr2.a,org.osgi.framework;version="1.3.0",
org.osgi.service.component;version="1.1.0"

is changed into

Import-Package: de.kue.osgi.scr2.a,
org.osgi.framework;version="1.3.0",
org.osgi.service.component;version="1.1.0"

This is, what I expected for the "Service-Component:"

By the way it looks like the error show up if a line is longer than 500 characters. This is quiet a
little bit more than the 72 bytes ;).

Regards,
Jens
Re: Manifest: CTRL-F does not format long lines [message #605454 is a reply to message #524971] Mon, 05 April 2010 00:20 Go to previous messageGo to next message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 168
Registered: July 2009
Senior Member
Hi Jens,

> * The error message says "This line is to long". How long could a MANIFEST.Mf line be? this would be
> interesting, because I do not know and I have to format it on my own.

The JAR File spec
http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#JAR%2 0Manifest
states:

------------------------------------------------------------ ------------
* Line length:

No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If
a value would make the initial line longer than this, it should be continued on extra
lines (each starting with a single SPACE).
------------------------------------------------------------ --------------

> * Is this a feature or a bug? (because Service-Component lines will not be formatted?)

The Eclipse Manifest editor has no formatter. I also don't get a warning/error about long
lines. But when a bundle is exported, the MANIFEST.MF is properly formatted and long lines
are wrapped. Bugs for the manifest editor belong to PDE / UI.

Greetings,

Ralf


--
http://www.ralfebert.de/blog/
http://twitter.com/ralfebert/
Re: Manifest: CTRL-F does not format long lines [message #605457 is a reply to message #605454] Mon, 05 April 2010 00:24 Go to previous messageGo to next message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 168
Registered: July 2009
Senior Member
Hi again,

> The Eclipse Manifest editor has no formatter.

sorry, this should have been "the formatter for the eclipse manifest editor doesn't do
line wrapping".

Greetings,
Ralf


--
http://www.ralfebert.de/blog/
http://twitter.com/ralfebert/
Re: Manifest: CTRL-F does not format long lines [message #605463 is a reply to message #524973] Mon, 05 April 2010 20:42 Go to previous message
Jens Muehlenhoff is currently offline Jens MuehlenhoffFriend
Messages: 20
Registered: July 2009
Junior Member
Ralf Ebert wrote:
> sorry, this should have been "the formatter for the eclipse manifest
> editor doesn't do line wrapping".

Hello Ralf,

it does some kind of line wrapping. E.g. one line with

Import-Package: de.kue.osgi.scr2.a,org.osgi.framework;version="1.3.0",
org.osgi.service.component;version="1.1.0"

is changed into

Import-Package: de.kue.osgi.scr2.a,
org.osgi.framework;version="1.3.0",
org.osgi.service.component;version="1.1.0"

This is, what I expected for the "Service-Component:"

By the way it looks like the error show up if a line is longer than 500 characters. This is quiet a
little bit more than the 72 bytes ;).

Regards,
Jens
Previous Topic:PDE (batch) Build and P2 ... where to condition or sign?
Next Topic:Eclipse plugin not activated.
Goto Forum:
  


Current Time: Sat Apr 27 02:59:08 GMT 2024

Powered by FUDForum. Page generated in 0.03326 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top