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:        Tree2.
  
  
  -spec(gen_fun_1/8::(SideEffect::bool(), FileName::filename(),ParName::atom(), FunName::atom(),
  		    Arity::integer(), FunDefPos::pos(), Exp::syntaxTree(), TabWidth::integer())
        -> {ok, [filename()]}).
  gen_fun_1(SideEffect, FileName,ParName, FunName, Arity, DefPos, Exp, TabWidth) ->
      gen_fun_1(SideEffect, FileName,ParName, FunName, Arity, DefPos, Exp, TabWidth,emacs).
  
  -spec(gen_fun_1_eclipse/8::(SideEffect::bool(), FileName::filename(),ParName::atom(), FunName::atom(), 
  			    Arity::integer(), FunDefPos::pos(), Expr::syntaxTree(), TabWidth::integer()) 
        -> {ok, [{filename(), filename(),string()}]}).
  gen_fun_1_eclipse(SideEffect, FileName,ParName, FunName, Arity, DefPos, Exp, TabWidth) ->
      gen_fun_1(SideEffect, FileName,ParName, FunName, Arity, DefPos, Exp, TabWidth, eclipse).
  
  