15. Structure Aware Navigation Bar
Structure aware navbar allows displaying specific file elements in the navigation bar, depending on the location of the caret in it. For example, in Java this is used to display the class and method in which the caret is currently located.
Define a SimpleStructureAwareNavbar
The SimpleStructureAwareNavbar
implements StructureAwareNavBarModelExtension
.
Register the SimpleStructureAwareNavbar
The SimpleStructureAwareNavbar
implementation is registered with the IntelliJ Platform in the plugin configuration file using the com.intellij.navbar
extension point.
<extensions defaultExtensionNs="com.intellij">
<navbar implementation="org.intellij.sdk.language.SimpleStructureAwareNavbar"/>
</extensions>
Run the Project
Run the project by using the Gradle runIde task.
Open the test.simple file and position the caret on any property. The navigation bar displays the name and icon of this property.
Last modified: 29 δΉζ 2022