Bug 527741 - PDE should not warn if resource URI of unknown scheme cannot be found
Summary: PDE should not warn if resource URI of unknown scheme cannot be found
Status: NEW
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7.1a   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted, investigate
Depends on:
Blocks:
 
Reported: 2017-11-24 17:21 EST by Daniel Krügler CLA
Modified: 2023-10-29 09:19 EDT (History)
3 users (show)

See Also:


Attachments
Helpful warning when an icon path is incorrect (4.10 KB, image/png)
2017-11-24 17:24 EST, Daniel Krügler CLA
no flags Details
RCP demo client showing image-id scheme (148.36 KB, application/x-zip-compressed)
2017-11-24 17:27 EST, Daniel Krügler CLA
no flags Details
Bad example for a warnings because of unknown URI schemes (33.52 KB, image/png)
2017-11-24 17:41 EST, Daniel Krügler CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Krügler CLA 2017-11-24 17:21:49 EST
The Eclipse Plugin Development Editor has a very nice validation feature for resource locations denoted in plugin.xml: If the corresponding resource cannot be found (Typically caused by a typo of the user, for example), the xml element is marked with a warning that clearly indicates the problem. This is an excellent approach for resource URIs that are understood by the PDE, but very unfortunate when programmers have registered an org.osgi.service.url.URLStreamHandlerService OSGi service that specifies a user-defined URI scheme (protocol), which is of-course unknown to the PDE. Since years we use successfully in our company a plugin extension that allows to register image resource locations for a concrete ID value via a user-defined URI scheme (e.g. "image-id"). The advantage is that these IDs are stable, although the referenced icon location can be configured differently. The only disadvantage of that concept is that our plugin.xml's are now full of warnings, because the PDE resource validation doesn't understand the URI scheme and chokes for each referenced image-id URI.

I would like to suggest that the existing PDE validation should only warn for location URIs that it understands (and can decode) and where the path resolution doesn't succeed. If that would be considered as a new source of user errors (Because a user could of-course make a typo in the scheme), would it be possible to make warnings for URI schemes that are not understood a configurable warning option?

To explain the use case a bit better, I will attach a short example program demonstrating the image-id URI approach used in a simple demo client.
Comment 1 Daniel Krügler CLA 2017-11-24 17:24:39 EST
Created attachment 271637 [details]
Helpful warning when an icon path is incorrect

This screenshot shows first the positive effects of the current PDE resource location waarning
Comment 2 Daniel Krügler CLA 2017-11-24 17:27:56 EST
Created attachment 271638 [details]
RCP demo client showing image-id scheme

The attached RCP demo client shows how two images are registered via an extension point kruegler.daniel.imageregistry.images and how these are successfully referenced as view icon and menu icon with the unfortunate side effect that the PDE validation warns here as well  because it doesn't understand the image-id URIs.
Comment 3 Daniel Krügler CLA 2017-11-24 17:41:04 EST
Created attachment 271639 [details]
Bad example for a warnings because of unknown URI schemes

This screenshot shows the warnings caused by the PDE validation for the image-id URIs which are correct. The RCP demo client resolves them correctly during runtime.
Comment 4 Eclipse Genie CLA 2019-11-15 06:50:09 EST
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.
Comment 5 Daniel Krügler CLA 2019-11-15 06:55:19 EST
(In reply to Eclipse Genie from comment #4)
> 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.

This problem still exists and is quite annoying for us - please don't close it prematurely!
Comment 6 Julian Honnen CLA 2019-11-15 09:44:50 EST
(In reply to Daniel Kruegler from comment #0)
> I would like to suggest that the existing PDE validation should only warn
> for location URIs that it understands (and can decode) and where the path
> resolution doesn't succeed. 
That sounds reasonable. If the value is a valid URI, we should ignore it except for the handled platform:/ scheme (and probably file:/).


> If that would be considered as a new source of
> user errors (Because a user could of-course make a typo in the scheme),
> would it be possible to make warnings for URI schemes that are not
> understood a configurable warning option?
That's not needed IMO. If there is a typo in the scheme, we currently can't detect that anyway.
Comment 7 Eclipse Genie CLA 2021-11-06 08:31:05 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.
Comment 8 Eclipse Genie CLA 2023-10-29 09:13:10 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.
Comment 9 Daniel Krügler CLA 2023-10-29 09:19:03 EDT
(In reply to Eclipse Genie from comment #8)
> 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.

Can we keep the bug open, please? I will try to make a PULL request. Could please someone give me a hint, which project is responsible for this URI validation?