Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create static variant of ImageDescriptor.imageDescriptorFromURI() #2416

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ptziegler
Copy link
Contributor

This method is intended to be used as a wrapper for createFromURL() to avoid having to deal with the checked MalformedURLException. However, this method is effectively unusable, as it requires the user to already have an instance of the ImageDescriptor they want to created.

Instead, create a new, static createFromURI() method, mark the old method as deprecated and internally delegate to the new method.

The old method was created as a response to Bug 559656 [1], in order to match the signature of IResourceUtilities. But because the latter is accessed via an OSGi service, it doesn't need to be static. Which is something that doesn't really work for image descriptors.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=559656

This method is intended to be used as a wrapper for createFromURL() to
avoid having to deal with the checked MalformedURLException. However,
this method is effectively unusable, as it requires the user to already
have an instance of the ImageDescriptor they want to created.

Instead, create a new, static createFromURI() method, mark the old
method as deprecated and internally delegate to the new method.

The old method was created as a response to Bug 559656 [1], in order to
match the signature of IResourceUtilities. But because the latter is
accessed via an OSGi service, it doesn't need to be static. Which is
something that doesn't really work for image descriptors.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=559656
@ptziegler
Copy link
Contributor Author

@vogella You contributed the original method. wdyt?

Copy link
Contributor

Test Results

 1 818 files  ±0   1 818 suites  ±0   1h 42m 51s ⏱️ + 8m 4s
 7 709 tests ±0   7 480 ✅  - 1  228 💤 ±0  1 ❌ +1 
24 288 runs  ±0  23 540 ✅  - 1  747 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 4017574. ± Comparison against base commit 929564c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant