public static void saveAllFilesSafely(){
  invokeAndWaitIfNeeded((Runnable)null);
}

public static void saveAllFilesSafely ( ) { invokeAndWaitIfNeeded ( ( Runnable ) null ) ; }
saves all edited documents . this method can be called from any thread .
