issue #1: NPE when Format action is invoked but no java document has the focus

* simplify ReformatWithEclipseAction.java
* add NPE check