protected void setValue(String value) { final PsiType type = JvmPsiTypeConverterImpl.convertFromString(value, new AbstractConvertContext() { @NotNull public DomElement getInvocationElement() { return getDomElement(); } public PsiManager getPsiManager() { return PsiTypeControl.this.getPsiManager(); } }); if (type != null) { value = type.getCanonicalText(); } super.setValue(value); }
@NotNull protected String getValue() { final String rawValue = super.getValue(); try { final PsiType psiType = JavaPsiFacade.getInstance(getProject()).getElementFactory().createTypeFromText(rawValue, null); final String s = JvmPsiTypeConverterImpl.convertToString(psiType); if (s != null) { return s; } } catch (IncorrectOperationException e) { } return rawValue; }