diff options
author | Maria Christakis <[email protected]> | 2010-10-17 18:20:53 +0300 |
---|---|---|
committer | Maria Christakis <[email protected]> | 2010-11-30 10:11:37 +0200 |
commit | f1d81c87d832c805a90a8dceca247cecaad803ab (patch) | |
tree | a60013d9f913af3a4ba445725694ef429d6c9cc5 /lib/dialyzer/src/dialyzer_gui_wx.erl | |
parent | 4101091756a98d78cde0d6b2d88959dae324e860 (diff) | |
download | otp-f1d81c87d832c805a90a8dceca247cecaad803ab.tar.gz otp-f1d81c87d832c805a90a8dceca247cecaad803ab.tar.bz2 otp-f1d81c87d832c805a90a8dceca247cecaad803ab.zip |
dialyzer: Add support for multiple PLTs
This new feature is able to take multiple PLTs, merge them during the
start of the analysis, and work from there. This works provided that
the PLTs do not have a module with the same name appearing in more
than one PLT.
The PLTs are created in the usual way:
dialyzer --build_plt --output_plt PLT_1 FILES_TO_INCLUDE
...
dialyzer --build_plt --output_plt PLT_N FILES_TO_INCLUDE
and then can be used in either of the following ways:
dialyzer FILES_TO_ANALYZE --plts PLT_1 ... PLT_N
or:
dialyzer --plts PLT_1 ... PLT_N -- FILES_TO_ANALYZE
(Note the -- delimiter in the second case)
Diffstat (limited to 'lib/dialyzer/src/dialyzer_gui_wx.erl')
-rw-r--r-- | lib/dialyzer/src/dialyzer_gui_wx.erl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/dialyzer/src/dialyzer_gui_wx.erl b/lib/dialyzer/src/dialyzer_gui_wx.erl index 2e309d7ec1..e711c15ea7 100644 --- a/lib/dialyzer/src/dialyzer_gui_wx.erl +++ b/lib/dialyzer/src/dialyzer_gui_wx.erl @@ -88,7 +88,7 @@ start(DialyzerOptions) -> State = wx:batch(fun() -> create_window(Wx, DialyzerOptions) end), gui_loop(State). -create_window(Wx, DialyzerOptions) -> +create_window(Wx, #options{init_plts = InitPltFiles} = DialyzerOptions) -> {ok, Host} = inet:gethostname(), %%---------- initializing frame --------- @@ -258,11 +258,15 @@ create_window(Wx, DialyzerOptions) -> plt = PltMenu, options =OptionsMenu, help = HelpMenu}, - - InitPlt = try dialyzer_plt:from_file(DialyzerOptions#options.init_plt) - catch throw:{dialyzer_error, _} -> dialyzer_plt:new() - end, + InitPlt = + case InitPltFiles of + [] -> dialyzer_plt:new(); + _ -> + Plts = [dialyzer_plt:from_file(F) || F <- InitPltFiles], + dialyzer_plt:merge_plts_or_report_conflicts(InitPltFiles, Plts) + end, + #gui_state{add = AddButton, add_dir = AddDirButton, add_rec = AddRecButton, |