mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
fix instance methods lookup presentation
This commit is contained in:
@@ -234,6 +234,7 @@ public class JavaMethodCallElement extends LookupItem<PsiMethod> implements Type
|
||||
presentation.setItemTextBold(getAttribute(HIGHLIGHTED_ATTR) != null);
|
||||
|
||||
MemberLookupHelper helper = myHelper != null ? myHelper : new MemberLookupHelper(myMethod, myContainingClass, false, false);
|
||||
helper.renderElement(presentation, getAttribute(FORCE_QUALIFY) != null, getSubstitutor());
|
||||
final Boolean qualify = getAttribute(FORCE_QUALIFY) != null ? Boolean.TRUE : myHelper == null ? Boolean.FALSE : null;
|
||||
helper.renderElement(presentation, qualify, getSubstitutor());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,11 +45,11 @@ public class MemberLookupHelper {
|
||||
return myShouldImport;
|
||||
}
|
||||
|
||||
public void renderElement(LookupElementPresentation presentation, boolean forceQualify, PsiSubstitutor substitutor) {
|
||||
public void renderElement(LookupElementPresentation presentation, @Nullable Boolean qualify, PsiSubstitutor substitutor) {
|
||||
final String className = myContainingClass == null ? "???" : myContainingClass.getName();
|
||||
|
||||
final String memberName = myMember.getName();
|
||||
if (!myShouldImport && StringUtil.isNotEmpty(className) || forceQualify) {
|
||||
if (!Boolean.FALSE.equals(qualify) && (!myShouldImport && StringUtil.isNotEmpty(className) || Boolean.TRUE.equals(qualify))) {
|
||||
presentation.setItemText(className + "." + memberName);
|
||||
} else {
|
||||
presentation.setItemText(memberName);
|
||||
|
||||
Reference in New Issue
Block a user