Skip to content

Add support for "Icon Packs"  #13

@AObuchow

Description

@AObuchow

This is a continuation/migration of Bug 562174 - Add support for "icon packs" in Eclipse IDE.

It'd be nice for to have an officially supported way to replace the icons used in Eclipse.

There is a lot of discussion to be held on how this should be handled (and there was already a lot of discussion on the original BZ thread), so I'm going to leave this relatively open-ended.

IIRC the approach I had initially tried was:

  • Allow custom/replacement icons to be provided by a plugin fragment, by placing them in a "theme" directory of the plugin fragment
    • So in order to replace one of the "debug" icons, you must make a plugin fragment where the host plugin is "eclipse.debug.ui" and place the icon within a "theme" directory, with the same file path as the original icon
  • When loading an icon from a plugin, check if the plugin provides an alternative path to the icon that is prefixed by "/themes/"
  • If so, load it
  • Otherwise, use the default icon

There are probably some limitations to this approach, for instance:

  • The icon-provider must create a plugin fragment for each plugin which they wish to replace the icons for. This is very tedious.
  • How do we handle switching between different icon packs, if each plugin fragment uses the same "themes" directory?

It might be nicer to set some JFace preference which points to a specific plugin path (where the plugin is the icon pack provider plugin), and then alternative icons are checked from that plugin before loading the default icon.

I am going to submit a WIP PR that shows my current implementation, as well as an example plugin fragment that provides icon replacements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions