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

Deploy the org.eclipse.images bundle to central #81

Open
laeubi opened this issue Jul 6, 2024 · 4 comments
Open

Deploy the org.eclipse.images bundle to central #81

laeubi opened this issue Jul 6, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@laeubi
Copy link
Contributor

laeubi commented Jul 6, 2024

There was recently a discussion about images reuse currently we copy images from org.eclipse.images to the individual bundles (and others do as well).

If we would deploy the org.eclipse.images to central it could be

  1. reused by others
  2. even platform might ship it and use icons from there

This would then even allow one to exchange the icons of eclipse quite easy, as one can simply just swap out that single bundle with a custom one.
If I write a own plugin and then add my icons as a fragment of org.eclipse.images, then this would even work for custom written plugins.

FYI @ruspl-afed

@laeubi laeubi added the enhancement New feature or request label Jul 6, 2024
@ruspl-afed
Copy link

Thank you for letting me know @laeubi

Trick with fragment should work for simple cases, but I never tried it for more complex setups. For example, if we have an image coming from NLS fragment, will it be possible to replace this image from another fragment?

@laeubi
Copy link
Contributor Author

laeubi commented Jul 6, 2024

Fragments can only enhance but not replace things, so if one want NLS support one needs to support NLS aware image path (like we already did for different zoom levels).

@ruspl-afed
Copy link

TBH I don't know if Eclipse Babel is ever going to supply NL images with its NL features.
But let's imagine it does so, and we have org.eclipse.images bundle + org.eclipse.images.nls.something image fragment
Will it be possible to customize an image with custom fragment in this case?

@laeubi
Copy link
Contributor Author

laeubi commented Jul 6, 2024

The easiest would be to simply replace the image in either org.eclipse.images or org.eclipse.images.nls.something as these are just jar zip files, instead of nls I more thought about e.g.m2e shipping its icons in an org.eclipse.images.m2e fragment, so in code one can always use the url platform:/bundle:org.eclipse.images/some/shared/icon.png

Of course one could think of (and I used that in one of my products) that one first looks for the custom name and then for the common name, that then will allow easily to have some "iconpack" fragments, e.g assume we have the following icon URL used icon:/org.eclipse.images/icons/pde/plugin.png (note the initial icon prefix!).

The URL Stream handler for "icon" then can look at the org.eclipse.images bundle and first search an entry with /custom/pde/plugin.png if no such item exits, it looks for /pde/plugin.png entry, then such an icon can be overridden by providing a fragment that contains an icon in the folder /custom/pde/plugin.png ... one could even think about instead of using "custom" to have it using a "theme-id" instead that is a system property...

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

No branches or pull requests

2 participants