Esempio n. 1
0
    def on_activated(self, view):
        hsdev.start_agent()

        self.set_cabal_status(view)

        window = view.window()
        if window:
            if int(sublime.version()) < 3000:
                pass
            else:
                if not self.project_file_name:
                    self.project_file_name = window.project_file_name()
                if window.project_file_name(
                ) is not None and window.project_file_name(
                ) != self.project_file_name:
                    self.project_file_name = window.project_file_name()
                    log('project switched to {0}, reinspecting'.format(
                        self.project_file_name))
                    if hsdev.agent_connected():
                        log('reinspect all', log_trace)
                        hsdev.client.remove_all()
                        hsdev.agent.start_inspect()
                        hsdev.agent.force_inspect()
                    else:
                        show_status_message("inspector not connected",
                                            is_ok=False)
Esempio n. 2
0
    def on_load(self, view):
        hsdev.start_agent()

        self.set_cabal_status(view)
        if is_inspected_source(view):
            filename = view.file_name()
            if filename:
                hsdev.agent.mark_file_dirty(filename)
                update_completions_async(drop_all=True)
Esempio n. 3
0
    def on_load(self, view):
        hsdev.start_agent()

        self.set_cabal_status(view)
        if is_inspected_source(view):
            filename = view.file_name()
            if filename:
                hsdev.agent.mark_file_dirty(filename)
                update_completions_async(drop_all = True)
Esempio n. 4
0
    def on_activated(self, view):
        hsdev.start_agent()

        self.set_cabal_status(view)

        window = view.window()
        if window:
            if int(sublime.version()) < 3000:
                pass
            else:
                if not self.project_file_name:
                    self.project_file_name = window.project_file_name()
                if window.project_file_name() is not None and window.project_file_name() != self.project_file_name:
                    self.project_file_name = window.project_file_name()
                    log('project switched to {0}, reinspecting'.format(self.project_file_name))
                    if hsdev.agent_connected():
                        log('reinspect all', log_trace)
                        hsdev.client.remove_all()
                        hsdev.agent.start_inspect()
                        hsdev.agent.force_inspect()
                    else:
                        show_status_message("inspector not connected", is_ok = False)