I am trying to do the following via Psi:
The code I have is (embedded in a Command)
PsiClass inner = psiManager.getElementFactory().createInterface("inner");
PsiImportStatement importStatement = psiManager.getElementFactory().createImportStatement(inner);
The resulting import is import I;, rather than import org.B.I;
If inner already exists then the import is done correctly, so I suspect I need to do something to get it resolved correctly after creation.