structure_view.md: mention StructureViewExtension

This commit is contained in:
Yann Cébron 2021-07-20 10:27:23 +02:00
parent 300b6ba3de
commit 014436ffe6

View File

@ -1,10 +1,14 @@
[//]: # (title: Structure View)
<!-- Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<!-- Copyright 2000-2021 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
The Structure View implementation used for a specific file type can be customized on many levels.
If a custom language plugin provides an implementation of the [`StructureView`](upsource:///platform/editor-ui-api/src/com/intellij/ide/structureView/StructureView.java) interface, it can completely replace the standard structure view implementation with a custom user interface component.
However, for most languages, this is not necessary, and the standard [`StructureView`](upsource:///platform/editor-ui-api/src/com/intellij/ide/structureView/StructureView.java) implementation provided by IntelliJ Platform can be reused.
> To modify an existing Structure View (e.g., add/filter nodes of builtin language support) , use [`StructureViewExtension`](upsource:///platform/structure-view-impl/src/com/intellij/ide/structureView/StructureViewExtension.java) registered in `com.intellij.lang.structureViewExtension` extension point.
>
{type="tip"}
The starting point for the structure view is the [`PsiStructureViewFactory`](upsource:///platform/editor-ui-api/src/com/intellij/lang/PsiStructureViewFactory.java) interface, which is registered in the `com.intellij.lang.psiStructureViewFactory` extension point.