-
Notifications
You must be signed in to change notification settings - Fork 67
Make overlay icons in various views like the outline view customizable in client plug-ins #1521
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
Merged
rubenporras
merged 13 commits into
eclipse-lsp4e:main
from
travkin79:patch-customizable-overlays
Apr 21, 2026
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2e77b4e
Adapt overlay icon calculation for customization by LSP4E clients
travkin79 99b6592
Introduce symbol icon provider extension point for customizing overlay
travkin79 9b3858c
Ensure file image is returned from shared images
travkin79 dc0d05d
Adapt test to changes in LSPImages class
travkin79 f0ae7f1
Add a developer note to explain an unexpected method parameter
travkin79 15a92e9
Bump version in test bundle
travkin79 c7fe851
Fix potential NPE
travkin79 14125e0
Make singleton implementation thread-safe
travkin79 680b710
Extend extension point documentation
travkin79 e36780a
Use LSP4E logging convenience methods
travkin79 44962f2
Introduce a self-explaining convenience method for empty images
travkin79 44da61b
Replace complex instanceof cascade with a switch expression
travkin79 a69b595
Remove empty / dummy annotations in extension point definition
travkin79 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| <?xml version='1.0' encoding='UTF-8'?> | ||
| <!-- Schema file written by PDE --> | ||
| <schema targetNamespace="org.eclipse.lsp4e" xmlns="http://www.w3.org/2001/XMLSchema"> | ||
| <annotation> | ||
| <appinfo> | ||
| <meta.schema plugin="org.eclipse.lsp4e" id="symbolIconsProvider" name="Symbol Icons Provider"/> | ||
| </appinfo> | ||
| <documentation> | ||
| This extension point allows for customizing the (document) symbol icons with their overlays, their placing and filtering for certain language servers. This way, clients can use other images, adapt overlay icon placing and decide wich symbol details to show or hide in the outline view, call hierarchy, or type hierarchy. | ||
| </documentation> | ||
| </annotation> | ||
|
|
||
| <element name="extension"> | ||
| <annotation> | ||
| <appinfo> | ||
| <meta.element /> | ||
| </appinfo> | ||
| </annotation> | ||
| <complexType> | ||
| <sequence minOccurs="1" maxOccurs="unbounded"> | ||
| <element ref="iconProvider"/> | ||
| </sequence> | ||
| <attribute name="point" type="string" use="required"> | ||
| <annotation> | ||
| <documentation> | ||
| The fully qualified identifier of the extension point. | ||
|
|
||
| This extension point offers client plug-ins options to adapt placement and selection of overlay icons for document symbols and other related elements. | ||
| </documentation> | ||
| </annotation> | ||
| </attribute> | ||
| <attribute name="id" type="string"> | ||
| <annotation> | ||
| <documentation> | ||
|
|
||
| </documentation> | ||
| </annotation> | ||
| </attribute> | ||
| <attribute name="name" type="string"> | ||
| <annotation> | ||
| <documentation> | ||
|
|
||
| </documentation> | ||
| <appinfo> | ||
| <meta.attribute translatable="true"/> | ||
| </appinfo> | ||
| </annotation> | ||
| </attribute> | ||
| </complexType> | ||
| </element> | ||
|
|
||
| <element name="iconProvider"> | ||
| <complexType> | ||
| <sequence minOccurs="1" maxOccurs="unbounded"> | ||
| <element ref="contentType"/> | ||
| </sequence> | ||
| <attribute name="id" type="string" use="required"> | ||
| <annotation> | ||
| <documentation> | ||
| A string uniquely identifying this symbol icon provider extension. | ||
| </documentation> | ||
| </annotation> | ||
| </attribute> | ||
| <attribute name="class" type="string" use="required"> | ||
| <annotation> | ||
| <documentation> | ||
| The fully qualified name of the class implementing this symbol icon provider. The class must extend <code>org.eclipse.lsp4e.ui.SymbolIconProvider</code>. Clients can override individual methods to customize overlay icons and their placement (top-left, top-right, bottom-left, bottom-right, underlay). | ||
| </documentation> | ||
| <appinfo> | ||
| <meta.attribute kind="java" basedOn="org.eclipse.lsp4e.ui.SymbolIconProvider:"/> | ||
| </appinfo> | ||
| </annotation> | ||
| </attribute> | ||
| </complexType> | ||
| </element> | ||
|
|
||
| <element name="contentType"> | ||
| <complexType> | ||
| <attribute name="contentTypeId" type="string" use="required"> | ||
| <annotation> | ||
| <documentation> | ||
| The unique identifier of a content type (as registered with the <code>org.eclipse.core.contenttype.contentTypes</code> extension point) for which this icon provider should be used. The provider is also used for all derived content types that do not have a more specific provider registered. | ||
| </documentation> | ||
| <appinfo> | ||
| <meta.attribute kind="identifier" basedOn="org.eclipse.core.contenttype.contentTypes/content-type/@id"/> | ||
| </appinfo> | ||
| </annotation> | ||
| </attribute> | ||
| </complexType> | ||
| </element> | ||
|
|
||
| <annotation> | ||
| <appinfo> | ||
| <meta.section type="since"/> | ||
| </appinfo> | ||
| <documentation> | ||
| 0.19.10 | ||
| </documentation> | ||
| </annotation> | ||
|
|
||
| <annotation> | ||
| <appinfo> | ||
| <meta.section type="examples"/> | ||
| </appinfo> | ||
| <documentation> | ||
| [Enter extension point usage example here.] | ||
| </documentation> | ||
| </annotation> | ||
|
|
||
| <annotation> | ||
| <appinfo> | ||
| <meta.section type="apiinfo"/> | ||
| </appinfo> | ||
| <documentation> | ||
| [Enter API information here.] | ||
| </documentation> | ||
| </annotation> | ||
|
|
||
| <annotation> | ||
| <appinfo> | ||
| <meta.section type="implementation"/> | ||
| </appinfo> | ||
| <documentation> | ||
| LSP4E provides a default implementation via <code>org.eclipse.lsp4e.ui.SymbolIconProvider</code>. It is used automatically for all content types that have no specific provider registered through this extension point. It renders symbol icons based on the LSP <code>SymbolKind</code> and up to four overlay icons derived from <code>SymbolTag</code>s (visibility, static/final/abstract/etc., marker severity) plus a deprecation underlay. | ||
| </documentation> | ||
| </annotation> | ||
|
|
||
| <annotation> | ||
| <appinfo> | ||
| <meta.section type="copyright"/> | ||
| </appinfo> | ||
| <documentation> | ||
| Copyright (c) 2024 Advantest GmbH and others. | ||
| This program and the accompanying materials are made | ||
| available under the terms of the Eclipse Public License 2.0 | ||
| which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
|
|
||
| SPDX-License-Identifier: EPL-2.0 | ||
| </documentation> | ||
| </annotation> | ||
|
|
||
| </schema> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.