RefactoringRope/CodeAssistServer.py

branch
eric7
changeset 368
c206d08c28e7
parent 365
f740b50380df
child 370
9d246420f284
equal deleted inserted replaced
367:b2bda20cdd23 368:c206d08c28e7
368 368
369 idString = self.__idString(editor) 369 idString = self.__idString(editor)
370 370
371 if not idString: 371 if not idString:
372 language = editor.getLanguage() 372 language = editor.getLanguage()
373 if Preferences.getDocuViewer("ShowInfoAsRichText"): 373 warning = self.tr(
374 warning = self.tr( 374 "Language <b>{0}</b> is not supported."
375 "Language <b>{0}</b> is not supported." 375 ).format(language)
376 ).format(language)
377 else:
378 warning = self.tr(
379 "Language '{0}' is not supported."
380 ).format(language)
381 self.__documentationViewer.documentationReady( 376 self.__documentationViewer.documentationReady(
382 warning, isWarning=True) 377 warning, isWarning=True)
383 return 378 return
384 379
385 filename = editor.getFileName() 380 filename = editor.getFileName()
416 if "Error" not in result: 411 if "Error" not in result:
417 documentationDict = result["DocumentationDict"] 412 documentationDict = result["DocumentationDict"]
418 if documentationDict: 413 if documentationDict:
419 if "module" in documentationDict: 414 if "module" in documentationDict:
420 if documentationDict["module"]: 415 if documentationDict["module"]:
421 if Preferences.getDocuViewer("ShowInfoAsRichText"): 416 documentationDict["note"] = self.tr(
422 documentationDict["note"] = self.tr( 417 "Present in <i>{0}</i> module"
423 "Present in <i>{0}</i> module" 418 ).format(documentationDict["module"])
424 ).format(documentationDict["module"])
425 else:
426 documentationDict["note"] = self.tr(
427 "Present in '{0}' module"
428 ).format(documentationDict["module"])
429 del documentationDict["module"] 419 del documentationDict["module"]
430 420
431 if "typ" in documentationDict: 421 if "typ" in documentationDict:
432 if documentationDict["typ"] not in self.__typeMapping: 422 if documentationDict["typ"] not in self.__typeMapping:
433 del documentationDict["typ"] 423 del documentationDict["typ"]

eric ide

mercurial