How to overlay a small decoration on top of existing icon.

Imagine a usecase where multiple users are accessing the same project and editing files via a 3rd party plugin. I want to add a decoration to the project viewis file icons indicating the files that are being currenly edited. Is it possible with Open API to add a small decoration to the existing icon or is there any workaround?

Comment actions Permalink

Please see com.intellij.ide.IconProvider, there's a couple of threads in forum on how to use it

Comment actions Permalink

yes I tried implementing IconProvider and I could replace the existing icon of any file. But I only want to put an ovelay to the existing icon. Please guide me how to do this if it is possible with IconProvider. Shown below is what I tried.

public class FileIconProvider extends IconProvider {

    private static final String INUSE_ICON_URL = "/awareness/inuseIcon.png";

Icon getIcon(PsiElement element, int flags) {
        PsiFile containingFile = element.getContainingFile();

(containingFile != null) {
            if(//some condition) {
        return null;

Comment actions Permalink

see com.intellij.ui.LayeredIcon


Please sign in to leave a comment.