anchor.diff:  		end
   	end,		
       AnnAST1 =refac_syntax:form_list([T|| Form<-Forms, T <- F(Form)]),
  -    refac_util:write_refactored_files_for_preview([{{FileName,FileName}, AnnAST1}]),
  -    {ok, [FileName]}.
  +    case Editor of 
  +	emacs ->
  +	    refac_util:write_refactored_files_for_preview([{{FileName,FileName}, AnnAST1}]),
  +	    {ok, [FileName]};
  +	eclipse ->
  +	    Res = [{FileName, FileName, refac_prettypr:print_ast(refac_util:file_format(FileName),AnnAST1)}],
  +	    {ok, Res}
  +    end.
   
   replace_clause_body(C, FunName, Arity,Exp, Exp1, Info) ->
       {EStart, EEnd} = refac_util:get_range(Exp),
  
positive.code: 					       case SideEffect of  
  						   unknown -> {unknown_side_effect, {ParName1, FunName, FunArity, FunDefPos,Exp1, NoOfClauses}};
  						   _ ->
  						       case (NoOfClauses >1) and (Editor==emacs) of 
  							   true-> {more_than_one_clause, {ParName1, FunName, FunArity, FunDefPos, Exp1, SideEffect}};
  							   _ ->
  							       AnnAST1=gen_fun(ModName, AnnAST, ParName1, FunName, FunArity, FunDefPos, Info, Exp1, SideEffect),
  
negative.code: 
  -include("../include/wrangler.hrl").
  
  -export([generalise/6, gen_fun_1/8, gen_fun_clause/8]).
  
  -export([generalise_eclipse/6, gen_fun_1_eclipse/8, gen_fun_clause_eclipse/8]).
  
  -define(DEFAULT_RANGE, {?DEFAULT_LOC, ?DEFAULT_LOC}).
  %% =====================================================================
  -spec(generalise/6::(FileName::filename(),Start::pos(), End::pos(),ParName::string(), SearchPaths::[dir()], TabWidth::integer()) ->
  	     {ok, [filename()]}
  	     |{error, string()}
  	     |{unknown_side_effect, {atom(), atom(),integer(), pos(), syntaxTree(), integer()}}
  	     |{more_than_one_clause, {atom(), atom(), integer(), pos(), syntaxTree(), bool()}}). 
  
  generalise(FileName, Start, End, ParName, SearchPaths, TabWidth) ->
      generalise(FileName, Start, End, ParName, SearchPaths, TabWidth, emacs).
  
  -spec(generalise_eclipse/6::(FileName::filename(),Start::pos(), End::pos(),ParName::string(), SearchPaths::[dir()], TabWidth::integer()) -> 
  	     {error, string()}
  	     |{ok, [{filename(), filename(), string()}]}
  	     |{unknown_side_effect, {ParName::atom(), FunName::atom(),Arity::integer(), FunDefPos::pos(), Exp::syntaxTree(), NoOfClauses::integer()}}
  	     |{more_than_one_clause, {ParName::atom(), FunName::atom(), Arity::integer(), FunDefPos::pos(), Exp::syntaxTree(), SideEffect::bool()}}).                   
  
  generalise_eclipse(FileName, Start, End, ParName, SearchPaths, TabWidth) ->
      generalise(FileName, Start, End, ParName, SearchPaths, TabWidth, eclipse).
      
  