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( |