A 'Go to definition' code browser macro. (Open_Selected_Class.bsh v1.3 by Steve Ewart)
Submitted by Wednesday, 12 May, 2004 - 20:08
on
Highlight a class name, run the macro and it will automatically open the source for that class.
Similar to "Go to definition" in Visual Studio. Very useful when browsing source code. Could not imagine coding Java in JEdit without this.
It can access many different source paths; your projects source, JDK source, etc. Just modify the 'searchPath' at the top of the macro to reflect where your JDK source code (or any source code) is located.
Source code for the highlighted class will be opened if:
The cursor is on a class name in any part of the file AND
there is a import for the class OR
there is a wildcard import containing the class OR
the class is in the current package (current directory) OR
the class is in the java.lang source directory (searchPath must be set)
the class is in a different project than current project (searchPath must be set)
The cursor is on a line with an import statement
A fully qualified class is highlighted (not necessarily an import statement)
Limitations:
It cannot open a file if the package cannot be appended to any part of the current file's directory structure.
It only works with java files, other languages are not supported.
Will only find (scroll to) inner classes if it is in an import.
Updated on 02/03/2007 - 23:09
Downloads: 2834