Avoid implementations of ImageDescriptor.getImageData()#2907
Merged
HannesWell merged 1 commit intoeclipse-platform:masterfrom Apr 11, 2025
Merged
Conversation
HannesWell
commented
Apr 11, 2025
Comment on lines
-133
to
-137
| @Deprecated | ||
| @Override | ||
| public ImageData getImageData() { | ||
| return getImageData(getURL(url), 100, 100); | ||
| } |
Member
Author
There was a problem hiding this comment.
@Michael5601 FYI as this was a relevant point in our discussion at #2593. As before that change this implementation now just behaves as if getImageData(100) is called and therefore as the default implementation in the super-class. It can therefore just be removed.
Contributor
ImageDescriptor.getImageData() is deprecated and sub-classes are advised to stop re-implementing it and instead implement getImageData(int). The still existing implementations just replicate the default implementation and therefore can just be removed. Additionally implementation of ImageDescriptor.getMissingImageDescriptor() is simplified and ImageDescriptor implementations are cleaned-up.
32f5437 to
2ad2498
Compare
HannesWell
commented
Apr 11, 2025
| Bundle-Name: %pluginName | ||
| Bundle-SymbolicName: org.eclipse.jface;singleton:=true | ||
| Bundle-Version: 3.36.100.qualifier | ||
| Bundle-Version: 3.37.0.qualifier |
Member
Author
There was a problem hiding this comment.
Somehow API-tools considers the removal of the (deprecated) overriden method from CompositeImageDescriptor as API addition and demands to minor version bump.
basilevs
reviewed
May 16, 2025
...ipse.ui.workbench/eclipseui/org/eclipse/ui/internal/misc/ExternalProgramImageDescriptor.java
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ImageDescriptor.getImageData()is deprecated and sub-classes are advised to stop re-implementing it and instead implementgetImageData(int). The still existing implementations just replicate the default implementation and therefore can just be removed.Additionally implementation of
ImageDescriptor.getMissingImageDescriptor()is simplified andImageDescriptorimplementations are cleaned-up.