anchor.diff:  %%   `{error, Reason}' if the user didn't select the kind of entity 
   %%   expected; or `{ok, term()' when a valid focus of interest has been
   %%   selected.
  -%%  ```pre_cond_check(Args::#args{})
  +%%  ```check_pre_cond(Args::#args{})
   %%       ===> ok | {error, Reason}'''
   %%   This function checks whether the pre-conditions of the refactoring 
   %%   hold, and returns `ok' if the pre-condition checking passes, otherwise
  
positive.code: %%</li>
  %%</ul>
  %%</doc>
  
  
  -module(gen_refac).
  
  -export([run_refac/2, 
           input_pars/1,
           apply_changes/3
          ]).
  
  -export([behaviour_info/1]).
  
  -include("../include/gen_refac.hrl").
  
  %%@private
  -spec behaviour_info(atom()) -> 'undefined' | [{atom(), arity()}].
  behaviour_info(callbacks) ->
      [{input_pars,0}, {select_focus,1}, 
       {pre_cond_check, 1}, {transform, 1},
       {selective, 0}].
  
  -spec(select_focus(Module::module(), Args::[term()]) ->
  
negative.code:     case select_focus(Module, Args0) of
          {ok, Sel} ->
              Args1 = Args0#args{focus_sel=Sel},
              case check_pre_cond(Module, Args1) of
                  ok -> 
                      Selective=selective(Module),
                      wrangler_gen_refac_server:set_flag({self(), Selective}),
                      Args2 = Args1#args{selective=Selective},
                      case Selective of 
                          true ->
                              case apply(Module, transform, [Args2]) of
                                  {error, Reason} ->
                                      {error, Reason};
                                  _ ->
                                      {ok, ChangeSets}=wrangler_gen_refac_server:get_change_set(self()),     
                                      %% wrangler_gen_refac_server:delete_change_set(self()),
                                      {change_set, ChangeSets, Module, Args2}
                              end;
                          false->
                              case apply(Module, transform, [Args2]) of
                                {ok, Res} ->
                                      wrangler_gen_refac_server:delete_flag(self()),
                                      refac_write_file:write_refactored_files(Res,emacs,TabWidth,"");
                                  {error, Reason} ->
                                      wrangler_gen_refac_server:delete_flag(self()),
                                      {error, Reason}
                              end
                      end;
  