Replies: 4 comments 7 replies
-
I'm not completely sure why case 2+3 should not be possible with what we have for case 1 and how case 2+3 actually differ? I also missing a bit the question or what to exactly discuss here even though it gives a good overview about different aspects of the topic. From my point of view it would be most suitable to enhance the example documentation here: with new aspects and or demonstrate missing features with real code example (maybe more examples). |
Beta Was this translation helpful? Give feedback.
-
|
I think we should have the option to link icon sets optional to CSS theme and a theme should have the option to define also a default icon set. In my opinion icon sets should register themself via OSGI services or extension points and the theme engine should be able to activate it. Most likely a restart of the application will be necessary to use the new icon sets. The actual icon set selectioin can be stored as preference either for the workspace or in the user space in case the user decides so similar to the new default theme implementation I did. I really like the existing JSON structure of https://github.com/eclipse-platform/eclipse.platform.ui/blob/master/examples/org.eclipse.ui.examples.iconpack my implementation could use the json mapping file to identify the correct icon if it is requested to load it. |
Beta Was this translation helpful? Give feedback.
-
Concept: Theme Aware Icon Replacement for Eclipse Platform UI1. GoalEnable Eclipse based products (IDE and RCP) to replace the icons of any contributing bundle without patching those bundles, and to have the replacement follow the active theme (for example light, dark, high contrast, or a customer branded icon set). The mechanism should be transparent to existing plug ins, preserve HiDPI behavior, and be usable both by product vendors (custom look and feel) and by community icon packs. 2. Problem StatementToday, Eclipse plug ins resolve their icons through platform URLs that point to files inside the contributing bundle. Customers and product teams who want a consistent visual identity, better dark mode icons, or a branded IDE currently have to fork bundles, override extensions one by one, or ship patched JARs. This is expensive, fragile, and does not scale across hundreds of bundles. A sustainable solution must:
3. Proposed ApproachWe propose a small, additive extension point inside the platform's image loading layer, combined with a thin, optional bundle that ships a default icon pack format and a default discovery mechanism. The approach has four layers: Layer A, Core Hook (JFace). A minimal, additive strategy is introduced at the exact point where the platform turns an icon reference into bytes on disk. When no strategy is registered, behavior is byte for byte identical to today. When a strategy is registered, it is consulted once per resolution and can either pass the original reference through or return a replacement. This keeps the change in JFace tiny, auditable, and fully backward compatible. Layer B, Icon Pack Format and Runtime (Workbench). A lightweight, declarative mapping format (one file per icon pack) describes which original icons are replaced by which replacement resources. A small runtime in the workbench loads the active icon pack at startup, builds a fast lookup structure, and wires it into the Layer A hook. Icon packs are ordinary OSGi bundles, so they can be installed, updated, and removed through p2 like any other feature. Layer C, CSS and Theme Integration. The active icon pack is selected via the existing theme infrastructure, so that choosing a theme (for example "Dark with Fluent Icons") automatically activates the matching pack. This reuses the CSS engine and preference scopes already in place, rather than introducing a parallel configuration surface. Layer D, HiDPI, SVG, and Zoom. Replacement happens on the base reference; the platform's existing zoom, @2x, and SVG rendering logic then applies on top. This means icon packs can ship @1x bitmaps, HiDPI variants, or SVG, and the same code paths that serve the stock icons serve the replacements, with no special cases. 4. Why This Design
5. Deliverables
6. Out of Scope (Phase 1)
These are natural follow ups and can be offered as a Phase 2. 7. Risks and Mitigations
8. Indicative Plan and EffortThe work breaks down into four milestones: (1) core hook plus tests, (2) icon pack runtime and mapping format, (3) CSS and theme binding, (4) reference pack, documentation, and upstream contribution. A concrete effort estimate and schedule will be provided with the commercial offer, based on the scope confirmed with you. 9. Qualificationvogella has long standing committer presence on Eclipse Platform UI, CSS styling, JFace, and the E4 workbench, and has previously landed changes in all the areas this work touches (image loading, theming, CSS engine, workbench startup). We are therefore in a position to both implement the change and shepherd it through Eclipse Platform review so that your investment lands in the official release stream. |
Beta Was this translation helpful? Give feedback.
-
|
As preparation for this potential work, I reviewed the CSS engine in detail, and I plan to optimize it in an upcoming release. This effort is part of this work, but it helped to understand this issue better. Based on this analysis, I can estimate the implementation effort for this item with reasonable confidence at 2–5 days: 2 days if everything goes as expected, more if extensive review discussion is needed or if additional challenges surface during implementation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Scope Of This Discussion
Since quite some time there is the wish to support alternative icons in Eclipse Platform / Eclipse IDE Products.
See for example #13
"Icon Packs" can cater multiple use cases. This post tries to list these use cases and to rank them. This post is the shared understanding of the Vector (especially @fedejeanne and @HeikoKlare and SAP community members (especially @BeckerWdf, @sratz and @thomasritter). This should start a discussion with the whole community about this topic. The discussion should address the "what" (what to achieve) of the "Icon Pack" topic. Details of the "how" (how to technically implement this and how this looks from the user's point-of-view) should follow later.
Use Cases
Use Case 1: Deliver a Whole Product With Custom Styling
A company delivers a complete product that is based on the Eclipse (RCP) Platform. This product has nothing to do with Eclipse itself except for the fact that it is based on the Eclipse (RCP) Platform. The company wants their product to comply to a application specific styling.
Example
The ACME (A Company Modelling Everything) company builds an RCP application for modelling products. It uses the Eclipse Platform and SWT as the technology to build that product. This product is not anything similar to an IDE.
Characteristics
Use Case 2: Extend Existing Product and Contribute Icons to an Icon Pack of That Product
A company extends an existing product that is based on the Eclipse (RCP) Platform. This is for example the case when one delivers extensions to the Eclipse IDE. In this case, the product is the Eclipse IDE. The company want's to contribute icons to an icon pack that is defined by the extended product.
Example
Eclipse Platform defines an icon pack called "Monochrome Flat". The Eclipse Platform bundles provide icons for this icon pack. Bundles from other Eclipse SimRel projects (e.g. JDT, CDT, ...) also contribute icons for this icon pack. A Company provides their own set of bundles to provide IDE support for their proprietary programming language and also want to contribute icons of Eclipse Platform's "Monochrome Flat" icon pack.
Characteristics
Potential Issues
Use Case 3: Provide Community Icon Pack
A freelance developer wants to define her own icon pack for a product she even does not provide or extend.
This use case is some kind of mixture of use case 1.
Example
A developer loves the Eclipse IDE but does not like the Eclipse default icons and also not the icon packs provided by the Eclipse IDE. Instead she wants to have 3D-ish monochrome icons in shades of purple.
Characteristics
Ranking of Requirements
We see use use case 1 and use case 2 as the most important ones. Use case 3 seems not so important but should be possible anyway. But use case 3 should not add much complexity for the solutions for use use case 1 and use case 2.
Requirements For All Use Cases
Technical Considerations
Even though this document should only collect requirements but don't provide too much technical / implementation details this chapter lists some of them.
It should be possible to choose if the (replacement) icons will be delivered in bundles or in fragments.
Use case 1 seems to be already addressed by eclipse-equinox/equinox#732 and eclipse-equinox/equinox#731. See the example provided by #2686.
For Use case 2 and Use case 3 we still have to think of implementation ideas.
Outside Of The Scope of Icon Packs
Related Requirements
These are requirements that are related to the topic icons but are independent from the implementation of the icon pack use cases.
They should not be a prerequisite for icon packs and should be handled and implemented separately.
Icons should be able to adapt to the current UI theme (Light/Dark).
folder_icon.pngis for the "light" UI theme and may be used for the "dark" UI theme too.folder_icon_dark.pngis for the "dark" theme and, if present, will be used instead offolder_icon.pngwhen the UI theme is "dark".Sharing of frequently used icons between bundles should be possible.
platform:/uris but the API-aspect of it is missingStyle of alternative icons (See: Refinement of the new modern icon style eclipse.platform.images#117)
Possibility to use SVG natively in SWT for icons.
Beta Was this translation helpful? Give feedback.
All reactions