package name.kropp.intellij.makefile.psi;

import com.intellij.icons.AllIcons;
import com.intellij.navigation.ItemPresentation;

import javax.swing.*;

class MakefileTargetPresentation implements ItemPresentation {
    private MakefileTarget target;

    MakefileTargetPresentation(MakefileTarget target) {
        this.target = target;
    }

    @Override
    public String getPresentableText() {
        return target.getText();
    }

    @Override
    public String getLocationString() {
        return "";
    }

    @Override
    public Icon getIcon(boolean b) {
        return AllIcons.Toolwindows.ToolWindowRun;
    }
}

@@ -502,17 +502,87 @@
 return %22
-%22
+in %22 + target.getContainingFile().getVirtualFile().getPresentableName()
 ;%0A    %7D%0A

add location text to target's presentable item