diff options
author | alexwl <alexey.a.kiryushin@gmail.com> | 2018-10-05 00:31:50 +0300 |
---|---|---|
committer | alexwl <alexey.a.kiryushin@gmail.com> | 2018-10-05 00:31:50 +0300 |
commit | d2b1a4201985a4ed35aed49bcff46b7d4d75d4d3 (patch) | |
tree | b263acd1f7ac78d54826db2cbc5eb5e30a888a6f /javascript/app/components | |
parent | cf2c56c7061b7ed40fdd3b40a352ddb9c9b7371f (diff) |
Clicking on an external identifier at definition site opens 'find references'
Diffstat (limited to 'javascript/app/components')
-rw-r--r-- | javascript/app/components/haskell-module.js | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/javascript/app/components/haskell-module.js b/javascript/app/components/haskell-module.js index 8883a9c..cf750b9 100644 --- a/javascript/app/components/haskell-module.js +++ b/javascript/app/components/haskell-module.js @@ -155,16 +155,23 @@ function initializeIdentifiers (sourceCodeContainerElement,component) { currentLineNumber); } else { - if(!idOccurrenceInfo.isBinder && identifierInfo - && (event.which === 1 || event.which === 2)) { - goToDefinition(component.get('store'), - identifierInfo.locationInfo, - event.which, - currentLineNumber); + if(identifierInfo && (event.which === 1 || event.which === 2)) { + if(!idOccurrenceInfo.isBinder) { + goToDefinition(component.get('store'), + identifierInfo.locationInfo, + event.which, + currentLineNumber); + } else { + if(identifierInfo.sort === "External") { + component.get('findReferences')(component.get('packageId'), + identifierInfo.externalId, + identifierInfo.demangledOccName); + + } + } } } - } - + } identifierElement.onmouseover = () => { highlightIdentifiers(sourceCodeContainerElement,identifierElement,true); if(timer) { |