Labs/Bespin/DesignDocs/Editor/GotoDeclaration
- Malte's work has got this going with 'outline' command! **
The "Go to declaration" feature is a common feature in code editors. You are often looking at code that calls a function, and you want to see the declaration of that function.
There are a couple of things that we would like this feature to do:
Version 1
The server will have an API that takes a function name (or class name?) and returns the location of the declaration (foo.js, line 33).
The client will then add to the 'goto' command and give it the semantics of more than just a file number. You should be able to 'goto myFunction' and be taken there.
Version 2
The client should then give you the ability to do this from the UI itself. Click / select a function and hit a key to do the jump.
Version 3
Have the server able to return the declaration as well as the range. This way, after a quick key, the editor can display the declaration in a little popup for quick viewing without jumping to the area