eric7/JediInterface/JediServer.py

branch
eric7
changeset 8606
dd9bf9841c50
parent 8593
1d66b6af60ed
child 8666
3a62b4009df9
equal deleted inserted replaced
8605:43bd6ec9198f 8606:dd9bf9841c50
377 euuid = result["Uuid"] 377 euuid = result["Uuid"]
378 if "Error" not in result: 378 if "Error" not in result:
379 # ignore errors silently 379 # ignore errors silently
380 location = result["GotoDefinitionDict"] 380 location = result["GotoDefinitionDict"]
381 if location: 381 if location:
382 try:
383 editor = self.__editors[euuid]
384 except KeyError:
385 editor = None
386
387 if (
388 editor is not None and
389 editor.getFileName() == location["ModulePath"] and
390 editor.getCursorPosition()[0] + 1 == location["Line"]
391 ):
392 # this was a click onto the definition line
393 # -> get references
394 idString = self.__idString(editor)
395 filename, line, index, source = self.__prepareData(editor)
396 self.sendJson("gotoReferences", {
397 "FileName": filename,
398 "Source": source,
399 "Line": line,
400 "Index": index,
401 "Uuid": euuid,
402 }, idString=idString)
403 return
404
405 self.__vm.openSourceFile(location["ModulePath"], 382 self.__vm.openSourceFile(location["ModulePath"],
406 location["Line"], 383 location["Line"],
407 addNext=True) 384 addNext=True)
408 else: 385 else:
409 ericApp().getObject("UserInterface").statusBar().showMessage( 386 ericApp().getObject("UserInterface").statusBar().showMessage(

eric ide

mercurial