anchor.diff:      end.
   
   
  --spec(cursor_at_fun_clause/5::(filename(), integer(), integer(), [dir()], integer()) ->
  -	     true |false).
  -cursor_at_fun_clause(FileName, Line, Col, SearchPaths, TabWidth) ->    
  -    {ok, {AnnAST, _Info}} =refac_util:parse_annotate_file(FileName,true, SearchPaths, TabWidth),
  -    case pos_to_fun_clause(AnnAST, {Line, Col}) of 
  -	{ok, _} -> true;
  -	_  -> false
  -    end.
  -    
  -	
   pos_to_fun_clause(Node, Pos) ->
       case refac_util:once_tdTU(fun pos_to_fun_clause_1/2, Node, Pos) of
   	{_, false} -> {error, none};
  
positive.code:     {AnnAST1,_} = refac_util:stop_tdTP(fun do_replace_expr_with_fun_call/2, 
  				       AnnAST, {Body, {{{StartLine, StartCol}, {EndLine, EndCol}}, Exp}}),
      fold_expression_1_1(AnnAST1,Tail).
  
  
  -spec(fold_expression_2_eclipse/7::(filename(), atom(),integer(), integer(), integer(), [dir()], integer()) -> 
  	     {ok, [{integer(), integer(), integer(), integer(), syntaxTree(), {syntaxTree(), integer()}}]}).
  fold_expression_2_eclipse(FileName, FunName, Arity, ClauseIndex, StartLine, SearchPaths, TabWidth ) ->
      {ok, {AnnAST2, _Info1}} = refac_util:parse_annotate_file(FileName,true, SearchPaths, TabWidth),
      case get_fun_clause_def(AnnAST2, FunName, Arity, ClauseIndex) of 
  	{ok, {Mod, _FunName, _Arity, FunClauseDef1}} ->
  	    Candidates = search_candidate_exprs(AnnAST2, {Mod, Mod}, FunName, FunClauseDef1),
  	    Regions = [{StartLine1, StartCol1, EndLine1, EndCol1, FunCall1, {FunClauseDef1, ClauseIndex}} 
  		       || {{{StartLine1, StartCol1}, {EndLine1, EndCol1}}, FunCall1}<-Candidates,
  			  StartLine1 >= StartLine],
  	    {ok, Regions};
  	{error, _Reason} ->
  	    %% THIS SHOULD NOT HAPPEN.
  	    throw({error, "You have not selected a function definition."}) 
      end.
  
  
  
  %% =============================================================================================
  %% Side condition analysis.
  
negative.code: 
  -spec(fold_expr_by_loc_eclipse/5::(filename(), integer(), integer(), [dir()], integer()) ->
  	     {ok,  {syntaxTree(),[{{{integer(), integer()}, {integer(), integer()}}, syntaxTree()}]}}).
  fold_expr_by_loc_eclipse(FileName, Line, Col, SearchPaths, TabWidth) ->
      fold_expression(FileName, Line, Col, SearchPaths, TabWidth, eclipse).
  
  