code: function RefactoringSession(editor) {
          this.editor = editor;
          this.document = editor.document;
          this.selection = editor.getSelection();
          this.text = this.document.getText();
          this.selectedText = editor.getSelectedText();
          this.cm = editor._codeMirror;
          this.startIndex = editor.indexFromPos(this.selection.start);
          this.endIndex = editor.indexFromPos(this.selection.end);
          this.startPos = this.selection.start;
          this.endPos = this.selection.end;
          this.ast = this.createAstOfCurrentDoc();
      }
docs: Note - To use these state defined in Refactoring Session,
  Please reinitialize this RefactoringSession after performing any of the below operations
  (i.e. replaceRange, setSelection or indentLine)
  
  RefactoringSession objects encapsulate state associated with a refactoring session
  and This will help finding information around documents, selection,
  position, ast, and queries around AST nodes
  
  @constructor
  @param {Editor} editor - the editor context for the session