mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 18:27:49 +08:00
IJSDK-481 Broken links in reference_guide/custom_language_support/structure_view.md
This commit is contained in:
parent
23bcbe0d88
commit
e31f6b76db
@ -4,14 +4,14 @@ title: Structure View
|
||||
|
||||
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/structure-view-api/src/com/intellij/ide/structureView/StructureView.java)
|
||||
[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/structure-view-api/src/com/intellij/ide/structureView/StructureView.java)
|
||||
[StructureView](upsource:///platform/editor-ui-api/src/com/intellij/ide/structureView/StructureView.java)
|
||||
implementation provided by *IntelliJ Platform* can be reused.
|
||||
|
||||
The starting point for the structure view is the
|
||||
[PsiStructureViewFactory](upsource:///platform/structure-view-api/src/com/intellij/lang/PsiStructureViewFactory.java)
|
||||
[PsiStructureViewFactory](upsource:///platform/editor-ui-api/src/com/intellij/lang/PsiStructureViewFactory.java)
|
||||
interface, which is registered in the `com.intellij.lang.psiStructureViewFactory` extension point.
|
||||
|
||||
**Example:**
|
||||
@ -21,14 +21,14 @@ for
|
||||
|
||||
|
||||
To reuse the *IntelliJ Platform* implementation of the
|
||||
[StructureView](upsource:///platform/structure-view-api/src/com/intellij/ide/structureView/StructureView.java),
|
||||
[StructureView](upsource:///platform/editor-ui-api/src/com/intellij/ide/structureView/StructureView.java),
|
||||
the plugin returns a
|
||||
[TreeBasedStructureViewBuilder](upsource:///platform/structure-view-api/src/com/intellij/ide/structureView/TreeBasedStructureViewBuilder.java)
|
||||
[TreeBasedStructureViewBuilder](upsource:///platform/editor-ui-api/src/com/intellij/ide/structureView/TreeBasedStructureViewBuilder.java)
|
||||
from its
|
||||
[PsiStructureViewFactory.getStructureViewBuilder()](upsource:///platform/structure-view-api/src/com/intellij/lang/PsiStructureViewFactory.java)<!--#L35-->
|
||||
[PsiStructureViewFactory.getStructureViewBuilder()](upsource:///platform/editor-ui-api/src/com/intellij/lang/PsiStructureViewFactory.java)<!--#L35-->
|
||||
method.
|
||||
As the model for the builder, the plugin can specify a subclass of
|
||||
[TextEditorBasedStructureViewModel](upsource:///platform/structure-view-api/src/com/intellij/ide/structureView/TextEditorBasedStructureViewModel.java),
|
||||
[TextEditorBasedStructureViewModel](upsource:///platform/editor-ui-api/src/com/intellij/ide/structureView/TextEditorBasedStructureViewModel.java),
|
||||
and by overriding methods of this subclass it customizes the structure view for a specific language.
|
||||
|
||||
**Example**:
|
||||
@ -38,7 +38,7 @@ for
|
||||
|
||||
|
||||
The main method to override is `getRoot()`, which returns the instance of a class implementing the
|
||||
[StructureViewTreeElement](upsource:///platform/structure-view-api/src/com/intellij/ide/structureView/StructureViewTreeElement.java)
|
||||
[StructureViewTreeElement](upsource:///platform/editor-ui-api/src/com/intellij/ide/structureView/StructureViewTreeElement.java)
|
||||
interface.
|
||||
There exists no standard implementation of this interface, so a plugin will need to implement it completely.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user