def run(self, action='primary', force_update=False, kill_only=False):
        '''
        @action
          One of: primary, secondary
        '''

        self.raise_event(self, EventSource.ON_DART_RUN)

        try:
            view = self.window.active_view()
        except TypeError:
            return

        if force_update or DartSmartRunCommand.last_run_file[0] is None:
            try:
                DartSmartRunCommand.last_run_file = (
                                                DartFile(view).is_pubspec,
                                                view.file_name())
            except __HOLE__:
                return

        if DartSmartRunCommand.last_run_file[0]:
            self.window.run_command('dart_run_pubspec', {
                'action': action,
                'file_name': DartSmartRunCommand.last_run_file[1]
                })
            return

        self.window.run_command('dart_run_file', {
            'action': action,
            'file_name': DartSmartRunCommand.last_run_file[1],
            'kill_only': kill_only,
            })

    # This class will be instantiated for each view/window, so we need to
    # ensure that only one function will be registered as event handler.
    # Therefore, we use a function whose id is the same across all instances.
dataset/ETHPy150Open guillermooo/dart-sublime-bundle/run.py/DartSmartRunCommand.run