protected void extract(PsiElement first, PsiElement last, PsiElement from) throws IncorrectOperationException {
      // trim leading empty spaces
      while (first != last && isWhiteSpace(first)) {
        first = first.getNextSibling();
      }

      // trim trailing empty spaces
      while (last != first && isWhiteSpace(last)) {
        last = last.getPrevSibling();
      }

      // nothing to extract
      if (first == null || last == null || first == last && isWhiteSpace(last)) return;

      PsiElement toExtract = first;
      if (myIsEffective) {
        toExtract = addRangeBefore(first, last, from.getParent(), from);
      }

      do {
        if (toExtract != null) {
          addElementToExtract(toExtract);
          toExtract = toExtract.getNextSibling();
        }
        first = first.getNextSibling();
      }
      while (first != null && first.getPrevSibling() != last);
    }
protected void extract(PsiElement first, PsiElement last, PsiElement from)