Bug 329984 - Manifest editor should perform more validation for Eclipse-PlatformFilter
Summary: Manifest editor should perform more validation for Eclipse-PlatformFilter
Status: CLOSED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-11 06:12 EST by Stephan Herrmann CLA
Modified: 2019-08-19 00:50 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2010-11-11 06:12:08 EST
In bug 329854 we noticed that a misspelled platform filter is never
diagnosed throughout the whole tool chain editor->builder->metadata generator
up-to the b3 aggregator.

It was argued that the aggregator doesn't know about *platform filters*,
but only about generic filters. However, the manifest clearly states
"Eclipse-PlatformFilter", so before the information is lost that the
filter is intended to be a platform filter someone should check it.

I was going to propose a patch but it seems that this needs additional
API from org.eclipse.osgi. 
The BundleErrorReporter uses this line to check the filter:

  PDECore.getDefault().getBundleContext().createFilter(header.getValue());

This will only detect syntax errors. The result from that method call is
discarded and indeed the Filter interface doesn't give enough information
for validating the attributes used in the filter, only the internal
FilterImpl has a "getAttributes()" method that could be used.

Inside the framework it would be easy to implement s.t. like

  String findUndeclaredAttribute(Filter filter, String[] attributes)

which for an array of permitted attribute names would return the first
invalid attribute name in filter.

Ideally also the values should be checked if they match any known platform.
I guess in this case a problem should only be reported as a warning,
because new platforms may become available. Also checking would require
a little more effort, but I'm happy to suggest an implementation if that'll
be welcomed by the framework.
Comment 1 Eclipse Genie CLA 2019-08-19 00:50:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.