aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralexwl <alexey.a.kiryushin@gmail.com>2018-10-05 00:31:50 +0300
committeralexwl <alexey.a.kiryushin@gmail.com>2018-10-05 00:31:50 +0300
commitd2b1a4201985a4ed35aed49bcff46b7d4d75d4d3 (patch)
treeb263acd1f7ac78d54826db2cbc5eb5e30a888a6f
parentcf2c56c7061b7ed40fdd3b40a352ddb9c9b7371f (diff)
Clicking on an external identifier at definition site opens 'find references'
-rw-r--r--javascript/app/components/haskell-module.js23
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) {