Skip to content

Make overlay icons in various views like the outline view customizable in client plug-ins#1521

Merged
rubenporras merged 13 commits intoeclipse-lsp4e:mainfrom
travkin79:patch-customizable-overlays
Apr 21, 2026
Merged

Make overlay icons in various views like the outline view customizable in client plug-ins#1521
rubenporras merged 13 commits intoeclipse-lsp4e:mainfrom
travkin79:patch-customizable-overlays

Conversation

@travkin79
Copy link
Copy Markdown
Contributor

@travkin79 travkin79 commented Apr 16, 2026

This PR makes overlay icon calculation customizable in client plug-ins (e.g. in CDT LSP) by introducing a new extension point for custom SymbolIcenProvider implementations. Custom SymbolIcenProviders are registered for certain content types and are used in all views / dialogs like outline view, call hierarchy, and type hierachy.

An exemplary customization (introducing a custom overlay icon for destructors) is implemented in CDT LSP PR eclipse-cdt/cdt-lsp#609, see corresponding issue eclipse-cdt/cdt-lsp#608.

- Extract method for determining all overlay icons so that clients can
override it to customize overlay icons.
- Introduce convenience method for determining a symbol's name.
- Forward the symbol object to methods for calculating the symbol's icon
and overlay icons so that clients could use additional symbol details
for customization, e.g. name and details fields.
Comment thread org.eclipse.lsp4e/src/org/eclipse/lsp4e/ui/SymbolIconProvider.java Fixed
Comment thread org.eclipse.lsp4e/src/org/eclipse/lsp4e/ui/SymbolIconProvider.java Fixed
Comment thread org.eclipse.lsp4e/src/org/eclipse/lsp4e/ui/SymbolIconProvider.java Dismissed
@travkin79 travkin79 marked this pull request as ready for review April 16, 2026 16:15
@travkin79
Copy link
Copy Markdown
Contributor Author

Hi @rubenporras and @FlorianKroiss,
Do you have some time to review this PR?

<attribute name="point" type="string" use="required">
<annotation>
<documentation>

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 you provide some documentation instead of the empty one?

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.

this applies to the other items 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.

I've extended the documentation. Is that what you had in mind?

<meta.section type="since"/>
</appinfo>
<documentation>
[Enter the first release in which this extension point appears.]
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 am not sure if we need all of these annotations documenting the extension point. If you can provide them, they are nice, but then we need meaningful tags.

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.

What do you mean by meaningful tags?

Comment thread org.eclipse.lsp4e/src/org/eclipse/lsp4e/ui/SymbolIconProvider.java Outdated
Copy link
Copy Markdown
Contributor

@rubenporras rubenporras left a comment

Choose a reason for hiding this comment

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

See comments

@travkin79 travkin79 force-pushed the patch-customizable-overlays branch from 5fe172b to 44962f2 Compare April 17, 2026 08:59
@travkin79 travkin79 requested a review from rubenporras April 17, 2026 12:24
Comment thread org.eclipse.lsp4e/src/org/eclipse/lsp4e/ui/SymbolIconProvider.java Fixed
@travkin79 travkin79 force-pushed the patch-customizable-overlays branch from 8a124c8 to 44da61b Compare April 20, 2026 07:55
@travkin79 travkin79 requested a review from FlorianKroiss April 20, 2026 08:43
@travkin79
Copy link
Copy Markdown
Contributor Author

Hi @rubenporras and @FlorianKroiss,
Thank you for your feedback. I think, I've fixed all mentioned issues. Could you take a look at the latest version and acknowledge? @rubenporras, could you please merge if everything is ok?

It would be great if we could create a new LSP4E release with that change soon, since my related CDT LSP PR eclipse-cdt/cdt-lsp#609 depends on this PR.

Comment thread org.eclipse.lsp4e/schema/symbolIconsProvider.exsd Outdated
@rubenporras rubenporras merged commit ebb9170 into eclipse-lsp4e:main Apr 21, 2026
10 of 12 checks passed
@rubenporras
Copy link
Copy Markdown
Contributor

there is a new release

@travkin79
Copy link
Copy Markdown
Contributor Author

Thank you very much, @rubenporras and @FlorianKroiss! You're feedback is very welcome and always helpful. Thank you also for quickly releasing the changes @rubenporras. 👍

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.

4 participants