Markers - saikek/Intellij-Idea-Plugin-Creation-Guide GitHub Wiki
Markers are the icons on the left side of your IDE, that give some helpful information and help you navigate through the class.
This area is called Gutter area
.
The icons that are shown are called Markers
.
Here is what we are going to have as a result from this plugin:
Create class that would implement RelatedItemLineMarkerProvider
interface.
@Override
protected void collectNavigationMarkers(@NotNull PsiElement element,
Collection<? super RelatedItemLineMarkerInfo> result) {
Update body of collectNavigationMarkers
method with the logic - search for Class / variable name, parent class, etc.
Change text style, update icons on toolbar.
and finally return the updated element.
NavigationGutterIconBuilder<PsiElement> builder = NavigationGutterIconBuilder
.create(icon)
.setTargets(element);
result.add(builder.createLineMarkerInfo(element));
Declare your implementation class inside codeInsight.lineMarkerProvider
tag, in extensions category.
<extensions defaultExtensionNs="com.intellij">
<projectService
serviceImplementation="com.cyberneticscore.ideapluginguide.settingsinideconfigpanel.SystemSettingsConfiguration"/>
<projectConfigurable
instance="com.cyberneticscore.ideapluginguide.settingsinideconfigpanel.SystemSettingsConfigurable"/>
</extensions>