Copyright © 1999, 2005 Slava Pestov
Copyright © 2005, 2007 Alan Ezust
Legal Notice
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no "Invariant Sections", "Front-Cover Texts" or "Back-Cover Texts", each as defined in the license. A copy of the license can be found in the file COPYING.DOC.txt
included with jEdit.
Table of Contents
The Console plugin has four main functions:
Running external programs and commands.
Parsing the output of external programs for errors in a variety of formats, and reporting those errors using the ErrorList plugin.
The Commando feature provides graphical front-ends, specified using an XML file, to command-line tools.
Providing an extensible framework for other plugins that need to display streamed output.
Table of Contents
Console has an optional dependency on ProjectViewer. What this means is that it has some extra features which you can see if you have also installed ProjectViewer plugin. In particular they are:
The ability to listen to node change events from the projectviewer and make changes to the System shell's current directory.
The ability to query the ProjectViewer for the "current root directory" to run build commands from. This is used by the Console commandos for "ant", "make", and "qmake", and perhaps others[1].
By selecting Plugin Options - Console - General
, you will notice a number of options. It is recommended you browse through them to get a full idea of what Console (and your other plugins) can do.
Shell Prefix - This string is inserted before the command you type whenever a command is executed. Console itself does parse and preprocess your commands in its own way, but you have the option of having the commands subsequently evaluated by your native command line shell, which will in turn execute your command.
Console can choose a sensible os-specific shell prefix for you, by setting it to osdefault
. If this field is blank, or if none
is used, Console will execute commands directly (without a prefix).
I prefer using a native shell for its functions, aliases, and redirection, but you can try different values here to see which works best for you.
In addition, if you like to use a different shell from the OS-default (4NT, or cygwin's bash), you can add it to this list and see if it works.
Merge stdout and stderr - this option will only affect users of "make", where Console needs to merge the streams in order to resolve pathnames of files of errors inbetween "make entering..leaving" messages.
Subshell extra PATH - This option prepends directories to the environment before spawning subprocesses. If you want your jedit console to be able to find some files in the path, add those directories here.
Character Encoding - If you want to display characters in a different language, change the encoding here.
This option dialog allows you fine grained control over Console's error parsing capabilities.
Each line of output that is generated by a program that is run in the Console System
(and ssh
) shells is checked against a number of error patterns to determine if the line is part of an error message. If the error message is found, pieces of information are extracted from it to get the line number and filename. This information is in turn fed into Error List to give you a convenient way to send the editor to the location of an error message.
Each error pattern is a set of regular expressions. To edit, test, add, or remove error patterns from Console's output parsing module, you can select this option dialog. Keep in mind, you must "test/commit" each error pattern before clicking 'ok'. This helps avoid accidentally committing invalid regular expressions that may cause parse errors.
Since many of the error patterns are similar, it is possible that one of the existing patterns is getting triggered before Console sees the one you are developing. For this reason, it is suggested you remove or disable the error patterns you are not using, and place the error patterns for the tools you use most often at the top of the list.
[1] If you wish to use these commando buttons without the projectviewer, right click on the commando buttons, "customize" and edit the XML file, removing the lines that refer to projectviewer.
Plugins -> Console -> Console displays the console window. This window is floating by default, but can be made to dock into the view in the Docking pane of the Global Options dialog box.
The console window consists of a popup for choosing the current shell, a series of icon buttons, and a shell input/output area that occupies the remaining space of the window.
The Console plugin allows arbitrary shells to be plugged in; one shell included with the plugin is called the "System" shell and it runs external programs and commands; another built-in shell is the "BeanShell" shell, which runs commands in jEdit's BeanShell interpreter. Some plugins add their own shells; for example, the SshConsole plugin adds a shell for running shell commands remotely over ssh. without leaving jEdit.
Each button shows a tooltip if the mouse pointer is held over it long enough. Here is a description of each button:
Run last command - runs the most recently entered command.
Run - runs the currently-entered command. This has the same effect as pressing Enter in the text field.
Run to buffer - runs the currently-entered command, but shows the output in a new buffer, instead of in the console window. This has the same effect as pressing Ctrl-Enter from the text field.
Stop - stops the currently running process, if any.
Clear - clears the console window's output area.
A quick way to switch between shells from the keyboard is by entering the shell name prefixed with ":". For example, ":BeanShell" or ":System". In addition, each shell has its own toggle and switch shortcut defined from Global Options - Shortcuts - Plugin: Console - Shell Switchers .
Table of Contents
This section assumes at least basic familiarity with the command-line interpreter of a Unix, Windows or similar operating system.
As with most other command lines, spaces are used to separate
command-line parameters to programs. If a string containing
spaces needs to be passed as a single parameter, it should be enclosed with
double quotes ("
), for example:
javac "C:\Source Code\TestServlet.java"
Not all commands result in an external process being spawned; the system shell supports "built-ins", which are handled by the Console plugin itself. Built-ins are prefixed with "%" to distinguish them from external commands.
Currently selected text is passed to the program on standard input. In conjunction with the Run to buffer button, this allows quick filtering of buffer text using shell tools.
Pressing Tab in the console's command input field will attempt to complete the filename or command before the caret. If there is more than one possible completion, they will be listed in the output area.
Processes that read from standard input might work. You can press Control-D to send an end-of-file. Note that since the plugin does not provide a pseudo-terminal, so some programs, such as shells that use getline() or curses(), might not behave properly inside a console window.
Each line of output produced by an external program is fed through several
successive ErrorMatcher
objects. Each
ErrorMatcher
corresponds to a different style of error messages, and holds
onto an three regular expressions - for
errors, warnings, and extra lines.
If the output of a line matches the error pattern, then file name, line number and error message are extracted from it; if not, the line is then optionally matched against another regular expression to determine if it is a warning.
If an error pattern specifies a filename of "$f", the current buffer's path is used; otherwise, the filename is resolved relative to the current directory.
It is also possible to specify an "extra" regular expression, against which lines subsequent to an error are checked and added to the error message if they match. This can be used to handle compilers which produce compiler errors and warnings that span several lines.
Parsed error and warning messages are shown in the Plugins>Error List>Error List window; this window is used to display errors from several other plugins as well.
The Console plugin includes error patterns that match errors produced by the following tools:
Generic errors matching the following format, produced by many tools, including javac and gcc:
file
:line
:message
Generic errors matching the so called "Emacs" format:
file
:start line
:end line
:start column
:end column
:message
The jikes Java compiler will produce errors in this form if given if the +E command-line option. Otherwise, it will output errors in a non-standard format which cannot be parsed by the Console plugin.
Errors output by the javac compiler found in Java 2 version 1.3 and later. Earlier versions are also supported, because they output errors in the generic format documented above.
Errors output by the javac compiler when it is being run from the Ant project build tool.
Microsoft Visual C++ and Microsoft .Net compiler errors.
Perl errors.
Errors output by the Jade and OpenJade document generation tools.
Error patterns can be customized in the Console>Error Patterns pane of the Plugin Options dialog box; you should familiarize yourself with regular expressions first, the syntax of which is documented in the jEdit user's guide.
To change the current working directory, simply enter its name, as if you were going to execute a command. Relative paths are resolved automatically.
The following system shell built-ins relate to the current working directory:
pwd - prints the current working directory. Note that unlike other built-ins, this one is not prefixed with "%" for convenience and consistency with other command lines.
cd directory
:
does the same thing as just entering
directory
.
- or cd -: goes to the directory that was current before this one.
%pushd [newDir] : pushes the current directory, and optionally changes to newDir
.
%popd: sets the current working directory to the one stored at the top of the directory stack, then removes that entry from the stack.
%dirstack: lists all directories in the directory stack.
Each console window has an associated "foreground process"; output produced by the foreground process is shown in that console window. Starting a new process while one is already running in the foreground will terminate the existing process.
The %kill built-in can also be used to terminate the currently running foreground process. Clicking the Stop button in the console window has the same effect.
A process can be started in the "background" by adding "&" to the end of its command line. After a process is started in the background, it continues running until it exits. Output is not shown in the console window, and starting other processes has no effect on already-running background processes.
Pressing Control-Z detaches the foreground process. In the System shell, the process continues running in the background, and no longer shows output in the console, which is not very *nix-like, but oh well.
When running on Unix and Windows NT/2000/XP, the system shell lets you access and change operating system-specific environment variables. On other systems, you can define and use variables, but they are console-specific.
To accommodate both Windows and Unix users, three forms of variable syntax are supported by the system shell:
%
name
%
$
name
${
name
}
The following variables are defined under all circumstances, independent of operating system-specific environment variables being available or not:
${c}
- if the current buffer is a Java file,
the current buffer's fully qualified class name, including the package (if the
buffer contains a package
statement).
${d}
- the current buffer's directory.
${f}
- the current buffer's path name.
${n}
- the current buffer's name.
${BROWSER_DIR}
- the current directory
displayed in the file system browser, or an empty string if the file system
browser is not visible.
${JEDIT_HOME}
- the full path of the
directory where jEdit is installed.
${JEDIT_SETTINGS}
- the full path of the
jEdit settings directory.
${PKG}
- if the current buffer is a Java file,
the current buffer's package name (or if the
buffer doesn't contain a package
statement, an empty
string).
${PWD}
- the current working directory.
${ROOT}
- the package root of the current
buffer. For example, if the current buffer's fully qualified class name is
org.gjt.sp.jedit.jEdit
and it is contained in the
/home/slava/jEdit/org/gjt/sp/jedit/
directory, this will
return /home/slava/jEdit/
.
~
- this is not a "variable"
per-se, and it is specified using a different syntax, but it makes sense to
mention it here.
It expands to the full path of the user's home directory.
The following system shell built-ins deal with environment variables:
%env: prints a list of all environment variables, excluding the dynamic ones documented above.
%set name
value
: sets the value of the specified
environment variable. Note that if the desired value contains whitespace,
you will need to quote it, otherwise it will be treated as several
arguments.
%unset name
:
clears the value of the specified
environment variable.
To insert a "$" or "%" literally in the command string, you can write "$$" and "%%".
A few system shell built-ins invoke jEdit features:
%browse
[-n|--new-window]
directory
:
opens the specified directory in jEdit's file system browser. If
-n or --new-window is specified,
opens a new floating instance of the file system browser.
%edit files ...
:
opens the specified files in jEdit.
%run scripts ...
:
runs the specified script files. You can run BeanShell scripts, or any script
type supported by an installed plugin (for example you can run Python scripts
if JythonInterpreter is installed).
One of jEdit's best kept secrets is the interactive Console BeanShell, which provides a command line interface into the current running JVM, allowing you to inspect or invoke methods on objects in memory, or create instances of any class loaded in the JVM. This makes the Console BeanShell a powerful debugging tool for jEdit or plugin development.
There are many predefined variables you can use from this shell. Be sure to check jEdit's user guide - Writing Macros - Macro Basics - BeanShell Commands
for more details.
Table of Contents
As mentioned previously, the Commando feature creates graphical front-ends to command-line tools from XML files.
Commando XML files are stored in two locations:
A few are stored in the Console.jar
itself.
User-specific commando files are loaded from the
console/commando
subdirectory of the jEdit
settings directory.
You can find out the location of the settings directory by entering the following command in the system shell of the console window:
%echo ${JEDIT_SETTINGS}
Plugins>Console>Rescan Commando Directory should be called after files are added or removed in the user-specific commando directory.
Plugins>Console>Browse Commando Directory opens the user-specific commando directory in jEdit's file system browser.
Plugins > Console > Commando displays the commando window. A menu item for each known commando file is also shown in the Plugins > Console > Commands menu; invoking one of these menu items opens the Commando window with that commando file pre-selected.
The commando tool bar, which can be enabled in the Console>General pane of the Plugin Options dialog box, has one button for each commando file. Clicking a button opens the commando window for that file.
By right-clicking on the commando button, you can Hide or Customize it.
If you select customize, the xml file will be opened into your current editor. If it's the first time you customized the button, and it was one of the default commandos from from inside the Console.jar, then the file will be copied from the jar into your user settings ${JEDIT_SETTINGS}/console/commando/
directory. Subsequent times, it will just edit that file.
At this point, if you want to define a new commando (cmake
, for example), just "save as" cmake.xml
, and then select Regen Dynamic Menus.
If you wish to un-hide buttons that are hidden, you can bring them back from Plugin Options > Console > Toolbar Options pane.
The commando window consists of a combo box for selecting a commando file, and two tabs; the first contains GUI controls for specifying command-line settings, the second shows the resulting command line (or command lines, if the commando file defines more than one command to be run).
Currently, settings specified in the commando window are remembered for the duration of the current jEdit session. In the future, integration with a project management plugin will be provided, for specifying command line tool settings on a per-project basis.
One you have configured the necessary settings, click OK to run each command specified in the commando file in turn. Most commando files will only specify one command to run.
Some commands will
be executed automatically, others will ask for confirmation; if a command
fails, you will always be asked for confirmation before running the next one,
no matter what. Some commando files, such as the diff
file included with the Console plugin, show their output in a new buffer,
rather than the console window.
Commando files are written in XML. A commando file must have a certain preamble, along with a root element:
<?xml version="1.0"?> <!DOCTYPE COMMANDO SYSTEM "commando.dtd"> <COMMANDO> ... </COMMANDO>
Each command file must define one and only one
UI
element inside the
COMMANDO
element. The UI
element
does not have any defined attributes.
Each child element of the UI
element except for the
CAPTION
element defines a user interface control, and
supports the following attributes:
LABEL
- the control's caption. This
attribute is required.
VARNAME
- the value entered by the user
will be stored in the BeanShell variable with this name. This attribute
is required.
DEFAULT
- for specifying the default value
literally.
EVAL
- for specifying the default value
to be the result of evaluating this BeanShell script.
Note that only one of
DEFAULT
and EVAL
should be
specified.
A CAPTION
element adds a labeled box to the commando panel
that other UI elements can be added to.
It must be placed inside the
UI
element. The only defined attribute is
LABEL
. It is required.
Any UI control can be placed inside the CAPTION
element.
Here is an example of the CAPTION
element:
<CAPTION LABEL="File specification"> <ENTRY LABEL="Original file" VARNAME="from" EVAL="buffer.getPath() + '~'" /> <ENTRY LABEL="Changed file" VARNAME="to" EVAL="buffer.getPath()" /> <TOGGLE LABEL="Recursively compare directories" VARNAME="recursive" /> <ENTRY LABEL="Ignore files regexp" VARNAME="ignore" /> </CAPTION>
A CHOICE
element adds a combo box to the commando panel.
It must be placed inside the
UI
element.
Possible options are specified in OPTION
elements
inside the CHOICE
element. Here is an example
CHOICE
element:
<CHOICE LABEL="Output format" VARNAME="output" DEFAULT="unified"> <OPTION LABEL="Brief" VALUE="brief" /> <OPTION LABEL="Context" VALUE="context" /> <OPTION LABEL="ED script" VALUE="ed" /> <OPTION LABEL="RCS" VALUE="rcs" /> <OPTION LABEL="Side by side" VALUE="sideBySide" /> <OPTION LABEL="Unified" VALUE="unified" /> </CHOICE>
A DIR_ENTRY
element adds a text field with a button on the
right for displaying a directory chooser dialog. This dialog lets you pick a
directory,
then inserts the directory's full path in the text field.
Here is an example DIR_ENTRY
element:
<DIR_ENTRY LABEL="Output directory" VARNAME="output" />
An ENTRY
element adds a text field to the commando panel.
It must be placed inside the
UI
element.
Here is an example ENTRY
element:
<ENTRY LABEL="File name" VARNAME="file" EVAL="buffer.getPath()" />
A FILE_ENTRY
element adds a text field with a button on the
right for displaying a file chooser dialog. This dialog lets you pick a file,
then inserts the file's full path in the text field.
Here is an example FILE_ENTRY
element:
<FILE_ENTRY LABEL="Source file" VARNAME="source" />
A LONG_ENTRY
element adds a multiple line text area
to the commando panel.
It must be placed inside the
UI
element.
Here is an example LONG_ENTRY
element:
<LONG_ENTRY LABEL="Comments" VARNAME="comments" />
A TOGGLE
element adds a check box to the commando panel.
It must be placed inside the
UI
element.
Here is an example TOGGLE
element:
<TOGGLE LABEL="Ignore case" VARNAME="ignoreCase" />
A TOGGLE_ENTRY
element adds a text field with a
check box to the commando panel. Toggling the check box enables and disables
the text field.
It must be placed inside the
UI
element. Note that the text field's value is stored in
the variable named by the VARNAME
attribute, and the toggle
state is stored in the variable with that name suffixed with
Toggle
. For example, if VARNAME
is
path
then the variables path
and
pathToggle
will be defined.
Here is an example TOGGLE_ENTRY
element:
<TOGGLE_ENTRY LABEL="Additional file" VARNAME="ignoreCase" EVAL="buffer.getPath()"/>
The COMMANDS
element must be contained in the
root COMMANDO
element.
One or more COMMAND
elements can be defined inside the
COMMANDS
element. Each COMMAND
element
defines a command to execute. The following attributes are supported:
CONFIRM
- Of "TRUE", a
confirmation dialog will be shown before running this command.
SHELL
- The name of the shell to
run this command in.
TO_BUFFER
- If "TRUE", the command output
will be shown in a new buffer.
BUFFER_MODE
- If TO_BUFFER
is "TRUE", this parameter can be used to specify the edit mode
of the new buffer. The default value is "text".
A BeanShell script placed between the start and end COMMAND
tags should construct a command line using the values of the variables set
by the UI controls. The final command line should be returned by the
last statement in the script.
Here is an example COMMAND
element:
<COMMAND CONFIRM="FALSE" SHELL="System"> buf = new StringBuffer("jmk"); if(!makefile.equals("")) { buf.append(" -f \""); buf.append(makefile); buf.append('"'); } if(!targets.equals("")) { buf.append(' '); buf.append(targets); } if(debug) buf.append(" -d"); if(norun) buf.append(" -n"); if(output.equals("awt")) buf.append(" -w"); if(output.equals("swing")) buf.append(" -s"); // return value buf; </COMMAND>
Plugins>Console>Compile Current Buffer opens a mode-specific commando that should invoke a compiler suitable for compiling the current buffer.
Plugins>Console>Run Current Buffer opens a mode-specific commando that should invoke an interpreter suitable for running the current buffer.
Commandos can be associated with edit modes in the Console>Compile & Run pane of the Plugin Options dialog box.
The Console plugin defines three BeanShell convenience methods that can be called from macros:
void runCommandInConsole
( | view, | |
view, | ||
shell, | ||
command) ; |
Runs command
in the shell named shell
.
Will open a console window if one is not already open.
void runCommandToBuffer
( | view, | |
view, | ||
shell, | ||
command) ; |
Runs command
in the shell named shell
,
placing the command's output in a new buffer.
Will open a console window if one is not already open.
void runInSystemShell
( | view, | |
view, | ||
command) ; |
Equivalent to calling:
runCommandInConsole(view,"System",command);
void waitForConsole
(
View view
)
;
Waits until the currently executing command finishes before returning.
void clearConsole
(
View view
)
;
Clear's the console's output area.
void getenv
(
String name
)
;
Returns the specified environment variable.
void setenv
( | name, | |
name, | ||
value) ; |
Sets the specified environment variable to a new value.
If a command is run from the console while macro recording is in progress, a call to one of these methods is recorded automatically.
When you commit via the command line versions of cvs
or svn
, the tool spawns an external editor for you to enter text with the commit log. The editor that is spawned can be specified by the VISUAL
or EDITOR
environment variables. When the editor starts, you are editing a temporary file. When the editor sub-process exits, the commit tool retrieves the temporary file's contents.
A batch file or shellscript that runs jEdit can be used as the VISUAL
editor that is called by command line programs like cvs
and svn
, even when run from inside jEdit's Console plugin. Here are some command line options that you should consider passing jEdit when it is started by another program such as cvs/svn:
-wait
- waits until the buffer is closed before allowing the spawning process to 'exit' - this way you don't have to exit the main jEdit process when you are ready to commit.
-noplugins
- if this is a new view (jedit is not already running), don't load all the plugins.
-norestore
- don't restore the previously open files.
-newplainview
- open a new window (if jEdit is already running). Some people might prefer -reuseview
here, depending on the expected behavior of your previous editor.
So in summary, if your batch file includes these options, you use it as the EDITOR
when you commit from the regular command line, or from jEdit's console, and cvs/svn will wait until you close the buffer before sending the log message and your changes to the repository.
Table of Contents
To add a shell to the console, a plugin must specify that
it requires the Console plugin, and register a
Shell implementation in the plugin's services.xml
file.
In order to give the user a helpful error message if the Console
plugin is not installed, your plugin should specify dependency properties.
If your plugin's core class is named MyPlugin
, the
corresponding dependencies might look like so:
plugin.MyPlugin.depend.0=jedit 04.02.99.00 plugin.MyPlugin.depend.2=plugin console.ConsolePlugin 4.2
Note that the current version of the Console plugin requires jEdit 4.2 final or later, so your plugin should also require at least that jEdit version. If a newer version of the Console plugin is available, you can specify higher version numbers than in the example above. However, all the API calls in this chapter are guaranteed to work with the above version, so in most cases you shouldn't worry about it.
(new to Jedit 4.2)
To make the Console plugin aware of your plugin's shell,
define a services.xml
file containing a
service element with these attributes:
class="console.Shell
"
NAME=YourPlugin
The element itself should contain BeanShell code which creates a new instance of your Shell
-derived class. Here is an example of how the SshConsole plugin registers a shell with Console:
<?xml version="1.0"?> <!DOCTYPE SERVICES SYSTEM "services.dtd"> <SERVICES> <SERVICE CLASS="console.Shell" NAME="ssh"> new console.ssh.Shell(); </SERVICE> </SERVICES>
Shell is an abstract class. It contains a constructor that takes one parameter, which is the name of the shell to display in the console window and various other places:
public Shell
(
String name
)
;
A singleton Shell
instance, shared by all View
s and Console
s is created by the Console
once at the plugin load-time, for each Shell
service found.
Most of the Shell methods have a first parameter which provides the Console
instance, to distinguish between
multiple consoles. This class defines the following abstract methods, which your shell must override:
public void printInfoMessage
( | console) ; | |
console) ; |
This method is invoked by the console when the user selects the shell in question. It should print a short informational message, outlining the main capabilities of the shell.
public void execute
( | console, | |
console, | ||
input, | ||
output, | ||
error, | ||
command) ; |
The execute()
method is called when the user enters a command. The complete command line is passed in as one string;
how it is parsed is entirely up to you.
The output
object provided is either an instance of ShellState
or a special BufferOutput
object if the user elected to have the command output go into a new buffer.
As a convention, fatal errors (for example, parse errors in shell commands) should be sent to the error
stream.
public void stop
( | console) ; | |
console) ; |
If your shell executes commands in a separate thread, this method should stop the currently running thread, if any.
public boolean waitFor
( | console) ; | |
console) ; |
This method should block until the currently running command has completed,
and return true
if the command executed successfully,
false
otherwise. If no command is currently running, it
should return the status of the most recently run command.
The Output
interface consists of the following three methods:
public void write
( | color, | |
color, | ||
msg) ; |
This method writes a string to the output instance in question. Note that not all outputs support color - those that don't just ignore the color
parameter.
public void print
( | color, | |
color, | ||
msg) ; |
This method writes a string, followed by a newline.
public void commandDone
(
void)
;
Your shell should call this when a command has finished executing. The console window's implementation of this method stops the little animation.
In your own plugin, it is normally not necessary to extend or instantiate Output
s. Normally, plugins just use the instance passed to Shell.exec()
.
The Console
maintains a shellStateMap
, a 1:1 mapping of shell names to Console.ShellState
instances. Console.ShellState
is a concrete instance of Output
which stores the Console's scrollback buffer. This is what gets passed to exec()
.
When you call console.setShell(String name)
, the shellState
for that shell is automatically created and set. If you need an Output instance for a specific shell, from another part of your plugin, you can call console.getOutput()
immediately after console.setShell()
.
The following methods in the Console
class can be used to obtain some useful default colors you can use in output:
public Color getErrorColor
(
void)
;
public Color getWarningColor
(
void)
;
public Color getInfoColor
(
void)
;
Most plugin shells will need to report compiler errors and such. To do this, you will first need to create and register an ErrorSource
;
see the ErrorList plugin documentation for details. You will also need to add the errors to the error source at some stage. There are two ways of doing this:
Manually, by having the shell check for appropriate error conditions, and add errors as necessary.
What is #2?
Version 4.3.6 Requires jEdit 4.3pre12, JDK 1.5, ErrorList 1.4, and ProjectViewer 2.1.3 (optional).
New option to remember current working directory from previous sessions (ezust)
fix bug in capture of extra line for error (1854413 - David Bernard)
Forward slashes no longer substituted and driveletters no longer prepended in arguments except when expanding completions on MS-Windows. (#185614 - k_satoda, ezust)
Subshell extra PATH works now (k_satoda - 1859034)
Version 4.3.5 Requires jEdit 4.3pre12, JDK 1.5, ErrorList 1.4, and ProjectViewer 2.1.3 (optional).
Updated for relocated beanshell package in 4.3pre12.
runCommandToBuffer() doesn't send command to buffer (1643269 - ezust)
waitForConsole(view) should work properly on *nix systems now. (k_satoda, ezust - #1698976)
alias ant ant -emacs
to get rid of adornments when running inside System shell (ezust).
Improved generic
extra line regexp - catches javac and gcc multilines better. Made #1 on list. (ezust).
(windows only) - driveletters work in Console the way they do in cmd.exe
, as change-directory shortcuts. Console keeps track of default directories for each drive, as well as the default drive for the current shell session. Also, / works as well as \ for path separators. (Alan Ezust - bug#1511941 )
Small changes to make the SshConsole plugin work (ezust).
Verison 4.3.4 Requires jEdit 4.3pre11, JDK 1.5, ErrorList 1.4, and ProjectViewer 2.1.1 (optional).
New General Option: chdir VFS node select events. Listens to new VFSPathSelected EBMessage (jEdit 4.3pre11).
Fixes to perl error pattern, and to the ErrorMatcher regex routine, to allow for partial line matches (#1764455 - Shlomy Reinstein).
ErrorPatternOptionPane buttons to add/remove/up/down error patterns work better now (#1715796 - Shlomy Reinstein).
Version 4.3.3 Requires jEdit 4.3pre7, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional)
1727037, 1726365 applied, handling error lines in StreamThread better. (k_satoda)
1700484 fixed, was not registering dynamic shortcuts on startup.
1671430 cd to project root/node needs line break
Ctrl-P and Ctrl-N select through command history (ezust).
Paste in the panel moves caret to end of input before pasting (ezust).
Version 4.3.2 Requires jEdit 4.3pre7, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional)
(1665849) PV CD to selected node no longer requires system shell to be active. (Alan Ezust)
Buffered Console output is fixed, improved performance rendering command output. (Marcelo Vanzin)
New option: Max console scrollback buffer size (Carmine Lucarelli)
Version 4.3.1 Requires jEdit 4.3pre7, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional)
Process exited message from shell command to buffer no longer ends up in buffer.
(#1630431) Typing in the consolepane when caret is not at bottom moves caret to end of document first. (Alan Ezust)
Version 4.3.0 Requires jEdit 4.3pre7, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional)
New dynamic ActionSet (Plugin: Console - Shell Switchers) generated for switching to, or toggling the Console, combined with selecting a specific shell. In other words, now you can bind a specific keyboard shortcut to "Toggle Beanshell" and another for "Show Ant Shell", etc. (Alan Ezust)
Version 4.2.6.5 Requires jEdit 4.2 final, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional)
Bug# 1223288 - no longer buffering output of subprocesses. Some interactive programs work in Console again. (Christopher Plant)
Ctrl-Enter is now the same as "run command to buffer"
Version 4.2.6.4 Requires jEdit 4.2 final, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional) (Alan Ezust)
Added option to not show welcome message.
File completion now expands ~ as the homedir.
Ctrl-U deletes what you typed.
Bugfix with runInSystemShell - selects the correct Output now.
Version 4.2.6.3 Requires jEdit 4.2 final, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional)
Improved LaTeX commando.
Fixed bug # 1480991 related to printing exit codes after a subprocess exits.
Version 4.2.6.2 Requires jEdit 4.2 final, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional)
New console prefix modes: "osdefault" and "none". Both work now, and are documented.
For bash prefix mode, fixed some quote handling bugs.
Version 4.2.6.1 Requires jEdit 4.2 final, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional) (Alan Ezust)
Improved make and ant commando buttons (They grab ProjectViewer's root dir).
Fixed *nix quoting/spacing/platform issues (1468934).
Fixed 1459562 - Console.waitFor() now works.
Added checkboxes in General Option Pane: showExitStatus and mergeStreams.
Added "none" option for shell prefix (which currently does not work).
Version 4.2.6 Requires jEdit 4.2 final, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional)
Generic error pattern handles windows pathnames now.
Improved/updated documentation.
Version 4.2.5.2 Requires jEdit 4.2 final, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional)
Bugs fixed: 1185273, 1465602, 1450389. (Ezust)
Rewrote variable substitution code. (Ezust)
Merging stdout/stderr of subprocesses is optional and works now. (Ezust)
Rewrote the StreamThread class to use StreamReader. This means that output and error parsing is faster now. (Marcello Vanzin)
Version 4.2.5.1 Requires jEdit 4.2 final, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional) (Alan Ezust)
Bugs fixed: 1460349 1459481 1459460 1454080 1449325 1448809
added informative label in ErrorOptionPane
so people Test/Commit changes to error paths.
feature request 1202051 - now users can prepend directories to the PATH
of child processes.
Version 4.2.5 Requires jEdit 4.2 final, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional)
Bugfixes, refactoring, code cleanup. (Alan Ezust)
Version 4.2.4 Requires jEdit 4.2 final, JDK 1.5, ErrorList 1.3.5, and ProjectViewer 2.1.1 (optional) (Alan Ezust)
Closing one View does not remove toolbars from all other views.
Un-broke some earlier plugin-breaking changes.
Improved Perl error pattern bug# 1195354
Version 4.2.2 Requires jEdit 4.2 final, JDK 1.5, ErrorList 1.3.5, ProjectViewer 2.1.1 (optional) (Alan Ezust)
Rewrote the Error Pattern dialog into a JPanel, embeddable in the larger OptionPane. No more popping up of dialogs for editing an error pattern.
Now it is possible to enable/disable individual error matchers with a checkbox there.
Version 4.2.1 Requires jEdit 4.2 final, ErrorList 1.3.5, and JDK 1.5. Optional: Projectviewer 2.1.0.92 (for listening to events) (Alan Ezust)
Rewrote command execution part to use the JDK 1.5
ProcessBuilder
class. This made it possible to
merge stdout
and stderr
,
which means that the output of make
, which
sends its "entering/leaving" messages to stdout, and its error
messages to stderr, can be merged into one stream for parsing.
Applied encoding patch from jedit-plugin-bugs #1245860.
Context menu on commando buttons lets you hide/customize the built-in commands with ease.
New beanshell commands bound to system shell actions: chdir to ProjectViewer root, and chdir to ProjectViewer current.
Option to bind the above actions to new ProjectViewer Events.
Console Preferences allow you to set a prefix, so you can run each command in an alternate shell (not working yet).
Version 4.2 Requires jEdit 4.2 final, JDK 1.4, and ErrorList 1.3.5
Possibility of testing regular expressions in the Plugin Options - Console - Error Patterns.
Rewrote to use java.util.Pattern
instead of gnu.regex.RE
.
Possibility of selecting which Commando buttons are shown in the toolbar.
Added some more Commando buttons (make, ant) to choose from.
Misc bugfixes - Alan Ezust
Version 4.1.2 requires jEdit 4.2final, JDK 1.4, and ErrorList 1.3.1.
Console caret color is now configurable (Justin Dieters).
Version 4.1.1 requires jEdit 4.2final and the ErrorList plugin 1.3.1.
Fixed race condition with command output to a buffer that
could result in a NullPointerException
.
Commando dialog fields are saved, as long as they do not result from a computed evaluation (for example, path names are not saved because they are computed from the current buffer's name).
Pressing Control-Z detaches the foreground process. The process continues running in the background, and no longer shows output in the console.
Version 4.1 requires jEdit 4.2final and the ErrorList plugin 1.3.1.
Minor change to EvalAction
for Factor.
Invoking %clear
in the system shell would
print the prompt twice.
Passing a path name that is not a directory to %cd
now prints an error.
If running a command caused the current shell to be changed, output would still go to the old shell.
The input history can be searched by holding down Shift while pressing Up or Down.
Error parsing and copying of text from the console was broken on Windows, due to incorrect line terminator handling.
Automatically check for files being changed on disk after a command completes.
Version 4.0.1 requires jEdit 4.2final and the ErrorList plugin 1.3.1.
Generic error pattern was broken.
Version 4.0 requires jEdit 4.2final and the ErrorList plugin 1.3.1.
The separate input field is now gone; all input is done in the console pane.
The plugin can now send standard input to processes. Press Control-D to send an end-of-file.
Unloading the Console plugin did not hide the Commando tool bar.
Console tool bar is now gone, since the console input field component no longer exists.
Fixed a minor flaw in the generic error pattern, add Python error pattern (Ollie Rutherfurd).
If an error was raised by the BeanShell, opening the Console in subsequently-created views would fail because of a rogue variable that was set in the global namespace.