Example #1
0
			def cb(i, win):
				if i >= 0:
					a = args.get(ents[i], [])
					sargs=""
					if len(a)>0:
						sargs=a[0]
					# print sargs
					if debug:
						win.run_command('gdb_launch', {'test':True,'trun':sargs})
					else:
						global g_builder
						g_builder=GoBuilder()
						g_builder.initEnv(True,sargs,self.window.active_view(),n_console_view)
						g_builder.rcwd=pkg_dir
						g_builder.run()
Example #2
0
	def run(self,debug=False):
		global w_builders
		g_builder=None
		wid=self.window.id()
		if wid in w_builders:
			g_builder=w_builders[wid]
		if (g_builder is not None) and (g_builder.is_running()):
			tview=self.window.active_view()
			n_console_view.add_line(tview,"Builder already running\n")
			return
		aview=self.window.active_view()
		apath=aview.file_name()
		if apath.find("_test.go")==len(apath)-8:
			self.window.run_command("gss_test")
			return
		g_builder=GoBuilder()
		g_builder.initEnv(False,"",self.window.active_view(),n_console_view)
		w_builders[wid]=g_builder
		g_builder.run()