public static boolean isFromExternalTypeLanguage(@NotNull PsiType type) {
String internalCanonicalText = type.getInternalCanonicalText();
return internalCanonicalText != null && internalCanonicalText.equals(type.getCanonicalText());
}
@Nullable
<BUG>public static PsiType getVariableTypeByExpressionType(final PsiType type) {

PsiType transformed = type.accept(new PsiTypeVisitor<PsiType>() {</BUG>
@Override
public PsiType visitArrayType(PsiArrayType arrayType) {

public static boolean isFromExternalTypeLanguage(@NotNull PsiType type) {
String internalCanonicalText = type.getInternalCanonicalText();
return internalCanonicalText != null && internalCanonicalText.equals(type.getCanonicalText());
}
@Nullable
public static PsiType getVariableTypeByExpressionType(@Nullable final PsiType type) {
if (type == null) return null;
PsiType transformed = type.accept(new PsiTypeVisitor<PsiType>() {
@Override
public PsiType visitArrayType(PsiArrayType arrayType) {
