Color (@NotNull Project project, @Nullable Object object) { VirtualFile file; if (object instanceof FilePath) { file = getScopeVirtualFileFor((FilePath)object); } else if (object instanceof Change) { file = getScopeVirtualFileFor(ChangesUtil.getFilePath((Change)object)); } else { file = ObjectUtils.tryCast(object, VirtualFile.class); } if (file != null) { return VfsPresentationUtil.getFileBackgroundColor(project, file); } return null; }