code: public static Terminal get(Terminal terminal) throws Exception {
          if (terminal == null) {
              return get(TerminalFactory.get(), false);
          } else {
              return get(terminal, true);
          }
      }
docs: Wraps the existing {@link Terminal}.
  If {@link Terminal} is null, the terminal will get restored, when editor quites.
  If {@link Terminal} is not null, a rest will be called instead.
  
  @param terminal
  @return
  @throws Exception