cleanup
This commit is contained in:
@@ -432,18 +432,21 @@ public class Converter {
|
|||||||
@NotNull
|
@NotNull
|
||||||
private static List<Import> importsToImportList(@NotNull PsiImportStatementBase[] imports) {
|
private static List<Import> importsToImportList(@NotNull PsiImportStatementBase[] imports) {
|
||||||
List<Import> result = new LinkedList<Import>();
|
List<Import> result = new LinkedList<Import>();
|
||||||
for (PsiImportStatementBase i : imports)
|
for (PsiImportStatementBase i : imports) {
|
||||||
if (!NOT_NULL_ANNOTATIONS.contains(importToImport(i).getName()))
|
Import anImport = importToImport(i);
|
||||||
result.add(importToImport(i));
|
String name = anImport.getName();
|
||||||
|
if (!name.isEmpty() && !NOT_NULL_ANNOTATIONS.contains(name))
|
||||||
|
result.add(anImport);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static Import importToImport(@NotNull PsiImportStatementBase i) { // TODO: import reference
|
private static Import importToImport(@NotNull PsiImportStatementBase i) {
|
||||||
final PsiJavaCodeReferenceElement reference = i.getImportReference();
|
final PsiJavaCodeReferenceElement reference = i.getImportReference();
|
||||||
if (reference != null)
|
if (reference != null)
|
||||||
return new Import(quoteKeywords(reference.getQualifiedName()) + (i.isOnDemand() ? ".*" : ""));
|
return new Import(quoteKeywords(reference.getQualifiedName()) + (i.isOnDemand() ? ".*" : ""));
|
||||||
return new Import(""); // TODO: remove
|
return new Import("");
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@@ -456,7 +459,7 @@ public class Converter {
|
|||||||
@NotNull
|
@NotNull
|
||||||
public static Parameter parameterToParameter(@NotNull PsiParameter parameter) {
|
public static Parameter parameterToParameter(@NotNull PsiParameter parameter) {
|
||||||
return new Parameter(
|
return new Parameter(
|
||||||
new IdentifierImpl(parameter.getName()), // TODO: remove
|
new IdentifierImpl(parameter.getName()),
|
||||||
typeToType(parameter.getType(), isNotNull(parameter.getModifierList())),
|
typeToType(parameter.getType(), isNotNull(parameter.getModifierList())),
|
||||||
isReadOnly(parameter)
|
isReadOnly(parameter)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user