Exemplo n.º 1
0
 def run(self, type="RUN"):
     self.type = type
     self.file_name = getFileName()
     self.project = Project(self.file_name)
     if self.project.is_go():
         self.executeProject()
     elif isGoFile(self.file_name):
         self.executeFile()
     else:
         sublime.error_message("Cannot %s a non-Go file" % type.lower())
Exemplo n.º 2
0
    def run(self, type):
        self.file_name = getFileName()
        project = self.project = Project(self.file_name)
        if project.file_data is None:
            sublime.error_message("Can't read project file data")
            return
        if project.is_go():
            sublime.error_message("Your project is already a GO project")
            return

        if project.name:
            self.window.show_input_panel("Project Name: ", project.name,
                                         self.setName, None, None)
        else:
            sublime.error_message("There is no opened project to convert.\n"
                                  "Please save your project first")