Using descriptor renderer in Show Expression Type.

This commit is contained in:
Evgeny Gerashchenko
2012-09-10 13:53:47 +04:00
parent df38012a54
commit 919f9c2735
@@ -31,6 +31,7 @@ import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.types.JetType;
import org.jetbrains.jet.plugin.JetLanguage;
import org.jetbrains.jet.plugin.project.WholeProjectAnalyzerFacade;
import org.jetbrains.jet.resolve.DescriptorRenderer;
/**
* @author yole
@@ -64,7 +65,7 @@ public class ShowExpressionTypeAction extends AnAction {
if (expression != null) {
JetType type = bindingContext.get(BindingContext.EXPRESSION_TYPE, expression);
if (type != null) {
HintManager.getInstance().showInformationHint(editor, type.toString());
HintManager.getInstance().showInformationHint(editor, "<html>" + DescriptorRenderer.HTML.renderType(type) + "</html>");
}
}
}