Do not show description hint for declaration with diagnostic message

#KT-4815 Fixed
This commit is contained in:
Alexey Sedunov
2014-04-18 14:01:09 +04:00
parent e5777129e2
commit 45073c5a1c
@@ -196,7 +196,9 @@ public class DeclarationHintSupport extends AbstractProjectComponent {
try {
BindingContext bindingContext =
AnalyzerFacadeWithCache.analyzeFileWithCache(jetFile).getBindingContext();
descriptor = bindingContext.get(BindingContext.DECLARATION_TO_DESCRIPTOR, declaration);
descriptor = bindingContext.getDiagnostics().forElement(declaration).isEmpty()
? bindingContext.get(BindingContext.DECLARATION_TO_DESCRIPTOR, declaration)
: null;
}
finally {
// Back to GUI thread for submitting result