mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-25024 Quick preview (Ctrl+Shift+I) does not work for Spring beans
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package com.intellij.psi.impl;
|
||||
|
||||
import com.intellij.ide.IconProvider;
|
||||
import com.intellij.ide.TypePresentationService;
|
||||
import com.intellij.lang.Language;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.pom.*;
|
||||
@@ -93,6 +94,9 @@ public class PomTargetPsiElementImpl extends RenameableFakePsiElement implements
|
||||
}
|
||||
}
|
||||
|
||||
Icon icon = TypePresentationService.getService().getIcon(myTarget);
|
||||
if (icon != null) return icon;
|
||||
|
||||
if (myTarget instanceof PsiTarget) {
|
||||
return ((PsiTarget)myTarget).getNavigationElement().getIcon(0);
|
||||
}
|
||||
@@ -192,4 +196,15 @@ public class PomTargetPsiElementImpl extends RenameableFakePsiElement implements
|
||||
public Project getProject() {
|
||||
return myProject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLocationString() {
|
||||
if (myTarget instanceof PsiTarget) {
|
||||
PsiFile file = ((PsiTarget)myTarget).getNavigationElement().getContainingFile();
|
||||
if (file != null) {
|
||||
return "(" + file.getName() + ")";
|
||||
}
|
||||
}
|
||||
return super.getLocationString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user