src/eric7/Graphics/ApplicationDiagramBuilder.py

branch
server
changeset 10610
bb0149571d94
parent 10596
ea35c92a3c7c
child 10704
27d21e5163b8
equal deleted inserted replaced
10605:b6f5e27daeb5 10610:bb0149571d94
183 if entry.is_dir() and os.path.exists( 183 if entry.is_dir() and os.path.exists(
184 os.path.join(entry.path, "__init__.py") 184 os.path.join(entry.path, "__init__.py")
185 ): 185 ):
186 candidates.append(entry.path) 186 candidates.append(entry.path)
187 187
188 if len(candidates) == 1: 188 if len(candidates) == 1:
189 return candidates[0] 189 return candidates[0]
190 elif len(candidates) > 1: 190 elif len(candidates) > 1:
191 root, ok = QInputDialog.getItem( 191 root, ok = QInputDialog.getItem(
192 None, 192 None,
193 self.tr("Application Diagram"), 193 self.tr("Application Diagram"),
194 self.tr("Select the application directory:"), 194 self.tr("Select the application directory:"),
195 sorted(candidates), 195 sorted(candidates),
196 0, 196 0,
197 True, 197 True,
198 ) 198 )
199 if ok: 199 if ok:
200 return root 200 return root
201 else: 201 else:
202 EricMessageBox.warning( 202 EricMessageBox.warning(
203 None, 203 None,
204 self.tr("Application Diagram"), 204 self.tr("Application Diagram"),
205 self.tr( 205 self.tr("""No application package could be detected. Aborting..."""),
206 """No application package could be detected.""" 206 )
207 """ Aborting..."""
208 ),
209 )
210 return None 207 return None
211 208
212 def buildDiagram(self): 209 def buildDiagram(self):
213 """ 210 """
214 Public method to build the packages shapes of the diagram. 211 Public method to build the packages shapes of the diagram.

eric ide

mercurial