anchor.diff:  fold_expression_1_eclipse_1(AnnAST, _Body,  []) -> 
       AnnAST;
   fold_expression_1_eclipse_1(AnnAST, Body, [{{StartLoc, EndLoc}, Exp}|Tail]) ->
  -    {AnnAST1,_} = refac_util:stop_tdTP(fun do_replace_expr_with_fun_call_eclipse/2, AnnAST, {Body, {{StartLoc, EndLoc}, Exp}}),
  +    {AnnAST1,_} = refac_util:stop_tdTP(fun do_replace_expr_with_fun_call/2, AnnAST, {Body, {{StartLoc, EndLoc}, Exp}}),
       fold_expression_1_eclipse_1(AnnAST1, Body, Tail).
       
       
   
  --spec(fold_expression_1/9::(filename(), integer(), integer(), integer(), integer(), syntaxTree(), {filename(),atom(), syntaxTree(), integer()}, [dir()], integer()) ->
  -	     {ok, [{integer(), integer(), integer(), integer(), syntaxTree(), {filename(), atom(), syntaxTree(), integer()}}]}).
  -fold_expression_1(FileName, StartLine, StartCol, EndLine, EndCol, NewExp0, {FunDefFileName, FunDefMod, FunClauseDef0, ClauseIndex}, SearchPaths, TabWidth) -> 
  -    NewExp= binary_to_term(list_to_binary(NewExp0)),
  +fold_expression_1(FileName, CandidatesToFold, SearchPaths, TabWidth) ->
  +    {ok, {AnnAST, _Info}} = refac_util:parse_annotate_file(FileName, true, SearchPaths, TabWidth),
  +    AnnAST1= fold_expression_1_1(AnnAST,  CandidatesToFold),
  +    refac_util:write_refactored_files_for_preview([{{FileName, FileName}, AnnAST1}]),
  +    {ok, [FileName]}.
  +
  +fold_expression_1_1(AnnAST, []) -> 
  +    AnnAST;
  +fold_expression_1_1(AnnAST, [{StartLine, StartCol, EndLine, EndCol, Exp0, FunClauseDef0}|Tail]) ->
       FunClauseDef = binary_to_term(list_to_binary(FunClauseDef0)),
  -    {ok, {AnnAST, Info}} = refac_util:parse_annotate_file(FileName, true, SearchPaths, TabWidth),
  -    {value, {module, CurrentMod}} = lists:keysearch(module, 1, Info),
  -    FunCall = case refac_syntax:type(NewExp) of 
  -		  application -> NewExp;
  -		  match_expr -> refac_syntax:match_expr_body(NewExp)
  -	      end,
  -    Op = refac_syntax:application_operator(FunCall),
  -    FunName = case refac_syntax:type(Op) of 
  -		  atom ->refac_syntax:atom_value(Op);
  -		  module_qualifier ->
  -		       refac_syntax:atom_value(refac_syntax:module_qualifier_body(Op))
  -	      end,
  -    Arity = length(refac_syntax:application_arguments(FunCall)),		   
  +    Exp = binary_to_term(list_to_binary(Exp0)),
       Body = refac_syntax:clause_body(FunClauseDef),
  -    {AnnAST1,_} = refac_util:stop_tdTP(fun do_replace_expr_with_fun_call/2, AnnAST, {Body, NewExp, {{StartLine, StartCol}, {EndLine, EndCol}}}),
  -    refac_util:write_refactored_files([{{FileName, FileName}, AnnAST1}]),  
  -    {ok, {AnnAST2, _Info2}} = refac_util:parse_annotate_file(FileName,true, SearchPaths, TabWidth),
  -    {ok, {AnnAST3, _Info3}} = refac_util:parse_annotate_file(FunDefFileName,true, SearchPaths, TabWidth),
  -    case get_fun_clause_def(AnnAST3, FunName, Arity, ClauseIndex) of 
  -	{ok, {_Mod, _FunName, _Arity, FunClauseDef1}} ->
  -	    Candidates = search_candidate_exprs(AnnAST2, {FunDefMod, CurrentMod}, FunName, FunClauseDef1),
  -	    FunClauseDef2 = binary_to_list(term_to_binary(FunClauseDef1)),
  -	    Regions = [{StartLine1, StartCol1, EndLine1, EndCol1, binary_to_list(term_to_binary(FunCall1)), 
  -			{FunDefFileName, FunDefMod, FunClauseDef2, ClauseIndex}} 
  -		       || {{{StartLine1, StartCol1}, {EndLine1, EndCol1}}, FunCall1}<-Candidates,
  -			  StartLine1 >= StartLine],
  -	    {ok,  Regions};
  -	{error, _Reason} ->
  -	    {error, "You have not selected a function definition."}  %% THIS SHOULD NOT HAPPEN.
  -    end.
  -  
  -
  +    {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()}}]}
  
positive.code: %% =============================================================================================
  -module(refac_fold_expression).
  
  -export([fold_expr_by_loc/5, fold_expression_1/9,
  	 fold_expr_by_loc_eclipse/5, fold_expression_1_eclipse/5,
  	 fold_expression_2_eclipse/7, fold_expression_1/5,
  	 fold_expr_by_name/7, fold_expr_by_name_eclipse/7,
  
negative.code: 			_ -> case Editor of 
  				 emacs ->
  				     FunClauseDef1 = binary_to_list(term_to_binary(FunClauseDef)),
  				     Candidates1 = lists:map(fun({{{StartLine, StartCol}, {EndLine, EndCol}},NewExp}) ->
  								    NewExp1 = binary_to_list(term_to_binary(NewExp)),
  								     {StartLine, StartCol, EndLine, EndCol, NewExp1, FunClauseDef1}
  							     end,
  							     Candidates),
  				     {ok, Candidates1};
  				 eclipse ->  {ok, {FunClauseDef, Candidates}}
  			     end			      
  		    end;				 
  