'Reload options.
1. Stop proxy
2. Try to start proxy with new params
3. If can\'t => alert
4. If everything is ok then start proxy
5. Set Trap options
6. Save options'

def reload_options(self):

    new_port = self.pref.get_value('proxy', 'ipport')
    if (new_port != self._prev_ip_port):
        self.w3af.mainwin.sb(_('Stopping    local    proxy'))
        if self.proxy:
            self.proxy.stop()
        try:
            self._start_proxy()
        except ProxyException:
            self.w3af.mainwin.sb(_('Failed    to    start    local    proxy'))
            self.fuzzable = None
            self.waiting_requests = False
            self.keep_checking = False
            self.nb.set_current_page(2)
            return
        else:
            self.fuzzable = None
            self.waiting_requests = True
            self.keep_checking = True
    try:
        self.proxy.set_what_to_trap(self.pref.get_value('proxy', 'trap'))
        self.proxy.set_what_not_to_trap(self.pref.get_value('proxy', 'notrap'))
        self.proxy.set_methods_to_trap(self.pref.get_value('proxy', 'methodtrap'))
    except BaseFrameworkException as w3:
        self.show_alert(_(('Invalid    configuration!\n' + str(w3))))
    self._prev_ip_port = new_port
    httpeditor = self.reqresp.request.get_view_by_id('HttpRawView')
    httpeditor.set_show_line_numbers(self.pref.get_value('editor', 'display_line_num'))
    httpeditor.set_highlight_current_line(self.pref.get_value('editor', 'highlight_current_line'))
    httpeditor.set_highlight_syntax(self.pref.get_value('editor', 'highlight_syntax'))
    httpeditor.set_wrap(self.pref.get_value('editor', 'wrap'))
    self.pref.save()
    if (self._layout != self.pref.get_value('proxy', 'trap_view')):
        self.show_alert(_('Some    of    options    will    take    effect    after    you    restart    proxy    tool'))
