cleanup
EA-53845 fixed NPE.
ProjectRootManager obviously cannot be obtained if delegate.getProject() == null.
Some @NotNull & @Nullable added in relative places
fix indents in testdata
do not throw exception