Skip to content

Allow products to replace icons with combinable icon packs - #4603

Open
HeikoKlare wants to merge 1 commit into
eclipse-platform:masterfrom
HeikoKlare:icon-packs-runtime
Open

HeikoKlare wants to merge 1 commit into
eclipse-platform:masterfrom
HeikoKlare:icon-packs-runtime

Conversation

@HeikoKlare

@HeikoKlare HeikoKlare commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

What & Why

Products that want a different icon style can today only replace icons by patching the resources of the Platform bundles, e.g., with the Equinox transforms hook, which requires full control over the product's content. Icon packs from different providers, such as the Platform, other projects or third parties, cannot be combined that way. The discussion in #2870 agreed on icon packs that are combinable without knowing each other, built on the IImageURLModifier hook from #4399.

With this change, a product can enable icon packs in its plugin_customization.ini. An icon pack is a bundle that replaces icons of other bundles without changing them. Several enabled packs are combined in the order of the preference: the first enabled pack that replaces an icon wins, and icons that no pack replaces keep their original appearance. Changes take effect after a restart. The example org.eclipse.ui.examples.iconpacks provides three small packs with overlapping icons and a toolbar drop-down that switches between combinations of them, to try out how packs are combined.

The new bundle org.eclipse.e4.ui.iconpacks defines an internal extension point, in which a pack maps original icons, identified by bundle and path, to its replacement icons via a properties file. It registers an IImageURLModifier service that applies the enabled packs whenever JFace loads an image. The service has the default ranking, so a bundle that registers its own modifier with a higher ranking replaces it. docs/IconPacks.md describes the concept and its limitations, and two ADRs record why packs are contributed via an extension point and mapped in a properties file.

This is the first increment: nothing is exported or declared as API, so that everything can still change. Letting users select packs in the preferences, and a dual-tone pack for the Platform UI, come in a follow-up. A preview of that full implementation is on the branch icon-packs-appearance of my fork. This PR depends on a separate fix of the IImageURLModifier hook, which stops the workbench from persisting replacement icon URLs in the workbench model (e.g., in perspectives saved while a pack is enabled), so that changing the enabled packs fully takes effect after a restart; that fix will be opened as its own PR.

How to test

The test shows that icons are replaced by the enabled packs and that combined packs resolve overlaps by their order.

  1. Launch a runtime workbench from the IDE that includes org.eclipse.e4.ui.iconpacks and org.eclipse.ui.examples.iconpacks.
  2. In the main toolbar, open the drop-down of the Example Icon Packs button (three overlapping colored squares) and select Red, Green, Blue. The workbench restarts.
  3. Without this change, there is no such button and all icons are the original ones. With it, Save, Copy, Paste and Search are red, the Problems and Outline view icons are green and the Properties view icon is blue, in the toolbar, in menus and in view tabs alike.
  4. Select Blue, Green, Red: after the restart, Paste, Search, Outline and Properties are blue, Copy and Problems green, and Save red.
  5. To enable packs as a product does, launch with a fresh workspace and -pluginCustomization <file>, where the file contains org.eclipse.e4.ui.iconpacks/enabledIconPacks=org.eclipse.ui.examples.iconpacks.green: only Copy, Paste, Problems and Outline are green.

Screenshots

The main toolbar and the Outline and Problems tabs of the Java perspective (light theme, 100% zoom), without an icon pack, with the example packs enabled as Red, Green, Blue, and as Blue, Green, Red. The first enabled pack that replaces an icon wins: Search turns red and then blue, Outline green and then blue, while Problems stays green, as only the green pack replaces it.

image

@vogella

vogella commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Hey @HeikoKlare, thanks for picking up this open work item. It already looks very good, and I like that packs can be combined without knowing each other. Two points that would be good to consider while this is still internal:

Theme dependency. Icon sets often come in a light and a dark variant, but enabledIconPacks is independent of the active theme. A user switching to a dark theme has to change the packs by hand. I suggest an optional dark/light flag on the iconPack element. A flagged pack is only applied if the active theme matches, and a pack without the flag always applies. Both variants can then be enabled together. A restart after the theme switch would be fine as a first step.

File extension in keys. The keys include the extension, so a mapping for copy_edit.png stops matching once the bundle moves to copy_edit.svg. This happens silently, and a pack that supports several releases has to list both. Matching on the path without extension would avoid that. The drawback is that two icons differing only in extension could no longer be mapped separately.

@vogella

vogella commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Once this goes in, I can add an optional css handler so that css themes can define their favorite icon set.

@HeikoKlare

Copy link
Copy Markdown
Contributor Author

Thank you for the immediate feedback!

Dropping the file extensions from keys sounds reasonable to me. I consider the chance that there are two icons only differing in their extension quite low, so I would accept the risk for the sake of making the mapping resilient against icon replacements with other formats. I will adapt the PR accordingly.

I also like the idea of theme dependency, just that I propose to keep this for a follow-up PR. This PR currently also does not contain any preferences UI or actual theme integration (which will be part of a follow-up PR, with the code already being present on the branch linked in the PR description) and I would like to make it even smaller if possible, it's just that essential functionality and examples for demonstrating the usage are necessary. Or do you see an issue with integrating the theme dependency as a follow-up?

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

   870 files  + 3     870 suites  +3   58m 20s ⏱️ + 2m 51s
 8 658 tests +20   8 418 ✅ +20  240 💤 ±0  0 ❌ ±0 
21 843 runs  +60  21 170 ✅ +60  673 💤 ±0  0 ❌ ±0 

Results for commit a3c3fd7. ± Comparison against base commit 2640004.

♻️ This comment has been updated with latest results.

@vogella

vogella commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Or do you see an issue with integrating the theme dependency as a follow-up?

No. We can add that theme dependency as easy follow-up similar to preference pages. I would recommend to not wait to long with this change before merging so that we can polish it. We already missed to deliver this functionality in the last release and starting this early should give us an edge.

@HeikoKlare

Copy link
Copy Markdown
Contributor Author

Great, then let's keep it as follow-up.
And yes, I plan to finalize this as soon as possible and provide the follow-ups with the actual contribution of icon packs so that we have sufficient time for testing.

@vogella

vogella commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Great, then let's keep it as follow-up. And yes, I plan to finalize this as soon as possible and provide the follow-ups with the actual contribution of icon packs so that we have sufficient time for testing.

I have the icon packs from ux best practices ready via my theme plug-in so unless you really want to provide them (which is fine), I can do that.

@HeikoKlare
HeikoKlare force-pushed the icon-packs-runtime branch 2 times, most recently from 5f44661 to 06235f3 Compare November 30, 2026 16:24
@HeikoKlare
HeikoKlare requested a balanced review from Copilot November 30, 2026 18:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Platform URL paths are not percent-decoded before key normalization, causing resources with filenames such as a b.svg to fail to match their mapping keys.

1 open issue
What changed in this PR

This PR adds internal, combinable icon-pack support to Eclipse Platform UI, building on the JFace IImageURLModifier hook from #4399. Products can enable ordered packs through preferences without modifying the bundles that supply the original icons.

Changes:

  • Adds the icon-pack registry, mapping loader, preference handling, and low-ranked image URL modifier.
  • Provides three overlapping example packs with a toolbar control for switching presets after restart.
  • Adds runtime tests, packaging integration, documentation, and design decisions.
File Description
tests/​org.eclipse.e4.ui.iconpacks.tests/​src/​org/​eclipse/​e4/​ui/​internal/​iconpacks/​IconPacksTest.java Tests URL keys, precedence, preferences, and service registration.
tests/​org.eclipse.e4.ui.iconpacks.tests/​plugin.properties Defines test bundle labels.
tests/​org.eclipse.e4.ui.iconpacks.tests/​META-INF/​MANIFEST.MF Declares the test fragment and JUnit dependency.
tests/​org.eclipse.e4.ui.iconpacks.tests/​icons/​pinned_ovr.svg Supplies an original test icon.
tests/​org.eclipse.e4.ui.iconpacks.tests/​icons/​filenav_nav.svg Supplies an original test icon.
tests/​org.eclipse.e4.ui.iconpacks.tests/​fragment.xml Contributes two test packs.
tests/​org.eclipse.e4.ui.iconpacks.tests/​data/​iconpacks/​second/​replacement.svg Supplies the second pack’s replacement fixture.
tests/​org.eclipse.e4.ui.iconpacks.tests/​data/​iconpacks/​second.properties Defines overlapping mappings and an invalid key.
tests/​org.eclipse.e4.ui.iconpacks.tests/​data/​iconpacks/​malformed.properties Exercises malformed mapping handling.
tests/​org.eclipse.e4.ui.iconpacks.tests/​data/​iconpacks/​formats/​replacement.svg Supplies the format-matching replacement fixture.
tests/​org.eclipse.e4.ui.iconpacks.tests/​data/​iconpacks/​formats.properties Exercises exact and extensionless mappings.
tests/​org.eclipse.e4.ui.iconpacks.tests/​data/​iconpacks/​first/​replacement.svg Supplies the first pack’s replacement fixture.
tests/​org.eclipse.e4.ui.iconpacks.tests/​data/​iconpacks/​first.properties Exercises valid, missing, and invalid replacements.
tests/​org.eclipse.e4.ui.iconpacks.tests/​build.properties Packages fixtures and configures non-UI tests.
tests/​org.eclipse.e4.ui.iconpacks.tests/​about.html Adds test bundle license information.
tests/​org.eclipse.e4.ui.iconpacks.tests/​.settings/​org.eclipse.pde.prefs Configures plug-in validation.
tests/​org.eclipse.e4.ui.iconpacks.tests/​.settings/​org.eclipse.m2e.core.prefs Configures Maven workspace integration.
tests/​org.eclipse.e4.ui.iconpacks.tests/​.settings/​org.eclipse.jdt.ui.prefs Configures Java formatting and cleanup.
tests/​org.eclipse.e4.ui.iconpacks.tests/​.settings/​org.eclipse.jdt.core.prefs Configures Java compilation and formatting.
tests/​org.eclipse.e4.ui.iconpacks.tests/​.settings/​org.eclipse.core.runtime.prefs Sets line endings.
tests/​org.eclipse.e4.ui.iconpacks.tests/​.settings/​org.eclipse.core.resources.prefs Sets UTF-8 encoding.
tests/​org.eclipse.e4.ui.iconpacks.tests/​.project Defines test project builders and natures.
tests/​org.eclipse.e4.ui.iconpacks.tests/​.classpath Defines the Java test classpath.
features/​org.eclipse.e4.rcp/​feature.xml Includes icon-pack support in E4 RCP.
examples/​pom.xml Adds the example to the Maven reactor.
examples/​org.eclipse.ui.examples.iconpacks/​src/​org/​eclipse/​ui/​examples/​iconpacks/​SwitchIconPackPresetHandler.java Stores selected presets and requests restart.
examples/​org.eclipse.ui.examples.iconpacks/​src/​org/​eclipse/​ui/​examples/​iconpacks/​IconPackPreset.java Defines preset combinations and preference storage.
examples/​org.eclipse.ui.examples.iconpacks/​red.properties Maps icons for the red pack.
examples/​org.eclipse.ui.examples.iconpacks/​README.md Explains pack composition and manual testing.
examples/​org.eclipse.ui.examples.iconpacks/​plugin.xml Registers example packs and toolbar commands.
examples/​org.eclipse.ui.examples.iconpacks/​plugin.properties Defines example labels and descriptions.
examples/​org.eclipse.ui.examples.iconpacks/​META-INF/​MANIFEST.MF Declares example bundle dependencies.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​red/​search.svg Adds the red Search icon.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​red/​save.svg Adds the red Save icon.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​red/​paste.svg Adds the red Paste icon.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​red/​copy.svg Adds the red Copy icon.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​presets.svg Adds the preset toolbar icon.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​green/​problems_view.svg Adds the green Problems icon.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​green/​paste.svg Adds the green Paste icon.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​green/​outline.svg Adds the green Outline icon.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​green/​copy.svg Adds the green Copy icon.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​blue/​search.svg Adds the blue Search icon.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​blue/​properties.svg Adds the blue Properties icon.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​blue/​paste.svg Adds the blue Paste icon.
examples/​org.eclipse.ui.examples.iconpacks/​icons/​blue/​outline.svg Adds the blue Outline icon.
examples/​org.eclipse.ui.examples.iconpacks/​green.properties Maps icons for the green pack.
examples/​org.eclipse.ui.examples.iconpacks/​build.properties Packages example code, mappings, and icons.
examples/​org.eclipse.ui.examples.iconpacks/​blue.properties Maps icons for the blue pack.
examples/​org.eclipse.ui.examples.iconpacks/​about.html Adds example bundle license information.
examples/​org.eclipse.ui.examples.iconpacks/​.settings/​org.eclipse.m2e.core.prefs Configures Maven workspace integration.
examples/​org.eclipse.ui.examples.iconpacks/​.settings/​org.eclipse.jdt.core.prefs Configures Java compilation.
examples/​org.eclipse.ui.examples.iconpacks/​.settings/​org.eclipse.core.runtime.prefs Sets line endings.
examples/​org.eclipse.ui.examples.iconpacks/​.settings/​org.eclipse.core.resources.prefs Sets UTF-8 encoding.
examples/​org.eclipse.ui.examples.iconpacks/​.project Defines example project builders and natures.
examples/​org.eclipse.ui.examples.iconpacks/​.classpath Defines the example classpath.
examples/​org.eclipse.ui.examples.iconpack/​README.MD Documents the new alternative to resource transforms.
docs/​IconPacks.md Documents configuration, mappings, behavior, and limitations.
docs/​adr/​0003-icon-packs-mapping-file.md Records the properties mapping format decision.
docs/​adr/​0002-icon-packs-extension-point.md Records the extension-point contribution decision.
bundles/​org.eclipse.jface/​META-INF/​MANIFEST.MF Grants icon-pack access to the provisional resource package.
bundles/​org.eclipse.e4.ui.iconpacks/​src/​org/​eclipse/​e4/​ui/​internal/​iconpacks/​IconPackRegistry.java Reads and validates contributed packs.
bundles/​org.eclipse.e4.ui.iconpacks/​src/​org/​eclipse/​e4/​ui/​internal/​iconpacks/​IconPackPreferences.java Reads and stores ordered pack preferences.
bundles/​org.eclipse.e4.ui.iconpacks/​src/​org/​eclipse/​e4/​ui/​internal/​iconpacks/​IconPackLookup.java Combines mappings using pack and format precedence.
bundles/​org.eclipse.e4.ui.iconpacks/​src/​org/​eclipse/​e4/​ui/​internal/​iconpacks/​IconPackImageURLModifier.java Applies packs through the JFace service hook.
bundles/​org.eclipse.e4.ui.iconpacks/​src/​org/​eclipse/​e4/​ui/​internal/​iconpacks/​IconPack.java Loads and validates replacement mappings.
bundles/​org.eclipse.e4.ui.iconpacks/​src/​org/​eclipse/​e4/​ui/​internal/​iconpacks/​IconKeys.java Converts supported URLs into icon lookup keys.
bundles/​org.eclipse.e4.ui.iconpacks/​schema/​iconPacks.exsd Defines and documents the internal extension schema.
bundles/​org.eclipse.e4.ui.iconpacks/​plugin.xml Declares the icon-pack extension point.
bundles/​org.eclipse.e4.ui.iconpacks/​plugin.properties Defines runtime bundle and extension labels.
bundles/​org.eclipse.e4.ui.iconpacks/​META-INF/​MANIFEST.MF Declares runtime dependencies and service metadata.
bundles/​org.eclipse.e4.ui.iconpacks/​build.properties Packages runtime code, metadata, and schema.
bundles/​org.eclipse.e4.ui.iconpacks/​about.html Adds runtime bundle license information.
bundles/​org.eclipse.e4.ui.iconpacks/​.settings/​org.eclipse.pde.prefs Configures plug-in validation.
bundles/​org.eclipse.e4.ui.iconpacks/​.settings/​org.eclipse.pde.ds.annotations.prefs Configures service descriptor generation.
bundles/​org.eclipse.e4.ui.iconpacks/​.settings/​org.eclipse.pde.api.tools.prefs Configures API compatibility checks.
bundles/​org.eclipse.e4.ui.iconpacks/​.settings/​org.eclipse.m2e.core.prefs Configures Maven workspace integration.
bundles/​org.eclipse.e4.ui.iconpacks/​.settings/​org.eclipse.jdt.ui.prefs Configures Java formatting and cleanup.
bundles/​org.eclipse.e4.ui.iconpacks/​.settings/​org.eclipse.jdt.core.prefs Configures Java compilation and formatting.
bundles/​org.eclipse.e4.ui.iconpacks/​.settings/​org.eclipse.core.runtime.prefs Sets line endings.
bundles/​org.eclipse.e4.ui.iconpacks/​.settings/​org.eclipse.core.resources.prefs Sets UTF-8 encoding.
bundles/​org.eclipse.e4.ui.iconpacks/​.project Defines runtime project builders and natures.
bundles/​org.eclipse.e4.ui.iconpacks/​.classpath Defines the runtime classpath.

Review effort: Balanced

@HeikoKlare
HeikoKlare requested a balanced review from Copilot November 30, 2026 20:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Restart-based pack switching depends on a separate persistence fix not included in this snapshot, while modifier-only tests leave saved-perspective and workspace integration requiring human validation.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@HeikoKlare
HeikoKlare marked this pull request as ready for review November 30, 2026 20:30

@laeubi laeubi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I only did a quick look, will try to take a closer one, see some first comments below.

HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this pull request Dec 1, 2026
Most projects in this repository carry the m2e Maven nature and builder,
although none of them is a Maven project: the build is pomless Tycho, no
project has a pom.xml and no classpath uses the Maven container. In a
workspace with m2e, every build therefore also runs the Maven builder on
these projects for no benefit, which only costs build time.

The nature and builder were never intended. They came in with 6af7769
together with a resource filter of the VS Code Java language server, so
apparently through an IDE import, after Bug 539276 had already removed
them from one project as unwanted. The projects from eclipse.platform.text
and those added since never had them.

The nature, the builder and the m2e preference files are removed, so all
projects are plain PDE projects, as in the other platform repositories.

eclipse-platform#4603 (comment)

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@vogella

vogella commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

One more idea, for later and not for this PR: an optional extends attribute on iconPack, naming another pack. When a pack is enabled, the packs it extends are applied right behind it, so a specific pack can build on a base pack without the user listing both in the right order. Packs without the attribute behave as today, so it can be added without breaking anything. Mentioning it now so the schema leaves room for it.

@HeikoKlare

Copy link
Copy Markdown
Contributor Author

One more idea, for later and not for this PR: an optional extends attribute on iconPack, naming another pack.

I think those ideas are best placed in the general discussion:

We still need to refine how icon themes may be predefined anyway, so it fits well. We need to ensure that we provide proper UX for the use cases we have identified in addition to the technical feasibility with a simple concept as proposed in this an a follow-up PR. When initially discussing a potential design for icon themes/packs, we also considered an extension concept an ran into multiple issues with that.

HeikoKlare added a commit that referenced this pull request Dec 3, 2026
Most projects in this repository carry the m2e Maven nature and builder,
although none of them is a Maven project: the build is pomless Tycho, no
project has a pom.xml and no classpath uses the Maven container. In a
workspace with m2e, every build therefore also runs the Maven builder on
these projects for no benefit, which only costs build time.

The nature and builder were never intended. They came in with 6af7769
together with a resource filter of the VS Code Java language server, so
apparently through an IDE import, after Bug 539276 had already removed
them from one project as unwanted. The projects from eclipse.platform.text
and those added since never had them.

The nature, the builder and the m2e preference files are removed, so all
projects are plain PDE projects, as in the other platform repositories.

#4603 (comment)

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@HeikoKlare

Copy link
Copy Markdown
Contributor Author

In according with #4603 (comment)

I would recommend to not wait to long with this change before merging so that we can polish it. We already missed to deliver this functionality in the last release and starting this early should give us an edge.

I would like to merge this PR as soon as possible, so that I can provide the follow-up PRs that make the UI configuration and actual icon packs/themes available. And so that we have sufficient time for testing until the next release.
My proposal is to merge this by Sunday in case no one objects.

@vogella

vogella commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

In according with #4603 (comment)

I would recommend to not wait to long with this change before merging so that we can polish it. We already missed to deliver this functionality in the last release and starting this early should give us an edge.

I would like to merge this PR as soon as possible, so that I can provide the follow-up PRs that make the UI configuration and actual icon packs/themes available. And so that we have sufficient time for testing until the next release. My proposal is to merge this by Sunday in case no one objects.

Agreed, only the "I" part should become a "we" part ;-) I really like that this is moving forward and it seems that my fear that this feature is discussed ot death is not happening so I'm happy to help.

@laeubi laeubi left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @HeikoKlare for your patience, I now had the deeper look I promised.
I like the idea but see two things I would like to discuss/adjust before this lands.

The first is how the modifier waits for the workspace.
IconPackImageURLModifier is already a DS component and already uses constructor injection for the BundleContext, but it then "polls "Platform.getInstanceLocation().isSet() and guards a lazily created lookup with volatile and synchronized, which is custom lifecycle code for something DS can express.

Components usually declare what they need as a service dependency, and for "the workspace is available" the right level to build on is IWorkspace and the bundle IScopeContext service (IScopeContext.BUNDLE_SCOPE_FILTER is public API for exactly that reference).

CheckMissingNaturesListener.java#L65-L77 is a DS component doing that with @Reference IWorkspace, @Reference(target = IScopeContext.BUNDLE_SCOPE_FILTER) IScopeContext and an @Activate method.

Equinox only registers the IScopeContext service once the instance location is set, so it also fits RCP products without org.eclipse.core.resources.

With such a reference added to the constructor, activation itself becomes the signal and the enabled packs can be read once in @Activate.

The workbench already treats a not yet registered modifier as "no replacement" (WorkbenchSWTActivator.java#L95-L103).

The second is the structure.
The service delegates to static helpers (IconPackPreferences, IconPackRegistry) plus a separate IconPackLookup that merges the maps, and I found the flow hard to follow for a feature of this size. Could the component own its state as instance fields, with fewer classes? I think with the DS adjustment this can the become a small and focused service and if required even hold some static functions for reuse on other (internal) places.

I am happy to help with the DS variant if that is useful, and let me know if anything is missing in that regards, we should craft new code with these patterns even though large amounts of platform code still use the problematic static access patterns for the IWorkspace and alike here!

@HeikoKlare

Copy link
Copy Markdown
Contributor Author

Thanks a lot for the deeper look and the pointer to IScopeContext.BUNDLE_SCOPE_FILTER, that totally makes sense. The component now references the bundle scope service in its constructor, so it is only registered once the instance location is set, and the instance location check per image load as well as the guarded lazy creation are gone. I use the reference only as that signal and keep reading the enabled packs through the preferences service, as the bundle scope only covers the instance scope and the product default from plugin_customization.ini would otherwise be lost. I did not add an IWorkspace reference, as the bundle is part of the e4 RCP feature without org.eclipse.core.resources, and the modifier only needs the instance location, not the resource model. Applications running without an instance area (-data @none) consequently do not apply icon packs anymore, which I documented as a limitation.

One detail: the lookup is still built on the first image load rather than in the constructor. SCR creates the service right away when the workbench's tracker picks it up, which happens inside the instance location's service event while BasicLocation holds its monitor. Reading the preferences, the extension registry and the mapping files there could deadlock with another thread's first instance scope access, so the constructor only keeps the bundle context and the first modifyURL builds the lookup (without any further check or locking, as a concurrent first call only builds the same immutable lookup twice).

Regarding the structure: with the change I made the component is a small service that adapts JFace image loading to the lookup. I would like to keep IconPackLookup separate, as it holds a different concern, the precedence rules of combining ordered packs, as an immutable value that the tests check directly with packs they create. IconPackPreferences and IconPackRegistry are stateless and are also used by the preference page in the follow-up, so they are the kind of static functions for reuse you mentioned. We may also embed it as a static nested class in the DS component, but putting the two concerns (service registration/management and lookup logic) in a single class seems to reduce coherence of the class.

@laeubi laeubi left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On the IScopeContext reference: using it only as the "location is set" signal and reading through the preferences service is a good reasoning, as the product default would otherwise be lost.

On the structure, my concern is mostly about testability, which is the main benefit of DS.
IconPackPreferences.getEnabledIconPackIds calls Platform.getPreferencesService() (L47) and IconPackRegistry.getIconPacks calls Platform.getExtensionRegistry() (L50).
Both are only thin accessors for OSGi services (Platform.java#L855, #L1214), registered by equinox.preferences and equinox.registry.
The component could take both as constructor parameters, as WindowsDefenderConfigurator does for IPreferencesService.

The tests would profit directly: today they write to the global InstanceScope/DefaultScope and clean up afterwards (L54-L56) and call IconPackLookup.create and IconPackRegistry statically.
With injected services, the component itself can be tested with stubbed preferences and registry, so the tests exercise the path that really runs and fewer members need to be visible for testing.

A preference page can still use the Platform accessors, but I would keep static access to the edges.

I also took this one step further and tried it out, as an example is easier to judge than an argument: 6e213c5 on top of your head commit, which you can use or discard as you like.

The modifier receives IPreferencesService and IExtensionRegistry through its constructor and creates new IconPackRegistry(registry, new IconPackPreferences(preferences)), both instance classes without Platform access.

The registry reads the enabled packs on the first findReplacement(key) and caches them, so IconPackLookup is not needed anymore, and the modifier constructor does no work.

Production code goes from +77/−151 lines with one class less, the tests change by +46/−37 and use real services directly.

From OSGi point of view, this also shows that IconPackRegistry and IconPackPreferences are actually very well suited to become a service (OSGi not strictly require a service to be an interface) and then IconPackImageURLModifier would just consume IconPackRegistry directly without even need to care about the details...

@laeubi

laeubi commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

I tried that step on top now: 290eca0 makes IconPackPreferences and IconPackRegistry DS components as well.
Each declares only what it uses itself, and the modifier needs just the BundleContext and the IconPackRegistry.

The tests still create the instances directly, so only two lines changed there, if classes where not final or even interfaces one would be able to replace this detail of the icon-pack service as well.

@HeikoKlare

Copy link
Copy Markdown
Contributor Author

Thanks a lot for taking the time to write this down as commits, that made the discussion much easier. I took both of them as they are and squashed them into the PR commit with you as co-author. I agree that with the services injected, the registry is the place where resolving a replacement belongs, so the precedence rules now live there instead of in a separate lookup class.

On top of that, I made two small changes. The registry caches the enabled packs as a private record IconPackReplacements instead of a list of maps, so that the rule within a pack (the key with extension wins over the key without) and the rule across packs (the first enabled pack wins) each have their own place. And the registry Javadoc says again why the enabled packs are not read on construction (SCR may create the component inside the instance location's service event while the location's monitor is held), as that reason went away with the comment in the modifier.

I also rebased the follow-up with the preference page onto it (https://github.com/HeikoKlare/eclipse.platform.ui/tree/icon-packs-appearance). The page creates its own IconPackPreferences and IconPackRegistry with the Platform accessors, keeping the static access at the edge as you suggested, and IconPackPreferences got instance methods for reading the product default and storing the selection.

Comment on lines +35 to +48
### Alternatives

**OSGi services, e.g., declarative services components.** Each pack registers a service that
describes it and provides its replacements, as
[proposed in the discussion](https://github.com/eclipse-platform/eclipse.platform.ui/discussions/2870#discussioncomment-18799936).
This works without the Equinox extension registry and supports packs coming and going at runtime.

A component always needs an implementation class, though, so a pack bundle would either contain
code, against requirement 1, or reference a generic implementation of the runtime bundle, which
makes that implementation part of the contract between the runtime and every pack bundle.
Listing the packs requires the service component runtime to activate every pack bundle, against
requirement 2, and component properties have no localization of their own, against
requirement 3. Packs coming and going at runtime are of no use yet either, as images that
already exist are not reloaded, so packs only take effect after a restart.

@laeubi laeubi Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I just wanted to point out that a pure "OSGi" solution would be to use the Extender Pattern.

Currently the plugin.xml fragment looks like this:

<iconPack
            description="%iconPack.red.description"
            id="org.eclipse.ui.examples.iconpacks.red"
            mapping="red.properties"
            name="%iconPack.red.name">
 </iconPack>

If we now assume that its unlikely one bundle would supply more than one individual choose-able icon pack one could say an Icon-Pack-Bundle is shaped like this:

  • Its Bundle-Symbolic-Name is the id of the icon pack.
  • Its Bundle-Description is the description of the icon pack
  • Its Bundle-Name is the name of the icon pack
  • There is a custom Header Eclipse-IconPack and its value is the properties file e.g. here red.properties

As Bundle headers are translatable (except e.g. the bsn), this would then allows a plain OSGi solution without the dependency to the Equinox extension registry but also in a completely declarative way.

On the producer side, this has the nice effect that one can relatively easily have a plain maven build where one just configures some extra headers to the jar packaging without the need to maintain a vendor/eclipse specific plugin.xml or even use bnd directly as it was done here: https://github.com/eclipse-platform/eclipse.platform.images/blob/master/org.eclipse.images/pom.xml

On the consumer side, this would allow others to consume icon packs without the need of understanding/implementing plugin.xml parsing and extension points in general, the code here can even be generalized and move to a "core" bundle in most parts (e.g. only IconPackPreferences is Eclipse/E4/Platform specific).

Even if that approach is not chosen it should be noted here and maybe with why not. With the current approach, I think it would rather easy to even combine all those strategies.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out, I added it to the ADR as an alternative. It does meet the three requirements as they are listed (no code, no activation, translatable headers), and I agree that working without the extension registry and building pack bundles without a plugin.xml would be nice. What speaks against it is that it ties a pack to its bundle:

  • A bundle could only provide one pack, unless a header lists several packs with attributes that the runtime has to localize itself, while a bundle may well provide variants of its icons, as the example bundle does with its three packs.
  • The pack ID would be the bundle symbolic name, and that is what the preference of the enabled packs stores, so renaming the bundle or moving the pack to another bundle would silently disable it for everyone who enabled it.
  • The bundle name, as shown in the installation details, would double as the name by which users choose the pack.
  • Most importantly, we expect packs to get more structure: the light or dark theme a pack is meant for, as Lars suggested, a pack extending another one, or icon themes combining several packs. With an extension point, these become optional attributes and elements described by the schema, while with manifest headers they would need further custom headers with a syntax of their own that PDE does not validate.

As you say, the approaches do not exclude each other, so I also extended the consequence in the ADR that manifest headers, like OSGi services, can be added as a further source of packs later without changing how users enable and order packs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just some remarks:

  • Changing the bundle ID is really rare so I won't count this, the same would apply if someone changes the pack-id and I think both will have some relation anyway (e.g. lets say a bundle company.a exposing a pack with id company.b would be rather unusual and ids more for internal use.
  • A bundle that provides multiple packs would mean you can not install/uninstall them individually so I would expect one bundle to provide one pack anyway, at least it is not really limiting as a bundle cost not much but gives more flexibility, one can still group "packs" by a feature for example.
  • If one really needs a complex structure, then maybe an structured format like XML/json would be more suitable than a properties file like e.g. OSGi DS so one does not encode things at different places.

I also want to mention it here because the bundle is meant as an E4/RCP bundle by the name org.eclipse.e4.ui.iconpacks and plugin.xml is actually more tied to the E3 world (aka compatibility layer). As the e4 model is extensible, a fragment.e4xmi would be a more natural choice and should possibly at least be evaluated/listed as an alternative as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If one really needs a complex structure, then maybe an structured format like XML/json would be more suitable than a properties file like e.g. OSGi DS so one does not encode things at different places.

Just to clarify: the configurations we have discussed so far will be at the level of the extension, not at the level of an individual icon replacement.

Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-21
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we replace this maybe by package imports (if no split package is involved) or at least by the dedicated require bundle? org.eclipse.core.runtime sadly has some bad dependency shape and from a first look it seems not needing anything from that particularly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The registry and preference types indeed come from the narrower org.eclipse.equinox.registry and org.eclipse.equinox.preferences bundles, but the bundle also uses ILog for logging, which only org.eclipse.core.runtime provides. As org.eclipse.core.runtime is a split package, a package import would be wired to org.eclipse.core.runtime as well, so getting rid of that dependency would mean replacing ILog, which is the logging the Platform code consistently uses, also in DS components such as ThemeEngineManager. In addition, the modifier is only installed by the E4 workbench (org.eclipse.e4.ui.workbench.swt), which requires org.eclipse.core.runtime itself, so narrowing the dependency here would not remove it from any runtime in which icon packs are applied. So I think we need to / should keep it for now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Right, I forgot about that ILog is still part of org.eclipse.core.runtime :-\

* an icon in all the formats a bundle provides it in, e.g., <code>a.png</code>
* and <code>a.svg</code>.
*/
public final class IconKeys {

@laeubi laeubi Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just as a nitpick, IconKeys could be a DS service as well, this would move the BundleContext dependency into this e.g. like:

@Activate
public IconKeys(BundleContext ctx) {
    this(bundleId-> {
        Bundle bundle = bundleContext.getBundle(bundleId);
		return bundle == null ? null : bundle.getSymbolicName();
    }
}

public IconKeys(LongFunction<String> bundleIdToSymbolicName) {
   ...
}

IconPackImageURLModifier can then become

@Activate
public IconPackImageURLModifier(@Reference IconKeys key, @Reference IconPackRegistry iconPacks) {
   ...
}

The effect would be that one can even replace how keys are computed, and IconPackImageURLModifier is free from any OSGi semantics or how things are computed/derived, it become a pure adapter and might even later live in a generic place:

  • As long as no one eve register an IconKeys or IconPackRegistry service (and those become interfaces) it will do nothing
  • The org.eclipse.e4.ui.iconpacks becomes the default implementation and supply those (e.g. as BundleContextIconKeys and ExtensionsIconPackRegistry)
  • A product might replace the IconKeys or the IconPackRegistry individually or not use org.eclipse.e4.ui.iconpacks and supply an own way to find/configure icon packs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree that this would be the way to go if we want to generalize the runtime. For now I would keep it as it is, though: the key is not really a free variable, as <bundle>/<path> is the contract with the mapping files of all packs, so a different key computation would only be useful together with a different mapping format, i.e., a different mechanism. That mechanism can already be plugged in as a whole by registering an individual IImageURLModifier, and having one place to replace it keeps the behavior easier to follow than components that can be exchanged independently. As everything is internal, we can still split it into interfaces and services later without breaking anyone, once there is a concrete need, e.g., a second source of packs.

@laeubi laeubi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it looks good in general, I have added some remarks as general comments now where I think it can be beneficial to take them into account.

Products that want a different icon style can only replace icons by
patching resources of the Platform bundles, e.g., with the Equinox
transforms hook, which requires full control over the product's
content. Icon packs from different providers, such as the Platform,
other projects or third parties, cannot be combined that way, although
the icon pack discussion (eclipse-platform#2870) agreed on packs that are combinable
without knowing each other.

Products can now enable icon packs in their plugin_customization.ini.
An icon pack is a bundle that replaces icons of other bundles without
changing them. Enabled packs are combined in the order of the
preference: the first enabled pack that replaces an icon wins, and
icons that no pack replaces keep their original appearance. Changes
take effect after a restart.

The new bundle org.eclipse.e4.ui.iconpacks defines an internal
extension point, in which a pack maps original icons (bundle and path)
to replacement icons via a properties file, and registers an
IImageURLModifier service that applies the enabled packs whenever
JFace loads an image. A mapping key may omit the file extension to
match the icon in all formats its bundle provides, as bundles often
ship PNG and SVG variants of an icon side by side. ADRs record why
packs are contributed via an extension point and mapped in a
properties file. The example org.eclipse.ui.examples.iconpacks
provides three overlapping packs and a toolbar drop-down to switch
between combinations of them.

Nothing is exported or declared as API, so that everything can still
change; a preference UI for users to select packs follows separately.

Co-authored-by: Christoph Läubrich <laeubi@laeubi-soft.de>
Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>

@HannesWell HannesWell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

After looking through the ADR I question if the first two requirements are really suitable, as I've described below.

With them a Java code based definition of Icon packs would be possible (as described in #2870 (reply in thread)) and I still believe that such a definition would be better. It would be

  • saver even with existing tooling (type checks etc. ensure the basic structure is correct) and only 'paths' could be done wrong.
  • more powerful since different techniques of defining replacements could be combine (e.g. 1-1, pattern or path based). Theoretically that would also be possible with a file based approach.
  • avoid the extra plugin.xml and files with a new format to learn (and without tool support as of now)
  • It would allow (as follow-up) even more advanced integrations that, after being adopted, would avoid the need for a restart.

And it would be as flexible as the file based approach since one can define an arbitrary number of packs in one bundle.

However a Java API based approach could also be added later.
And, in general, even both approaches could be supported (if we really want that).

Comment on lines +24 to +25
1. A pack bundle needs no code, so that contributors who create icons can provide a pack without
writing Java.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is that a requirement?
When contributing to a platform that's written in Java such a requirement seems a bit strict for me.
My guess is that it is based on the assumption that icons are potentially created by non-technical designers that might not be proficient with Java?
And while I believe that can certainly be the case, I question that such a person will have the intention to contribute icon Packs for an Eclipse based product solely on their own and will then be able to distribute it through the usual channels without a technical person proficient in all these technologies.

Therefore I assume providing icon packs will always be an interdisciplinary task and I don't think this restriction will help to significantly improve adaption and will more restrict the design process.

Comment on lines +26 to +27
2. The installed packs can be listed, e.g., on a preference page, without activating the pack
bundles or loading classes from them.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If icon packs are designed without an activator (or at least only with a small one) and the classes that only provide overview information are lazy or lean, the performance overhead is very small.
Furthermore the question is, in which scenarios the listing use-case even happens and how important performance in that case is?
My assumption is that listing is only relevant when a user opens the preferences to select the pack?
In that case a slight delay of maybe half second could be acceptable. But I expect it not to take that long.

Comment on lines +42 to +47
A component always needs an implementation class, though, so a pack bundle would either contain
code, against requirement 1, or reference a generic implementation of the runtime bundle, which
makes that implementation part of the contract between the runtime and every pack bundle.
Listing the packs requires the service component runtime to activate every pack bundle, against
requirement 2, and component properties have no localization of their own, against
requirement 3. Packs coming and going at runtime are of no use yet either, as images that

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Based on my comments from above, I'd say the violation of requirement 1 isn't a problem.
And a code/Java based API could also be designed in a way that the violation of requirement 2 isn't a practical problem.

The violation of requirement three isn't true.
If labels and descriptions are supplied through methods of the service component defining an icon pack the returned strings can be translated through the NLS mechanism used everywhere else in Eclipse.
It would only be difficult/impossible if labels and descriptions where service properties, but it's not required to design such 'user-facing' content that way.

@HannesWell

Copy link
Copy Markdown
Member

One more idea, for later and not for this PR: an optional extends attribute on iconPack, naming another pack. When a pack is enabled, the packs it extends are applied right behind it, so a specific pack can build on a base pack without the user listing both in the right order.

Yes I think that concept is important to make Icon packs convenient.
In #2870 (reply in thread) I was thinking about that based on the concept of Icon Pack 'fragments' (similar to OSGi bundle hosts and their fragments) that contribute to one logical pack from multiple bundles.
But effectively that's the same with just a different name.

@laeubi

laeubi commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Just as a note: I think extension reads a bit odd here, as it would imply make some kind of intermittence or overriding rules I don't see for an icon pack. For me this more reads like what we have with update sites concept of a category, e.g. there might be a "flat-icons" category and then different packs contribute here (e.g. a platform and a pde and a jdt, possibly m2e one), but not one is the "parent" or really enhances the other.

If or not we really need ADRs, if they are value or normative here is a bit out of scope as I was not even aware that we agreed to write them and what the process is to them become agreed.

@HeikoKlare

Copy link
Copy Markdown
Contributor Author

Thank you for the additional input. I will rephrase the ADRs to not state properties of certain alternatives as requirements if we do not really require them (such as no Java code being required).

I would like to clarify what exactly is challenged and requires further input now:

  • If I understand correctly, the last comment questions the need of ADRs. Whether or not we call them accepted and when does not really matter to me (and also whether we call them ADR or not). But we often have many architectural options to discuss and in times of AI we even evaluate more of them, so that it becomes really useful and important to document those assessments. (while them doing no harm anyway).
  • What's the actual point regarding Java-based representations of icons / icon packs? Is it just about the ADRs mentioning unnecessary arguments against them? "However a Java API based approach could also be added later." sound as if they can be added later but "I still believe that such a definition would be better." sounds as if it would be better implement them like that now. From that review, it's completely unclear to me what the expectation is now. Is the current proposal considered okay or is the demand raised for evaluating the Java-based specification now, so that we need to spend further time discussing a Java-based mapping approach (again)? I thought that we had agreed in previous discussions and community calls on a non-Java-based approach already. I just want to emphasize that starting with a new approach means further time for discussions, finding agreements, and because of the approaching Christmas break (me and maybe other also being out of office quite sometime before Christmas already), we risk ending up past M1 and not making a complete deployment of an icon pack (at least not a well tested one) for 2027-03. Don't get me wrong: if we think we really need to go that loop, it's of course fine. I just thought that we sufficient discussions on that already, so I really hope it's just about the framing of the ADRs, as I would just like to avoid that we keep discussing while the world moves on in fast pace until no one cares about icon packs in Eclipse anymore.

@laeubi

laeubi commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

If I understand correctly, the last comment questions the need of ADRs.

If that targets my comment, I just wanted to express that I would not put too much weight on the "ADR nature" of these documents, as we have no written requirement or process for them (neither docs/adr/ nor CONTRIBUTING.md says anything about it).
With docs/IconPacks.md already describing what is present, enhancing it with a section on decisions, alternatives and future ideas would be sufficient for me.

If ADRs help us to settle a structure for documenting such state, I am fine with that as well.
By definition an ADR records a decision at a point in time, whereas today we usually just adapt the code/docs.
So if we really want ADRs, I think we need a small contribution/review rule for it, and possibly for documenting historic decisions as we change them.

The move to FFM would definitely be worth an ADR.
It is spread over many repositories, e.g. SWT#3605, SWT#3947, platform#2908, platform#3101 and equinox#1348, and people will later ask what was decided and why.

@HannesWell

Copy link
Copy Markdown
Member
  • If I understand correctly, the last comment questions the need of ADRs. Whether or not we call them accepted and when does not really matter to me (and also whether we call them ADR or not).

I find ADR (or however one calls them) definitively useful to record the considerations for an architectural decisions. Previously such considerations where captured in bug reports or PRs, but since such system are probably not forever (as we saw with Bugzilla which is still readable and Gerrit at EF, which is gone), it makes sense to record important discussions in the repo.

But from my POV such ADRs are just informative and are not normative and are especially not normative for future discussion. In general I think we are just bound to the rules of the EDP plus what the PMC decided additionally (e.g. API deprecation rules etc.)
Maybe that should be made clear, because some wording sounds quite normative to me (e.g. paragraphs like status Accepted). Altough that probably wasn't intentional.

From that review, it's completely unclear to me what the expectation is now. Is the current proposal considered okay or is the demand raised for evaluating the Java-based specification now, so that we need to spend further time discussing a Java-based mapping approach (again)?

Personally I'm still convinced a Java API based approach would be superior and of course I'd find it nice if it would be done now. But currently I cannot if I have the time to do it by myself and of course I cannot expect that somebody else does it just because I think so.
Nevertheless the current approach works as you have demonstrated and is of course okey (from my POV).
That's why I also just commented my review and didn't request changes or alike.

Furthermore the way how icon packs are modeled is only one part of the problem.
The other parts are the preferences and the internal registry, a demo, etc. So even if somebody things the modeling could/should be done differently, this already helps a lot.

  • Is it just about the ADRs mentioning unnecessary arguments against them?

The mentioned requirements are excluding Java based APIs literally, but don't give a rational or justification for that (at least I didn't find saw it). Subsequently a Java based modeling using DS components is rejected based on these requirements.
And although they are not normative (to my understanding), I'm still interested in that. I'd like to know in advance if there are reasons speaking against it such an approach that I'm currently missing before spending time on it.

  • I thought that we had agreed in previous discussions and community calls on a non-Java-based approach already.

Maybe I forgot it, but I just recalled just the agreed on starting simple with really just Icon packs and always requiring a restart. It has been some time since we discussed that already.

  • I just want to emphasize that starting with a new approach means further time for discussions, finding agreements

I don't want to be the one delaying that. And I think this is okay, but not ideal. But maybe I'm also the only one.
I also see this is provisional/internal currently. And I then just hope that it doesn't become (again) an effective API quickly that nobody dares to touch because it's already used.

@HeikoKlare

Copy link
Copy Markdown
Contributor Author

But from my POV such ADRs are just informative and are not normative and are especially not normative for future discussion.

I would relax that and say that's not your POV but that's how ADRs are defined. Just as the name says, they are records for architectural decision, and they can be revised/superceded. They are just important to document why some architectural decision was made (particularly including evaluated alternatives). They do not are based on requirements at that point in time, but they do not normatively define that those requirements as well as architectural decision must not be changed in the future.
That's a also why you are totally right with your remark that the ADR is based on requirements that we did not agree on and that are not relevant at all. They are rather consequence from the architectural decision, which is why I will revise that.

So if we really want ADRs, I think we need a small contribution/review rule for it, and possibly for documenting historic decisions as we change them.

I propose to do that in an agile while (actually I starting doing it like that). I have just started adding ADRs and I actually have a template lying around, but wanted to gather some ADRs first before we have length discussion about the need of it in the beginning. docs and adrs habe completely different purposes. docs document the state and how to use it. adrs document architectural decisions and alternatives. They have different target groups. And the latter was addressed well with all of the documentation we have so far.

Furthermore the way how icon packs are modeled is only one part of the problem.
The other parts are the preferences and the internal registry, a demo, etc.

Yes, that's part of the branch I have linked as well and will be part of a direct successor PR I will propose once this is merged.

Maybe I forgot it, but I just recalled just the agreed on starting simple with really just Icon packs and always requiring a restart. It has been some time since we discussed that already.

I don't think it really matter what was discussed if we do not all recall anyway. Seems like all of us had different takeaways from the discussions we had (e.g., also on the technical mechanism contributed without any adoption of it shortly after). Back then we also discussed that the Java-based representation is something optional and depending on how it will be realized, it must will be something that may not be adopted everywhere (in particular if not only an icon replacement but an icon itself is modeled in Java) and then it can only be complementary to another, generic mechanism anyway. That's why I took away that we start with something generic and simple that we can extend with more sophisticated mechanisms if needed.

I don't want to be the one delaying that. And I think this is okay, but not ideal. But maybe I'm also the only one.
I also see this is provisional/internal currently. And I then just hope that it doesn't become (again) an effective API quickly that nobody dares to touch because it's already used.

It is intended to be like that, yes. But I am also not sure what you mean by this not being "ideal". How is "ideal" defined? No one says this will be the perfect representation, but I am not as convinced that a Java-based representation of icons / icon packs is. That one may be prone to be over-engineered (YAGNI) whereas with this approach (internal, so that it can be revised), we follow KISS. If we want to come to good solution, starting with something simple and internal and revising it during adoption in the framework is more likely to reveal a good solution that doing high upfront design of a complex solution.

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.

5 participants