J2K Converter: Support class references as top-level elements

This commit is contained in:
Alexey Sedunov
2015-08-05 00:25:34 +03:00
committed by Alexey Sedunov
parent a9783ffe81
commit e331f13a32
@@ -114,6 +114,13 @@ class Converter private constructor(
is PsiImportStatementBase -> convertImport(element, false)
is PsiAnnotation -> annotationConverter.convertAnnotation(element, withAt = false, newLineAfter = false)
is PsiPackageStatement -> PackageStatement(quoteKeywords(element.getPackageName() ?: "")).assignPrototype(element)
is PsiJavaCodeReferenceElement -> {
if (element.parent is PsiReferenceList) {
val factory = JavaPsiFacade.getInstance(project).elementFactory
typeConverter.convertType(factory.createType(element), Nullability.NotNull)
}
else null
}
else -> null
}