def _open_project_folder(self, folderName):
     ninjaide = IDE.get_service("ide")
     project = NProject(folderName)
     qfsm = ninjaide.filesystem.open_project(project)
     if qfsm:
         self.add_project(project)
         self.emit(SIGNAL("updateLocator()"))
Example #2
0
 def _open_project_folder(self, folderName):
     ninjaide = IDE.get_service("ide")
     project = NProject(folderName)
     qfsm = ninjaide.filesystem.open_project(project)
     if qfsm:
         self.add_project(project)
         self.emit(SIGNAL("updateLocator()"))
         self.save_recent_projects(folderName)
         main_container = IDE.get_service('main_container')
         if main_container:
             main_container.show_editor_area()
 def _open_project_folder(self, folderName):
     ninjaide = IDE.get_service("ide")
     # TODO: handle exception when .nja file is empty
     project = NProject(folderName)
     qfsm = ninjaide.filesystem.open_project(project)
     if qfsm:
         self.add_project(project)
         self.save_recent_projects(folderName)
         # FIXME: show editor area?
         if len(self.projects) > 1:
             title = "%s (%s)" % (translations.TR_TAB_PROJECTS,
                                  len(self.projects))
         else:
             title = translations.TR_TAB_PROJECTS
         self.changeTitle.emit(self, title)
 def _open_project_folder(self, folderName):
     ninjaide = IDE.get_service("ide")
     project = NProject(folderName)
     qfsm = ninjaide.filesystem.open_project(project)
     if qfsm:
         self.add_project(project)
         self.save_recent_projects(folderName)
         main_container = IDE.get_service('main_container')
         if main_container:
             main_container.show_editor_area()
         if len(self.projects) > 1:
             title = "%s (%s)" % (translations.TR_TAB_PROJECTS,
                                  len(self.projects))
         else:
             title = translations.TR_TAB_PROJECTS
         self.changeTitle.emit(self, title)
Example #5
0
    def open_project_folder(self):
        if settings.WORKSPACE:
            directory = settings.WORKSPACE
        else:
            directory = os.path.expanduser("~")

        folderName = QFileDialog.getExistingDirectory(
            self, self.tr("Open Project Directory"), directory)
        logger.debug("Choosing Foldername")
        if folderName:
            logger.debug("Opening %s" % folderName)
            ninjaide = IDE.get_service("ide")
            project = NProject(folderName)
            qfsm = ninjaide.filesystem.open_project(project)
            if qfsm:
                self.add_project(project)