コード例 #1
0
    def load_project(self, folderStructure, folder):
        if not folder:
            return

        self.remove_loading_icon(folder)

        ninjaide = IDE.get_service('ide')
        project = ninjaide.get_project(folder)
        item = ProjectTree(self, project)
        item.isFolder = True
        item.setToolTip(0, folder)
        item.setIcon(0, QIcon(resources.IMAGES['tree-app']))
        self._projects[folder] = item
        if folderStructure[folder][1] is not None:
            folderStructure[folder][1].sort()
        self._load_folder(folderStructure, folder, item)
        item.setExpanded(True)
        if len(self._projects) == 1:
            self.set_default_project(item)
        if self.currentItem() is None:
            item.setSelected(True)
            self.setCurrentItem(item)
        self._fileWatcher.add_watch(folder)
        completion_daemon.add_project_folder(folder)
        self.sortItems(0, Qt.AscendingOrder)
コード例 #2
0
    def load_project(self, folderStructure, folder):
        if not folder:
            return

        self.remove_loading_icon(folder)

        ninjaide = IDE.get_service('ide')
        project = ninjaide.get_project(folder)
        item = ProjectTree(self, project)
        item.isFolder = True
        item.setToolTip(0, folder)
        item.setIcon(0, QIcon(":img/tree-app"))
        self._projects[folder] = item
        if folderStructure[folder][1] is not None:
            folderStructure[folder][1].sort()
        self._load_folder(folderStructure, folder, item)
        item.setExpanded(True)
        if len(self._projects) == 1:
            self.set_default_project(item)
        if self.currentItem() is None:
            item.setSelected(True)
            self.setCurrentItem(item)
        self._fileWatcher.add_watch(folder)
        completion_daemon.add_project_folder(folder)
        self.sortItems(0, Qt.AscendingOrder)
コード例 #3
0
    def load_project(self, folderStructure, folder):
        if not folder:
            return

        self.remove_loading_icon(folder)

        name = file_manager.get_basename(folder)
        item = ProjectTree(self, name, folder)
        item.isFolder = True
        item.setToolTip(0, name)
        item.setIcon(0, QIcon(resources.IMAGES['tree-app']))
        self._projects[folder] = item
        if folderStructure[folder][1] is not None:
            folderStructure[folder][1].sort()
        self._load_folder(folderStructure, folder, item)
        item.setExpanded(True)
        if len(self._projects) == 1:
            self.set_default_project(item)
        if self.currentItem() is None:
            item.setSelected(True)
            self.setCurrentItem(item)
        self._fileWatcher.add_watch(folder)
        completion_daemon.add_project_folder(folder)
コード例 #4
0
    def load_project(self, folderStructure, folder):
        if not folder:
            return

        self.remove_loading_icon(folder)

        name = file_manager.get_basename(folder)
        item = ProjectTree(self, name, folder)
        item.isFolder = True
        item.setToolTip(0, name)
        item.setIcon(0, QIcon(resources.IMAGES['tree-app']))
        self._projects[folder] = item
        if folderStructure[folder][1] is not None:
            folderStructure[folder][1].sort()
        self._load_folder(folderStructure, folder, item)
        item.setExpanded(True)
        if len(self._projects) == 1:
            self.set_default_project(item)
        if self.currentItem() is None:
            item.setSelected(True)
            self.setCurrentItem(item)
        self._fileWatcher.add_watch(folder)
        completion_daemon.add_project_folder(folder)
コード例 #5
0
 def update_paths(self):
     for path in self.related_projects:
         completion_daemon.add_project_folder(path)
コード例 #6
0
 def update_paths(self):
     for path in self.related_projects:
         completion_daemon.add_project_folder(path)