Line Marker Provider not executed


I don’t know why, the code is not executed

<codeInsight.lineMarkerProvider language="JAVA" implementationClass="com.leaniss.smartchat.inlay.MyLineMarkerProvider2"/>
package com.leaniss.smartchat.inlay;

 * @Description //TODO
 * @Date 2023/12/6 18:17
 * @Author yongwangat
public class MyLineMarkerProvider2 implements LineMarkerProvider {
    public LineMarkerInfo<?> getLineMarkerInfo(@NotNull PsiElement element) {
        // Only work with method identifiers (to reduce unnecessary checks)
        if (element instanceof PsiMethod && element.getFirstChild() != null) {
            PsiMethod method = (PsiMethod) element;
            // Check if the method name contains "test"
            if (method.getName().contains("test")) {
                // Provide an appropriate tool tip message
                Function<PsiElement, String> tooltipProvider = e -> "Test method: " + method.getName();
                return new LineMarkerInfo<>(
                        AllIcons.RunConfigurations.TestState.Run, // IntelliJ's test icon
                        null, // No click action
        return null;





1 comment


It's impossible to tell what the reason is without more details. What file do you run it on? Did you set a debugger breakpoint in this method?

Also, please name topics more accurately. In this case, I'm renaming it from “Line Marker Provider” to “Line Marker Provider not executed”.


Please sign in to leave a comment.