diff options
Diffstat (limited to 'lib/dialyzer/src/dialyzer_gui_wx.erl')
-rw-r--r-- | lib/dialyzer/src/dialyzer_gui_wx.erl | 67 |
1 files changed, 38 insertions, 29 deletions
diff --git a/lib/dialyzer/src/dialyzer_gui_wx.erl b/lib/dialyzer/src/dialyzer_gui_wx.erl index e711c15ea7..8f470dd650 100644 --- a/lib/dialyzer/src/dialyzer_gui_wx.erl +++ b/lib/dialyzer/src/dialyzer_gui_wx.erl @@ -40,39 +40,38 @@ %%------------------------------------------------------------------------ --type wx_object() :: any(). %% XXX: should be imported from wx - --record(menu, {file :: wx_object(), - warnings :: wx_object(), - plt :: wx_object(), - options :: wx_object(), - help :: wx_object()}). - --record(gui_state, {add :: wx_object(), - add_dir :: wx_object(), - add_rec :: wx_object(), - chosen_box :: wx_object(), +-record(menu, {file :: wx:wx_object(), + warnings :: wx:wx_object(), + plt :: wx:wx_object(), + options :: wx:wx_object(), + help :: wx:wx_object()}). +-type menu() :: #menu{}. + +-record(gui_state, {add :: wx:wx_object(), + add_dir :: wx:wx_object(), + add_rec :: wx:wx_object(), + chosen_box :: wx:wx_object(), analysis_pid :: pid(), - del_file :: wx_object(), + del_file :: wx:wx_object(), doc_plt :: dialyzer_plt:plt(), - clear_chosen :: wx_object(), - clear_log :: wx_object(), - explain_warn :: wx_object(), - clear_warn :: wx_object(), + clear_chosen :: wx:wx_object(), + clear_log :: wx:wx_object(), + explain_warn :: wx:wx_object(), + clear_warn :: wx:wx_object(), init_plt :: dialyzer_plt:plt(), - dir_entry :: wx_object(), - file_box :: wx_object(), + dir_entry :: wx:wx_object(), + file_box :: wx:wx_object(), files_to_analyze :: ordset(string()), - gui :: wx_object(), - log :: wx_object(), - menu :: #menu{}, - mode :: wx_object(), + gui :: wx:wx_object(), + log :: wx:wx_object(), + menu :: menu(), + mode :: wx:wx_object(), options :: #options{}, - run :: wx_object(), - stop :: wx_object(), - frame :: wx_object(), - warnings_box :: wx_object(), - explanation_box :: wx_object(), + run :: wx:wx_object(), + stop :: wx:wx_object(), + frame :: wx:wx_object(), + warnings_box :: wx:wx_object(), + explanation_box :: wx:wx_object(), wantedWarnings :: list(), rawWarnings :: list(), backend_pid :: pid(), @@ -503,6 +502,16 @@ gui_loop(#gui_state{backend_pid = BackendPid, doc_plt = DocPlt, [ExtCalls]), free_editor(State,"Analysis Done", Msg), gui_loop(State); + {BackendPid, ext_types, ExtTypes} -> + Map = fun({M,F,A}) -> io_lib:format("~p:~p/~p",[M,F,A]) end, + ExtTypeString = string:join(lists:map(Map, ExtTypes), "\n"), + Msg = io_lib:format("The following remote types are being used " + "but information about them is not available.\n" + "The analysis might get more precise by including " + "the modules containing these types and making sure " + "that they are exported:\n~s\n", [ExtTypeString]), + free_editor(State, "Analysis done", Msg), + gui_loop(State); {BackendPid, log, LogMsg} -> update_editor(Log, LogMsg), gui_loop(State); @@ -814,7 +823,7 @@ build_analysis_record(#gui_state{mode = Mode, menu = Menu, options = Options, 1 -> src_code end, InitPlt = - case wxMenu:isChecked(Menu#menu.plt,?menuID_PLT_INIT_EMPTY) of + case wxMenu:isChecked(Menu#menu.plt, ?menuID_PLT_INIT_EMPTY) of true -> dialyzer_plt:new(); false -> InitPlt0 end, |