paperwm / gnome-shell-mode

Package for developing gnome-shell extensions
GNU General Public License v2.0
27 stars 7 forks source link

Jump to module #21

Open olejorgenb opened 6 years ago

olejorgenb commented 6 years ago

Js modules have a __file__ property, so if we can evaluate the module we should be able to jump to the file (need to be told where the gnome-shell source is though)

imports.ui.main.__file__ => "resource:///org/gnome/shell/ui/main.js"

Functions unfortunately doesn't have any explicit location information, but for cases like imports.ui.main.activateWindow we could apply some heuristics to jump to to the function.