def on_tidy_check(self, action):
        self._plugin.output_pane.clear()

        log_utils.debug('setting target uri')

        uri = self._window.get_active_document().get_uri()
        if uri == None:
            self._flash_message('Please first save your work to some name')

            return

        self._plugin.output_pane.target_uri = uri

        log_utils.debug('set target uri')

        log_utils.debug('tidy checking')

        view = self._window.get_active_view()
        text = gtk_utils.get_view_text(view)

        try:
            effective_opts_dict = config_dict.effective_opts_dict(
                self._plugin.config_dict)
            (s,
             report_items) = tidy_utils.tidy_the_stuff(text,
                                                       effective_opts_dict)
        except Exception, inst:
            self._flash_message(str(inst))

            return
Beispiel #2
0
	def on_tidy_check(self, action):
		self._plugin.output_pane.clear()
		
		log_utils.debug('setting target uri')
		
		uri = self._window.get_active_document().get_uri()
		if uri == None:
			self._flash_message('Please first save your work to some name')
		
			return
			
		self._plugin.output_pane.target_uri = uri
			
		log_utils.debug('set target uri')

		log_utils.debug('tidy checking')
		
		view = self._window.get_active_view()	
		text = gtk_utils.get_view_text(view)
		
		try:	
			effective_opts_dict = config_dict.effective_opts_dict(self._plugin.config_dict)
			(s, report_items) = tidy_utils.tidy_the_stuff(text, effective_opts_dict)
		except Exception, inst:
			self._flash_message(str(inst))

			return
Beispiel #3
0
	def on_tidy(self, action):
		self._plugin.output_pane.clear()
		
		log_utils.debug('tidying')
		
		view = self._window.get_active_view()	
		bf = view.get_buffer()
		
		non_white = gtk_utils.num_non_whites_till_cur(bf)
		text = gtk_utils.get_view_text(view)
			
		try:	
			effective_opts_dict = config_dict.effective_opts_dict(self._plugin.config_dict)
			(s, report_items) = tidy_utils.tidy_the_stuff(text, effective_opts_dict)
		except Exception, inst:
			self._flash_message(str(inst))

			return
    def on_tidy(self, action):
        self._plugin.output_pane.clear()

        log_utils.debug('tidying')

        view = self._window.get_active_view()
        bf = view.get_buffer()

        non_white = gtk_utils.num_non_whites_till_cur(bf)
        text = gtk_utils.get_view_text(view)

        try:
            effective_opts_dict = config_dict.effective_opts_dict(
                self._plugin.config_dict)
            (s,
             report_items) = tidy_utils.tidy_the_stuff(text,
                                                       effective_opts_dict)
        except Exception, inst:
            self._flash_message(str(inst))

            return