mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-145409 IntelliJRulezz in completion message
This commit is contained in:
+8
-3
@@ -654,14 +654,19 @@ public class JavaCompletionContributor extends CompletionContributor {
|
||||
PsiType type = expectedTypes.size() == 1 ? expectedTypes.iterator().next() : null;
|
||||
if (type != null) {
|
||||
final PsiType deepComponentType = type.getDeepComponentType();
|
||||
String expectedType = type.getPresentableText();
|
||||
if (expectedType.contains(CompletionUtil.DUMMY_IDENTIFIER_TRIMMED)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (deepComponentType instanceof PsiClassType) {
|
||||
if (((PsiClassType)deepComponentType).resolve() != null) {
|
||||
return CompletionBundle.message("completion.no.suggestions.of.type", type.getPresentableText()) + suffix;
|
||||
return CompletionBundle.message("completion.no.suggestions.of.type", expectedType) + suffix;
|
||||
}
|
||||
return CompletionBundle.message("completion.unknown.type", type.getPresentableText()) + suffix;
|
||||
return CompletionBundle.message("completion.unknown.type", expectedType) + suffix;
|
||||
}
|
||||
if (!PsiType.NULL.equals(type)) {
|
||||
return CompletionBundle.message("completion.no.suggestions.of.type", type.getPresentableText()) + suffix;
|
||||
return CompletionBundle.message("completion.no.suggestions.of.type", expectedType) + suffix;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user