Skip to content

Commit

Permalink
Remove old icon documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Apr 3, 2023
1 parent f0fc08a commit 7131c22
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 455 deletions.
10 changes: 0 additions & 10 deletions rsd.tree
Original file line number Diff line number Diff line change
Expand Up @@ -512,16 +512,9 @@
<toc-element toc-title="Custom products"/>
</toc-element>
<toc-element toc-title="Misc Topics">
<toc-element id="IconTypes.md"
accepts-web-file-names="Platform/Shell/Icons/IconTypes.html"/>
<toc-element id="Theming_Icons.md"/>
<toc-element id="QuickDoc_Testing.md"/>
<toc-element id="ConsumingIcons.md"
accepts-web-file-names="Platform/Shell/Icons/ConsumingIcons.html"/>
<toc-element id="TreeNodes.md"
accepts-web-file-names="PSI/Reference/Xml/TreeNodes.html"/>
<toc-element id="CreatingCompiledIcons.md"
accepts-web-file-names="Platform/Shell/Icons/CreatingCompiledIcons.html"/>
<toc-element id="ElementFactories.md"
accepts-web-file-names="PSI/Reference/Xml/ElementFactories.html"/>
<toc-element id="Zones_Troubleshooting.md"/>
Expand All @@ -540,11 +533,8 @@
<toc-element id="Xml_Overview.md"/>
<toc-element id="Manipulation.md"
accepts-web-file-names="PSI/Reference/Xml/Manipulation.html"/>
<toc-element id="Shell_Icons.md"/>
<toc-element id="Licensing.md"
accepts-web-file-names="Platform/Zones/Licensing.html"/>
<toc-element id="CustomIconTypes.md"
accepts-web-file-names="Platform/Shell/Icons/CustomIconTypes.html"/>
<toc-element id="CustomHives.md"
accepts-web-file-names="Platform/VisualStudio/CustomHives.html"/>
<toc-element id="ImplementingProvider.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface IProjectFileLanguageService
The members are as follows:

* **`LanguageType`** - confusingly called `LanguageType`, this is the singleton instance of the derived `ProjectFileType` class that represents the [Project Model file type](ProjectFileType.md) of this language.
* **`Icon`** - the `IconId` of the icon used to represent this file. This is used whenever ReSharper needs to display the icon for a file of this type, such as in the Find Results tool window. See the section on [icons](Shell_Icons.md) for more details on icons.
* **`Icon`** - the `IconId` of the icon used to represent this file. This is used whenever ReSharper needs to display the icon for a file of this type, such as in the Find Results tool window. See the section on [icons](Platform__Icons.md) for more details on icons.
* **`GetPreprocessorDefines`** - retrieves a list of preprocessor symbols that are defined for the current project, as this affects the parsing of the PSI tree. This is typically only required for compiled languages in a project where the project itself has a specific language, e.g. a C# project.

## The GetPsiLanguageType method
Expand Down
2 changes: 1 addition & 1 deletion topics/Features/OptionsPages.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The `OptionsPage` attribute requires the plugin author to provide the following

* The page ID. This ID can be specified as a constant field inside the class. The page ID is a string which uniquely identifies this particular options page.
* The name of the page. This is the text that will appear in the left-hand tree on the Options page as well as in the title and navigation elements.
* The image. This refers to the glyph that appears next to the item in the tree and is specified as a type (e.g., `typeof(OptionsPageThemedIcons.SamplePage)`). See [Icons](Shell_Icons.md) for more information.
* The image. This refers to the glyph that appears next to the item in the tree and is specified as a type (e.g., `typeof(OptionsPageThemedIcons.SamplePage)`). See [Icons](Platform__Icons.md) for more information.

In addition, you may specify the following optional parameters:

Expand Down
8 changes: 1 addition & 7 deletions topics/PSI/PSI_Icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The PSI needs to be able to display icons to help identify code elements in completion, navigation or find usage result lists. The PSI can display different icons to distinguish between classes, constructors, methods, parameters, etc. It can also show specific icons for CSS class IDs, HTML elements and unit test elements.

While the [Shell provides the `ThemedIconManager` class](Shell_Icons.md) in order to load and create icons, it is a low level API. It provides no means for getting the icon for a class, other than explicitly loading `PsiSymbolsThemedIcons.Class.Id`. The PSI provides the `PsiIconManager` to retrieve icons for a specific declared element.
While the Shell provides the `ThemedIconManager` class in order to load and create icons, it is a low level API. It provides no means for getting the icon for a class, other than explicitly loading `PsiSymbolsThemedIcons.Class.Id`. The PSI provides the `PsiIconManager` to retrieve icons for a specific declared element.

The `PsiIconManager` provides the following methods and properties:

Expand Down Expand Up @@ -55,9 +55,3 @@ Furthermore, ReSharper ships with a colour icon provider, which recognises type
The collection can be extended by creating a class that implements `IDeclaredElementIconProvider` and is decorated with the `[DeclaredElementIconProvider]` attribute. This scopes the class to PSI-shared component lifetime (that is, the same lifetime as a `ShellComponent`). Should the class need to have a narrower lifetime, such as `[SolutionComponent]`, it is possible to call `PsiIconManager.AddExtension` in the provider's constructor, passing in it's own `Lifetime` for cleanup. The unit test icon provider does this, as it depends on components that have solution lifetime scope.

The `IDeclaredElementIconExtensionProvider` can be implemented to extend the process for deciding what modifiers should be applied to the icon (private, public, etc.). The class should be decorated with the `[DeclaredElementIconExtensionProvider]` attribute, or can also be registered by calling `PsiIconManager.AddExtension` if the component has different lifetime requirements. This provider is currently implemented for CLR and C++ elements.

## Loading icons manually

It is not recommended to load icons directly, but they are available in the [`ThemedIconManager`](ConsumingIcons.md). Simply use the icon IDs defined in the `PsiSymbolsThemedIcons` class, and use [`CompositeIconId.Compose`](IconTypes.md#composite-icons) method to apply modifiers. There are language specific icons in other classes, such `PsiCssThemedIcons` or `PsiBuildScriptsThemedIcons`.

The `PsiIconManager` provides a more flexible and extensible way of getting the correct icon.
103 changes: 0 additions & 103 deletions topics/Platform/Shell/Icons/ConsumingIcons.md

This file was deleted.

Loading

0 comments on commit 7131c22

Please sign in to comment.