GotoFile is a jEdit plugin that lets you open a file that is in your current buffer's line of text or selection, and will also jump to the line number if also found alongside the file name. This is similar to a feature found in most IDEs where you can click hyperlinked file names in compiler error logs or stack traces, however this plugin generalizes the idea to make it more customizable so you can use it with any text file, of any size with no pre-processing overhead. If the target file is already open in another editPane, then that pane will just move its caret to the proper line. If the target file isn't open yet, then it will open it in another pane and split panes if there was only one.
A properties file is used instead of an options dialog for now. The current properties are:
buffer = true
clicks = 3
dir = /tmp
# Expand this dir tree recursively.
dir = /home/bob/src/**
# If no patterns are given, some reasonable defaults are used.
pattern = (.*):(\d+)
file = 1
line = 2
pattern = line (\d+) of file "(.*)"
file = 2
line = 1
The actual built-in default patterns support general purpose Python, Java and C++ file/line stacktrace conventions.
# Java, C++ pattern = [\W]?([\d*\w*\.*/*\-*/*~*@*#*]+):(\d+)[\W]? file = 1 line = 2 # Python pattern = "(.*)", line (\d+) file = 1 line = 2
Copy GotFile.jar file into ~/.jedit/jars or into your {jedit_install_dir}/jars.
20131025 rziemlin 1.0.1 Fixed bug where cached line numbers were used. 20131022 rziemlin 1.0.0 Initial release.