Skip to content

Avoid implementations of ImageDescriptor.getImageData() #2907

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

Merged

Conversation

HannesWell
Copy link
Member

@HannesWell HannesWell commented Apr 11, 2025

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.

Comment on lines -133 to -137
@Deprecated
@Override
public ImageData getImageData() {
return getImageData(getURL(url), 100, 100);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Contributor

github-actions bot commented Apr 11, 2025

Test Results

 1 824 files  ±0   1 824 suites  ±0   1h 39m 29s ⏱️ + 1m 11s
 7 918 tests ±0   7 690 ✅ ±0  228 💤 ±0  0 ❌ ±0 
23 841 runs  ±0  23 093 ✅ ±0  748 💤 ±0  0 ❌ ±0 

Results for commit 2ad2498. ± Comparison against base commit b5ed8be.

♻️ This comment has been updated with latest results.

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.
@HannesWell HannesWell force-pushed the streamline-imageDescriptors branch from 32f5437 to 2ad2498 Compare April 11, 2025 17:47
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jface;singleton:=true
Bundle-Version: 3.36.100.qualifier
Bundle-Version: 3.37.0.qualifier
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow API-tools considers the removal of the (deprecated) overriden method from CompositeImageDescriptor as API addition and demands to minor version bump.

@HannesWell HannesWell merged commit 0c576c6 into eclipse-platform:master Apr 11, 2025
18 checks passed
@HannesWell HannesWell deleted the streamline-imageDescriptors branch April 11, 2025 22:00
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.

3 participants