Skip to content

Add SVGs to org.eclipse.jdt.ui bundles#2174

Merged
jjohnstn merged 1 commit intoeclipse-jdt:masterfrom
Michael5601:org.eclipse.jdt.ui.SVGs
Apr 28, 2025
Merged

Add SVGs to org.eclipse.jdt.ui bundles#2174
jjohnstn merged 1 commit intoeclipse-jdt:masterfrom
Michael5601:org.eclipse.jdt.ui.SVGs

Conversation

@Michael5601
Copy link
Copy Markdown
Contributor

@Michael5601 Michael5601 commented Apr 22, 2025

This PR adds SVGs for all icons in the bundles eclipse.jdt.ui and eclipse.jdt.ui.unittest.junit except for the following as these do not yet exist as SVG:

eclipse.jdt.ui/etool16/move_up.svg
eclipse.jdt.ui/wizban/newrecord_wiz.svg

Not all icons can be loaded via SVGs since some icons are made API via org.eclipse.jdt.ui.ISharedImages. There is a converter that was used for loading PNGs instead. I adjusted this converter so SVGs will be loaded: org.eclipse.jdt.internal.ui.JavaPluginImages.createImageDescriptor(Bundle, IPath, boolean)

I did not change the functionality in org.eclipse.jdt.internal.ui.viewsupport.ImagesOnFileSystemRegistry.getNewFile() by changing .png to .svg as I don't know the side effects.

Icon disablement is not yet removed.

See also this PR for more information.

This commit adds SVGs for all icons in the bundles `eclipse.jdt.ui` and `eclipse.jdt.ui.unittest.junit` except for the following as these do not yet exist as SVG:

eclipse.jdt.ui/etool16/move_up.svg
eclipse.jdt.ui/wizban/newrecord_wiz.svg

Not all icons can be loaded via SVGs since some icons are made API via org.eclipse.jdt.ui.ISharedImages. There is a converter that was used for loading PNGs instead. I adjusted this converter so SVGs will be loaded:
`org.eclipse.jdt.internal.ui.JavaPluginImages.createImageDescriptor(Bundle, IPath, boolean)`

I did not change the functionality in `org.eclipse.jdt.internal.ui.viewsupport.ImagesOnFileSystemRegistry.getNewFile()` by changing `.png` to `.svg` as I don't know the side effects.
Copy link
Copy Markdown
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

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

The change is sound.

It adopts the support for SVGs added to SWT in order to provide sharp icons for any, even fractional zoom from a single source: eclipse-platform/eclipse.platform.swt#1638

Disabled icons are not replaced by SVGs but are to be replaced with on-the-fly generation from the enabled version, see:

@jjohnstn jjohnstn merged commit 0e5e812 into eclipse-jdt:master Apr 28, 2025
10 checks passed
@Michael5601 Michael5601 deleted the org.eclipse.jdt.ui.SVGs branch April 29, 2025 08:13
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