Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Disable selective mode for refactorings in Eclipse

  • Loading branch information...
commit a96e04f9b94ef1de1cbe883adb978b881a6dcbbe 1 parent 1aad6af
Aleksandra Lipiec alipiec authored
15 org.erlide.wrangler.core/wrangler/src/gen_refac.erl
@@ -231,7 +231,12 @@ run_refac(ModName, Args=[CurFileName, [Line,Col],
231 231 Args1 = Args0#args{focus_sel=Sel},
232 232 case check_pre_cond(Module, Args1) of
233 233 ok ->
234   - Selective=selective(Module),
  234 + Selective = case Editor of
  235 + eclipse ->
  236 + false;
  237 + _ ->
  238 + selective(Module)
  239 + end,
235 240 wrangler_gen_refac_server:set_flag({self(), Selective}),
236 241 Args2 = Args1#args{selective=Selective},
237 242 if is_boolean(Selective) ->
@@ -250,14 +255,6 @@ run_refac(ModName, Args=[CurFileName, [Line,Col],
250 255 {ok, Res} ->
251 256 wrangler_gen_refac_server:delete_flag(self()),
252 257 wrangler_write_file:write_refactored_files(Res,Editor,TabWidth,"");
253   - %case Editor of
254   - % emacs ->
255   - % R;
256   - % _ ->
257   - % {ok, [{{FName, FName}, AST}]} = Res,
258   - % Content = wrangler_prettypr:print_ast(wrangler_misc:file_format(FName), AST, TabWidth),
259   - % {ok, [{FName, FName, Content}]}
260   - %end;
261 258 {error, Reason} ->
262 259 wrangler_gen_refac_server:delete_flag(self()),
263 260 {error, Reason}
2  org.erlide.wrangler.core/wrangler/src/gen_refacs/refac_apply_to_remote_call.erl
@@ -26,7 +26,7 @@ check_pre_cond(_Args) ->
26 26 ok.
27 27
28 28 selective() ->
29   - false.
  29 + true.
30 30
31 31 %%Do the actual program transformation here.
32 32 -spec (transform/1::(#args{}) -> {ok, [{filename(), filename(), syntaxTree()}]}).
2  org.erlide.wrangler.core/wrangler/src/gen_refacs/refac_keysearch_to_keyfind.erl
@@ -25,7 +25,7 @@ check_pre_cond(_Args) ->
25 25
26 26 -spec (selective/0::()-> true).
27 27 selective() ->
28   - false.
  28 + true.
29 29
30 30 %% Apply the transformation rules to all the Erlang files included in the
31 31 %% SearchPaths.

0 comments on commit a96e04f

Please sign in to comment.
Something went wrong with that request. Please try again.