Skip to content

Fix loading of SVGs at different size#2705

Merged
eselmeister merged 1 commit intoeclipse-chemclipse:developfrom
akurtakov:develop
Feb 12, 2026
Merged

Fix loading of SVGs at different size#2705
eselmeister merged 1 commit intoeclipse-chemclipse:developfrom
akurtakov:develop

Conversation

@akurtakov
Copy link
Contributor

It's a limitation in how SWT treats SVG images - uses the width/height in the svg file and treats it as fixed size to fit into all the use cases with old APIs.
Use SWT's internals to load at requested size and store in the cache with key that includes the size.

@akurtakov akurtakov force-pushed the develop branch 3 times, most recently from a7985a7 to 50c501d Compare February 12, 2026 13:57
It's a limitation in how SWT treats SVG images - uses the width/height
in the svg file and treats it as fixed size to fit into all the use
cases with old APIs.
Use SWT's internals to load at requested size and store in the cache
with key that includes the size.
@akurtakov
Copy link
Contributor Author

akurtakov commented Feb 12, 2026

If I suppress the warnings with annotation for the IDE Maven builds fails with:

[WARNING] /home/akurtakov/git/chemclipse/chemclipse/plugins/org.eclipse.chemclipse.rcp.ui.icons/src/org/eclipse/chemclipse/rcp/ui/icons/core/AbstractApplicationImage.java:[63] 
	@SuppressWarnings("restriction")
	                  ^^^^^^^^^^^^^
Unnecessary @SuppressWarnings("restriction")
[WARNING] /home/akurtakov/git/chemclipse/chemclipse/plugins/org.eclipse.chemclipse.rcp.ui.icons/src/org/eclipse/chemclipse/rcp/ui/icons/core/AbstractApplicationImage.java:[70] 
	@SuppressWarnings("restriction")
	                  ^^^^^^^^^^^^^
Unnecessary @SuppressWarnings("restriction")
2 problems (2 warnings)
error: warnings found and -failOnWarning specified

@eselmeister eselmeister merged commit e29843f into eclipse-chemclipse:develop Feb 12, 2026
3 checks passed
@akurtakov
Copy link
Contributor Author

akurtakov commented Feb 12, 2026

So this is a limitation in Tycho as it doesn't apply all the analysis pde does. Options are:

  • disable -failOnWarning in Tycho
  • accept warning in workspace
  • do some non trivial work on tycho to support it

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.

2 participants