Implement ctrl + click on an attribute or custom element. When you hover over any element reference or attribute, the plugin will fetch the corresponding sourceRange. Once the user ctrl + clicks, the editor will jump to the corresponding file and line + column.
To make this clean, I refactored out the mouse move listener logic of TooltipManager and extracted an abstract class. This is then also used by the DefinitionFinder.
TODO:
[ ] Currently it breaks when a file has been opened. If you open example_project/index.html, refresh Atom, ctrl + click on vanilla-elem, then you jump to vanilla.js. However, after that it breaks and does not work anymore. What happens is that the reported sourceRange by getDefinitionForFeatureAtPosition is empty. I am not sure if this is a bug in the editor-service or a mis-use of the function.
Implement ctrl + click on an attribute or custom element. When you hover over any element reference or attribute, the plugin will fetch the corresponding sourceRange. Once the user ctrl + clicks, the editor will jump to the corresponding file and line + column.
To make this clean, I refactored out the mouse move listener logic of
TooltipManager
and extracted an abstract class. This is then also used by theDefinitionFinder
.TODO:
[ ] Currently it breaks when a file has been opened. If you open
example_project/index.html
, refresh Atom, ctrl + click onvanilla-elem
, then you jump tovanilla.js
. However, after that it breaks and does not work anymore. What happens is that the reportedsourceRange
bygetDefinitionForFeatureAtPosition
is empty. I am not sure if this is a bug in theeditor-service
or a mis-use of the function.Fixes #17 Fixes #14