mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
temporary workaround for IDEA-341171
GitOrigin-RevId: eac268caeebac02bf887035cb40270d162c39f0e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cf58114100
commit
fb3b9adf12
@@ -14,6 +14,7 @@ import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.ui.scale.ScaleContext;
|
||||
import com.intellij.ui.scale.ScaleContextCache;
|
||||
import com.intellij.util.SVGLoader;
|
||||
import com.intellij.util.ui.EDT;
|
||||
import org.apache.commons.imaging.ImageReadException;
|
||||
import org.apache.commons.imaging.common.bytesource.ByteSourceArray;
|
||||
import org.apache.commons.imaging.formats.ico.IcoImageParser;
|
||||
@@ -183,6 +184,10 @@ public final class IfsUtil {
|
||||
}
|
||||
|
||||
public static @NlsSafe String getReferencePath(Project project, VirtualFile file) {
|
||||
if (EDT.isCurrentThreadEdt()) {
|
||||
LOG.warn("FIXME IDEA-341171 org.intellij.images.vfs.IfsUtil#getReferencePath on EDT");
|
||||
return file.getName();
|
||||
}
|
||||
ProjectFileIndex fileIndex = ProjectRootManager.getInstance(project).getFileIndex();
|
||||
VirtualFile sourceRoot = fileIndex.getSourceRootForFile(file);
|
||||
if (sourceRoot != null) {
|
||||
|
||||
Reference in New Issue
Block a user