Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Invalid manifest files
Invalid manifest files [message #61939] Fri, 15 May 2009 15:14 Go to next message
Ralf Grossklaus is currently offline Ralf GrossklausFriend
Messages: 20
Registered: July 2009
Location: Stuttgart, Germany
Junior Member
Hello,

I wrote a wizard which creates new projects in an workspace. These
projects do have a plugin nature (despite other custom natures) and
therefore i need to add plug-in dependencies. For this part, i use
WorkspaceBundlePluginModel from PDE (i know, it's not part of the API,
but i haven't found a better solution).

Anyways, i've noticed that adding additional bundle dependencies, might
lead to an invalid manifest file, since the existing dependencies are
all written to a single line which might exceed the 72 bytes limit. I
dug a bit deeper in the PDE code and i found out that the class
"org.eclipse.osgi.util.ManifestElement.parseBundleManifest() ", which is
used by BundleModel.load() simple eliminates line breaks when parsing
the manifest file, and put all the comma separated values in one line
(with the result described above). I don't think, that this is desired
behaviour. What about you?!

Regards, Ralf
Re: Invalid manifest files [message #61963 is a reply to message #61939] Fri, 15 May 2009 15:42 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Why don't you just rewrite the Manifest file directly (using the
standard Java API classes)? PDE's manifest builder should then take care
of adding in the correct plugin dependencies to the project.

There's been another thread on this on this newsgroup some months ago
and I'm quite successfully using the standard Manifest API classes myself.

Cheers,

Steffen

Ralf Grossklaus wrote:
> Hello,
>
> I wrote a wizard which creates new projects in an workspace. These
> projects do have a plugin nature (despite other custom natures) and
> therefore i need to add plug-in dependencies. For this part, i use
> WorkspaceBundlePluginModel from PDE (i know, it's not part of the API,
> but i haven't found a better solution).
>
> Anyways, i've noticed that adding additional bundle dependencies, might
> lead to an invalid manifest file, since the existing dependencies are
> all written to a single line which might exceed the 72 bytes limit. I
> dug a bit deeper in the PDE code and i found out that the class
> "org.eclipse.osgi.util.ManifestElement.parseBundleManifest() ", which is
> used by BundleModel.load() simple eliminates line breaks when parsing
> the manifest file, and put all the comma separated values in one line
> (with the result described above). I don't think, that this is desired
> behaviour. What about you?!
>
> Regards, Ralf
>

--
Dr. rer. nat. Steffen Zschaler
Senior Research Associate

Lancaster University
Lancaster, United Kingdom

Email szschaler@acm.org
Phone +44 (01524) 510354
WWW http://www.steffen-zschaler.de/

--
Consider submitting to GPCE, the 8th International Conference
on Generative Programming and Component Engineering
http://www.gpce.org/
Re: Invalid manifest files [message #62149 is a reply to message #61963] Mon, 18 May 2009 07:03 Go to previous message
Ralf Grossklaus is currently offline Ralf GrossklausFriend
Messages: 20
Registered: July 2009
Location: Stuttgart, Germany
Junior Member
Hello Steffen,

thanks for the quick reply.

Yes, i could rewrite the manifest file. But the problem with
ManifestElement.parseBundleManifest() remains. It's not only my wizard
that has troubles with invalie manifest files. The standard plug-in
project wizard has the same problem. You can easily test it yourself:

1) Create a new plug-in project 'test' in your workspace (use default
location)
2) add a number of plug-in dependencies to the manifest.
3) delete the project from you workspace, but don't delete the files on
the disk.
4) Create the same project 'test' again (use the same location as before).

The plug-in wizard parses the manifest file, which is already there,
making it invalid (since all plug-in dependencies are now on a single line).

Yes i know, this is not sensible use case. But still, i think a wizard
should not create invalid files silently. It should at least issue some
sort of warning about the existing project. What do you think?

Regards, Ralf!



Steffen Zschaler wrote:
> Why don't you just rewrite the Manifest file directly (using the
> standard Java API classes)? PDE's manifest builder should then take care
> of adding in the correct plugin dependencies to the project.
>
> There's been another thread on this on this newsgroup some months ago
> and I'm quite successfully using the standard Manifest API classes myself.
>
> Cheers,
>
> Steffen
>
> Ralf Grossklaus wrote:
>> Hello,
>>
>> I wrote a wizard which creates new projects in an workspace. These
>> projects do have a plugin nature (despite other custom natures) and
>> therefore i need to add plug-in dependencies. For this part, i use
>> WorkspaceBundlePluginModel from PDE (i know, it's not part of the API,
>> but i haven't found a better solution).
>>
>> Anyways, i've noticed that adding additional bundle dependencies, might
>> lead to an invalid manifest file, since the existing dependencies are
>> all written to a single line which might exceed the 72 bytes limit. I
>> dug a bit deeper in the PDE code and i found out that the class
>> "org.eclipse.osgi.util.ManifestElement.parseBundleManifest() ", which is
>> used by BundleModel.load() simple eliminates line breaks when parsing
>> the manifest file, and put all the comma separated values in one line
>> (with the result described above). I don't think, that this is desired
>> behaviour. What about you?!
>>
>> Regards, Ralf
>>
>
Re: Invalid manifest files [message #597537 is a reply to message #61939] Fri, 15 May 2009 15:42 Go to previous message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Why don't you just rewrite the Manifest file directly (using the
standard Java API classes)? PDE's manifest builder should then take care
of adding in the correct plugin dependencies to the project.

There's been another thread on this on this newsgroup some months ago
and I'm quite successfully using the standard Manifest API classes myself.

Cheers,

Steffen

Ralf Grossklaus wrote:
> Hello,
>
> I wrote a wizard which creates new projects in an workspace. These
> projects do have a plugin nature (despite other custom natures) and
> therefore i need to add plug-in dependencies. For this part, i use
> WorkspaceBundlePluginModel from PDE (i know, it's not part of the API,
> but i haven't found a better solution).
>
> Anyways, i've noticed that adding additional bundle dependencies, might
> lead to an invalid manifest file, since the existing dependencies are
> all written to a single line which might exceed the 72 bytes limit. I
> dug a bit deeper in the PDE code and i found out that the class
> "org.eclipse.osgi.util.ManifestElement.parseBundleManifest() ", which is
> used by BundleModel.load() simple eliminates line breaks when parsing
> the manifest file, and put all the comma separated values in one line
> (with the result described above). I don't think, that this is desired
> behaviour. What about you?!
>
> Regards, Ralf
>

--
Dr. rer. nat. Steffen Zschaler
Senior Research Associate

Lancaster University
Lancaster, United Kingdom

Email szschaler@acm.org
Phone +44 (01524) 510354
WWW http://www.steffen-zschaler.de/

--
Consider submitting to GPCE, the 8th International Conference
on Generative Programming and Component Engineering
http://www.gpce.org/
Re: Invalid manifest files [message #597607 is a reply to message #61963] Mon, 18 May 2009 07:03 Go to previous message
Ralf Grossklaus is currently offline Ralf GrossklausFriend
Messages: 20
Registered: July 2009
Location: Stuttgart, Germany
Junior Member
Hello Steffen,

thanks for the quick reply.

Yes, i could rewrite the manifest file. But the problem with
ManifestElement.parseBundleManifest() remains. It's not only my wizard
that has troubles with invalie manifest files. The standard plug-in
project wizard has the same problem. You can easily test it yourself:

1) Create a new plug-in project 'test' in your workspace (use default
location)
2) add a number of plug-in dependencies to the manifest.
3) delete the project from you workspace, but don't delete the files on
the disk.
4) Create the same project 'test' again (use the same location as before).

The plug-in wizard parses the manifest file, which is already there,
making it invalid (since all plug-in dependencies are now on a single line).

Yes i know, this is not sensible use case. But still, i think a wizard
should not create invalid files silently. It should at least issue some
sort of warning about the existing project. What do you think?

Regards, Ralf!



Steffen Zschaler wrote:
> Why don't you just rewrite the Manifest file directly (using the
> standard Java API classes)? PDE's manifest builder should then take care
> of adding in the correct plugin dependencies to the project.
>
> There's been another thread on this on this newsgroup some months ago
> and I'm quite successfully using the standard Manifest API classes myself.
>
> Cheers,
>
> Steffen
>
> Ralf Grossklaus wrote:
>> Hello,
>>
>> I wrote a wizard which creates new projects in an workspace. These
>> projects do have a plugin nature (despite other custom natures) and
>> therefore i need to add plug-in dependencies. For this part, i use
>> WorkspaceBundlePluginModel from PDE (i know, it's not part of the API,
>> but i haven't found a better solution).
>>
>> Anyways, i've noticed that adding additional bundle dependencies, might
>> lead to an invalid manifest file, since the existing dependencies are
>> all written to a single line which might exceed the 72 bytes limit. I
>> dug a bit deeper in the PDE code and i found out that the class
>> "org.eclipse.osgi.util.ManifestElement.parseBundleManifest() ", which is
>> used by BundleModel.load() simple eliminates line breaks when parsing
>> the manifest file, and put all the comma separated values in one line
>> (with the result described above). I don't think, that this is desired
>> behaviour. What about you?!
>>
>> Regards, Ralf
>>
>
Previous Topic:No runnable method
Next Topic:popup menu entry on different perspective
Goto Forum:
  


Current Time: Tue Apr 16 21:17:26 GMT 2024

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

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

Back to the top