public class ConsolePlugin
extends org.gjt.sp.jedit.EditPlugin
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CMD_PATH |
static java.lang.String |
MENU |
static int |
NO_ERROR
Return value of
#parseLine() if the text does not match a
known error pattern. |
Constructor and Description |
---|
ConsolePlugin() |
Modifier and Type | Method and Description |
---|---|
static void |
compile(org.gjt.sp.jedit.View view,
org.gjt.sp.jedit.Buffer buffer) |
static void |
compileProject(org.gjt.sp.jedit.View view) |
static java.lang.String |
expandSystemShellVariables(org.gjt.sp.jedit.View view,
java.lang.String text)
Expands embedded environment variables in the same manner as the
system shell.
|
static org.gjt.sp.jedit.ActionSet |
getAllCommands() |
static java.lang.String |
getClassName(org.gjt.sp.jedit.Buffer buffer)
Returns the name of the specified buffer without the extension,
appended to the buffer's package name.
|
static org.gjt.sp.jedit.EditAction[] |
getCommandoCommands() |
static Console |
getConsole(org.gjt.sp.jedit.View v) |
static java.lang.String |
getConsoleSettingsDirectory() |
static java.lang.String |
getPackageName(org.gjt.sp.jedit.Buffer buffer)
A utility method that returns the name of the package containing the
current buffer.
|
static java.lang.String |
getPackageRoot(org.gjt.sp.jedit.Buffer buffer)
Returns the directory containing the root of the package of the
current buffer.
|
static org.gjt.sp.jedit.ActionSet |
getShellSwitchActions() |
static org.gjt.sp.jedit.EditAction[] |
getSwitchActions() |
static SystemShell |
getSystemShell() |
static java.lang.String |
getSystemShellVariableValue(org.gjt.sp.jedit.View view,
java.lang.String var)
Returns the value of the specified system shell environment variable.
|
static java.lang.String |
getUserCommandDirectory() |
void |
handlePluginUpdate(org.gjt.sp.jedit.msg.PluginUpdate msg) |
void |
handleViewUpdate(org.gjt.sp.jedit.msg.ViewUpdate vmsg) |
static int |
parseLine(org.gjt.sp.jedit.View view,
java.lang.String text,
java.lang.String directory,
errorlist.DefaultErrorSource errorSource)
parseLine()
Publicly documented class for parsing output of user defined
programs through the system shell error parser.
|
static void |
rescanCommands()
Dynamicly generates two ActionSets, one for Commando commands,
and one for Shells.
|
static void |
run(org.gjt.sp.jedit.View view,
org.gjt.sp.jedit.Buffer buffer) |
static void |
runProject(org.gjt.sp.jedit.View view) |
static void |
scanDirectory(java.lang.String directory)
Given a filename, performs translations so that it's a command name
|
static void |
scanJarFile() |
static void |
setSystemShellVariableValue(java.lang.String var,
java.lang.String value)
Sets the value of the specified system shell environment variable.
|
void |
start() |
void |
stop() |
public static final java.lang.String MENU
public static final java.lang.String CMD_PATH
public static final int NO_ERROR
#parseLine()
if the text does not match a
known error pattern.public static SystemShell getSystemShell()
public static org.gjt.sp.jedit.ActionSet getShellSwitchActions()
public static org.gjt.sp.jedit.ActionSet getAllCommands()
public void start()
start
in class org.gjt.sp.jedit.EditPlugin
public static int parseLine(org.gjt.sp.jedit.View view, java.lang.String text, java.lang.String directory, errorlist.DefaultErrorSource errorSource)
ErrorSource.ERROR
,
Although it is possible derived ErrorSources will return custom error codes.
public void stop()
stop
in class org.gjt.sp.jedit.EditPlugin
public void handleViewUpdate(org.gjt.sp.jedit.msg.ViewUpdate vmsg)
public void handlePluginUpdate(org.gjt.sp.jedit.msg.PluginUpdate msg)
public static java.lang.String getConsoleSettingsDirectory()
public static void scanDirectory(java.lang.String directory)
public static void scanJarFile()
public static void rescanCommands()
public static org.gjt.sp.jedit.EditAction[] getSwitchActions()
public static org.gjt.sp.jedit.EditAction[] getCommandoCommands()
public static void compile(org.gjt.sp.jedit.View view, org.gjt.sp.jedit.Buffer buffer)
public static Console getConsole(org.gjt.sp.jedit.View v)
public static void run(org.gjt.sp.jedit.View view, org.gjt.sp.jedit.Buffer buffer)
public static void compileProject(org.gjt.sp.jedit.View view)
public static void runProject(org.gjt.sp.jedit.View view)
public static java.lang.String getPackageName(org.gjt.sp.jedit.Buffer buffer)
buffer
- The bufferpublic static java.lang.String getClassName(org.gjt.sp.jedit.Buffer buffer)
buffer
- The bufferpublic static java.lang.String getPackageRoot(org.gjt.sp.jedit.Buffer buffer)
/home/slava/Stuff/example/Example.java
and contains a
package example
statement, this method will return
/home/slava/Stuff
.buffer
- The bufferpublic static java.lang.String expandSystemShellVariables(org.gjt.sp.jedit.View view, java.lang.String text)
view
- The viewtext
- The string to expandpublic static java.lang.String getSystemShellVariableValue(org.gjt.sp.jedit.View view, java.lang.String var)
view
- The viewvar
- The variable namepublic static void setSystemShellVariableValue(java.lang.String var, java.lang.String value)
var
- The variable namevalue
- The valuepublic static java.lang.String getUserCommandDirectory()