- Version:
- $Id: jEdit.java 25355 2020-09-03 02:48:21Z vampire0 $
- Author:
- Slava Pestov
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
_closeBuffer
(View view, Buffer buffer) Closes the buffer, even if it has unsaved changes.static void
_closeBuffer
(View view, Buffer buffer, boolean doNotSave) Closes the buffer, even if it has unsaved changes.static Buffer
_getBuffer
(String path) Deprecated.static void
addActionSet
(ActionSet actionSet) Adds a new action set to jEdit's list of ActionSets (viewable from the shortcuts option pane).static void
addPluginJAR
(String path) Loads the plugin JAR with the specified path.static void
backupSettingsFile
(File file) Backs up the specified file in the settings directory.static void
checkBufferStatus
(View view) Checks each buffer's status on disk and shows the dialog box informing the user that buffers changed on disk, if necessary.static void
checkBufferStatus
(View view, boolean currentBuffer) Checks buffer status on disk and shows the dialog box informing the user that buffers changed on disk, if necessary.static boolean
closeAllBuffers
(View view) Closes all open buffers.static boolean
closeAllBuffers
(View view, boolean isExiting) Closes all open buffers.static void
closeBuffer
(EditPane editPane, Buffer buffer) Close a buffer.static boolean
closeBuffer
(View view, Buffer buffer) Closes a buffer.static void
Closes a view.static boolean
closeView() used by exit().static void
commitTemporary
(Buffer buffer) Adds a temporary buffer to the buffer list.static void
Exits cleanly from jEdit, prompting the user if any unsaved files should be saved first.static EditAction
Returns the specified action.static ActionContext
Returns the action context used to store editor actions.static String[]
Returns all registered action names.static ActionSet
getActionSetForAction
(String action) Returns the action set that contains the specified action.static ActionSet[]
Returns all registered action sets.static View
Returns the currently focused view.static View
Returns the internal active view, which might be null.static Mode[]
Returns an array of all installed edit modes.static boolean
getBooleanProperty
(String name) Returns the value of a boolean property.static boolean
getBooleanProperty
(String name, boolean def) Returns the value of a boolean property.static Buffer
Deprecated.static int
Returns the number of open buffers.static org.gjt.sp.jedit.manager.BufferManager
Returns the buffer managerstatic Buffer[]
Deprecated.static BufferSetManager
Returns the bufferSet manager.static String
getBuild()
Returns the internal version.static ActionSet
Returns the set of commands built into jEdit.static Color[][]
getColorMatrixProperty
(String name) Returns the value of a color matrix property.static Color[][]
getColorMatrixProperty
(String name, Color[][] def) Returns the value of a color matrix property.static Color
getColorProperty
(String name) Returns the value of a color property.static Color
getColorProperty
(String name, Color def) Returns the value of a color property.static String
Returns the current language used by jEdit.static double
getDoubleProperty
(String name, double def) static org.gjt.sp.jedit.manager.EditPaneManager
Returns the Edit Pane mangerstatic EditServer
Returns the edit server instance.static Buffer
Returns the first buffer.static View
Returns the first view.static Font
getFontProperty
(String name) Returns the value of a font property.static Font
getFontProperty
(String name, Font def) Returns the value of a font property.static InputHandler
Returns the current input handler (key binding to action mapping)static int
getIntegerProperty
(String name) Returns the value of an integer property.static int
getIntegerProperty
(String name, int def) Returns the value of an integer property.static String
Returns the directory where plugin cache files are stored.static String
Returns the jEdit install directory.static KeymapManager
static Buffer
Returns the last buffer.static View
Returns the last view.static Mode
Returns the edit mode with the specified name.static Mode[]
getModes()
static int
static String[]
Returns a list of plugin JARs pathnames that are not currently loaded by examining the user and system plugin directories.static EditPlugin
Returns the plugin with the specified class name.static EditPlugin
Returns the plugin with the specified class name.static PluginJAR
getPluginJAR
(String path) Returns the JAR with the specified path name.static PluginJAR[]
Returns an array of installed plugins.static EditPlugin[]
Returns an array of installed plugins.static Properties
Returns the properties object which contains all known jEdit properties.static String
getProperty
(String name) Fetches a property, returning null if it's not defined.static String
getProperty
(String name, Object[] args) Returns the property with the specified name.static String
getProperty
(String name, String def) Fetches a property, returning the default value if it's not defined.static jEdit.JEditPropertyManager
static String
getRegisterStatusPrompt
(String action) Returns the status prompt for the given register action.static String
Returns the path of the directory where user-specific settings are stored.static String
Returns the jEdit version as a human-readable string.static int
Returns the number of open views.static org.gjt.sp.jedit.manager.ViewManager
Returns the view managerstatic View[]
getViews()
Deprecated.static boolean
Returns true if jEdit was started with the-background
command-line switch.static boolean
Returns true if the currently running thread is the main thread.static boolean
Whether jEdit startup is over.static void
The main method of the jEdit application.static void
moveBuffer
(EditPane editPane, int oldPosition, int newPosition) Moves a buffer from a old position to a new position in the BufferSet used in an EditPane.static Buffer
Creates a new `untitled' file.static Buffer
Creates a new `untitled' file.static Buffer
Creates a new `untitled' file.static Buffer
Creates a new `untitled' file.static View
Creates a new view.static View
Creates a new view of a buffer.static View
Creates a new view of a buffer.static View
newView
(View view, Buffer buffer, View.ViewConfig config) Creates a new view.static Buffer
Opens a file.static Buffer
openFile
(EditPane editPane, String parent, String path, boolean newFile, Hashtable<String, Object> props) Opens a file.static Buffer
Opens a file.static Buffer
Opens a file.static Buffer
openFileAfterStartup
(String path) Opens a file, either immediately if the application is finished starting up, or after the first view has been created if not.static Buffer
Opens the file names specified in the argument array.static Buffer
openTemporary
(View view, String parent, String path, boolean newFile) Opens a temporary buffer.static Buffer
openTemporary
(View view, String parent, String path, boolean newFile, boolean untitled) Opens a temporary buffer.static Buffer
openTemporary
(View view, String parent, String path, boolean newFile, Hashtable<String, Object> props) Opens a temporary buffer.static Buffer
openTemporary
(View view, String parent, String path, boolean newFile, Hashtable<String, Object> props, boolean untitled) Opens a temporary buffer.static void
Reloads various settings from the properties.static void
reloadAllBuffers
(View view, boolean confirm) Reloads all open buffers.static void
Reloads all edit modes.static void
static void
removeActionSet
(ActionSet actionSet) Removes an action set from jEdit's list.static void
removePluginJAR
(PluginJAR jar, boolean exit) Unloads the given plugin JAR with the specified path.static void
resetProperty
(String name) Resets a property to its default value.static void
saveAllBuffers
(View view) Saves all open buffers.static void
saveAllBuffers
(View view, boolean confirm) Saves all open buffers.static void
Saves all user preferences to disk.static void
setBooleanProperty
(String name, boolean value) Sets a boolean property.static void
setColorMatrixProperty
(String name, Color[][] value) Sets the value of a color matrix property.static void
setColorProperty
(String name, Color value) Sets the value of a color property.static void
setDoubleProperty
(String name, double value) static void
setFontProperty
(String name, Font value) Sets the value of a font property.static void
setIntegerProperty
(String name, int value) Sets the value of an integer property.static void
setProperty
(String name, String value) Sets a property to a new value.static void
setTemporaryProperty
(String name, String value) Sets a property to a new value.static void
showMemoryDialog
(View view) Performs garbage collection and displays a dialog box showing memory status.static void
unsetProperty
(String name) Unsets (clears) a property.static void
visit
(JEditVisitor visitor) Visit the views, editpanes and textareas
-
Method Details
-
getVersion
Returns the jEdit version as a human-readable string. -
getBuild
Returns the internal version. MiscUtilities.compareStrings() can be used to compare different internal versions. -
main
The main method of the jEdit application. This should never be invoked directly.- Parameters:
args
- The command line arguments
-
getCurrentLanguage
Returns the current language used by jEdit.- Returns:
- the current language, never null
- Since:
- jEdit 5.0pre1
-
getProperties
Returns the properties object which contains all known jEdit properties. Note that as of jEdit 4.2pre10, this returns a new collection, not the existing properties instance.- Since:
- jEdit 3.1pre4
-
getProperty
Fetches a property, returning null if it's not defined.- Parameters:
name
- The property
-
getProperty
Fetches a property, returning the default value if it's not defined.- Parameters:
name
- The propertydef
- The default value
-
getProperty
Returns the property with the specified name.The elements of the
args
array are substituted into the value of the property in place of strings of the form{n}
, wheren
is an index in the array.You can find out more about this feature by reading the documentation for the
format
method of thejava.text.MessageFormat
class.- Parameters:
name
- The propertyargs
- The positional parameters
-
getBooleanProperty
Returns the value of a boolean property.- Parameters:
name
- The property
-
getBooleanProperty
Returns the value of a boolean property.- Parameters:
name
- The propertydef
- The default value
-
getIntegerProperty
Returns the value of an integer property.- Parameters:
name
- The property
-
getIntegerProperty
Returns the value of an integer property.- Parameters:
name
- The propertydef
- The default value- Since:
- jEdit 4.0pre1
-
getDoubleProperty
-
getFontProperty
Returns the value of a font property. The family is stored in thename
property, the font size is stored in thenamesize
property, and the font style is stored innamestyle
. For example, ifname
isview.gutter.font
, the properties will be namedview.gutter.font
,view.gutter.fontsize
, andview.gutter.fontstyle
.- Parameters:
name
- The property- Since:
- jEdit 4.0pre1
-
getFontProperty
Returns the value of a font property. The family is stored in thename
property, the font size is stored in thenamesize
property, and the font style is stored innamestyle
. For example, ifname
isview.gutter.font
, the properties will be namedview.gutter.font
,view.gutter.fontsize
, andview.gutter.fontstyle
.- Parameters:
name
- The propertydef
- The default value- Since:
- jEdit 4.0pre1
-
getColorProperty
Returns the value of a color property.- Parameters:
name
- The property name- Since:
- jEdit 4.0pre1
-
getColorProperty
Returns the value of a color property.- Parameters:
name
- The property namedef
- The default value- Since:
- jEdit 4.0pre1
-
setColorProperty
Sets the value of a color property.- Parameters:
name
- The property namevalue
- The value- Since:
- jEdit 4.0pre1
-
getColorMatrixProperty
Returns the value of a color matrix property.- Parameters:
name
- The property name- Since:
- jEdit 5.6
-
getColorMatrixProperty
Returns the value of a color matrix property.- Parameters:
name
- The property namedef
- The default value- Since:
- jEdit 5.6
-
setColorMatrixProperty
Sets the value of a color matrix property.- Parameters:
name
- The property namevalue
- The value- Since:
- jEdit 5.6
-
setProperty
Sets a property to a new value.- Parameters:
name
- The propertyvalue
- The new value
-
setTemporaryProperty
Sets a property to a new value. Properties set using this method are not saved to the user properties list.- Parameters:
name
- The propertyvalue
- The new value- Since:
- jEdit 2.3final
-
setBooleanProperty
Sets a boolean property.- Parameters:
name
- The propertyvalue
- The value
-
setIntegerProperty
Sets the value of an integer property.- Parameters:
name
- The propertyvalue
- The value- Since:
- jEdit 4.0pre1
-
setDoubleProperty
-
setFontProperty
Sets the value of a font property. The family is stored in thename
property, the font size is stored in thenamesize
property, and the font style is stored innamestyle
. For example, ifname
isview.gutter.font
, the properties will be namedview.gutter.font
,view.gutter.fontsize
, andview.gutter.fontstyle
.- Parameters:
name
- The propertyvalue
- The value- Since:
- jEdit 4.0pre1
-
unsetProperty
Unsets (clears) a property.- Parameters:
name
- The property
-
resetProperty
Resets a property to its default value.- Parameters:
name
- The property- Since:
- jEdit 2.5pre3
-
propertiesChanged
public static void propertiesChanged()Reloads various settings from the properties. -
getNotLoadedPluginJARs
Returns a list of plugin JARs pathnames that are not currently loaded by examining the user and system plugin directories.- Since:
- jEdit 3.2pre1
-
getPlugin
Returns the plugin with the specified class name. Only works for plugins that were loaded. -
getPlugin
Returns the plugin with the specified class name. If *loadIfNecessary
is true, the plugin will be searched for, loaded, and activated in case it has not yet been loaded.- Parameters:
name
- the classname of the main Plugin class.loadIfNecessary
- - loads plugin + dependencies if it is not loaded yet.- Since:
- jEdit 4.2pre4
-
getPlugins
Returns an array of installed plugins. -
getPluginJARs
Returns an array of installed plugins.- Since:
- jEdit 4.2pre1
-
getPluginJAR
Returns the JAR with the specified path name.- Parameters:
path
- The path name- Since:
- jEdit 4.2pre1
-
addPluginJAR
Loads the plugin JAR with the specified path. Some notes about this method:- Calling this at a time other than jEdit startup can have unpredictable results if the plugin has not been updated for the jEdit 4.2 plugin API.
- You must make sure yourself the plugin is not already loaded.
- After loading, you just make sure all the plugin's dependencies
are satisified before activating the plugin, using the
PluginJAR.checkDependencies()
method.
- Parameters:
path
- The JAR file path- Since:
- jEdit 4.2pre1
-
removePluginJAR
Unloads the given plugin JAR with the specified path. Note that calling this at a time other than jEdit shutdown can have unpredictable results if the plugin has not been updated for the jEdit 4.2 plugin API.- Parameters:
jar
- ThePluginJAR
instanceexit
- Set to true if jEdit is exiting; enables some shortcuts so the editor can close faster.- Since:
- jEdit 4.2pre1
-
getActionContext
Returns the action context used to store editor actions.- Since:
- jEdit 4.2pre1
-
addActionSet
Adds a new action set to jEdit's list of ActionSets (viewable from the shortcuts option pane). By default, each plugin has one ActionSet, but some plugins may create dynamic action sets, such as ProjectViewer and Console. These plugins must call removeActionSet() when the plugin is unloaded.- Since:
- jEdit 4.0pre1
- See Also:
-
removeActionSet
Removes an action set from jEdit's list. Plugins that add a dynamic action set must call this method at plugin unload time.- Since:
- jEdit 4.2pre1
-
getBuiltInActionSet
Returns the set of commands built into jEdit.- Since:
- jEdit 4.2pre1
-
getActionSets
Returns all registered action sets.- Returns:
- the ActionSet(s)
- Since:
- jEdit 4.0pre1
-
getAction
Returns the specified action.- Parameters:
name
- The action name
-
getActionSetForAction
Returns the action set that contains the specified action.- Parameters:
action
- The action- Since:
- jEdit 4.2pre1
-
getActionNames
Returns all registered action names. -
reloadModes
public static void reloadModes()Reloads all edit modes. User defined edit modes are loaded after global modes so that user modes supercede global modes.- Since:
- jEdit 3.2pre2
-
getMode
Returns the edit mode with the specified name.- Parameters:
name
- The edit mode
-
getModes
- Returns:
- an array of installed edit modes that have been selected in the global options. The modes in this array will be sorted by mode name.
-
getAllModes
Returns an array of all installed edit modes. The modes in this array will be sorted by mode name. -
openFiles
Opens the file names specified in the argument array. This handles +line and +marker arguments just like the command line parser.- Parameters:
parent
- The parent directoryargs
- The file names to open- Since:
- jEdit 3.2pre4
-
openFileAfterStartup
Opens a file, either immediately if the application is finished starting up, or after the first view has been created if not.- Parameters:
path
- The file path- Returns:
- the buffer if succesfully loaded immediately, or null otherwise
- Since:
- jEdit 4.5pre1
-
openFile
Opens a file. Note that as of jEdit 2.5pre1, this may return null if the buffer could not be opened.- Parameters:
view
- The view to open the file inpath
- The file path- Returns:
- the buffer, or null if jEdit was unable to load it
- Since:
- jEdit 2.4pre1
-
openFile
public static Buffer openFile(View view, String parent, String path, boolean newFile, Hashtable<String, Object> props) Opens a file. This may return null if the buffer could not be opened for some reason.- Parameters:
view
- The view to open the file in. If it is null, the file will be opened and added to the bufferSet of the current edit pane, but not selectedparent
- The parent directory of the filepath
- The path name of the filenewFile
- True if the file should not be loaded from disk be prompted if it should be reloadedprops
- Buffer-local properties to set in the buffer- Returns:
- the buffer, or null if jEdit was unable to load it
- Since:
- jEdit 3.2pre10
-
openFile
Opens a file. Note that as of jEdit 2.5pre1, this may return null if the buffer could not be opened.- Parameters:
editPane
- the EditPane to open the file in.path
- The file path- Returns:
- the buffer, or null if jEdit was unable to load it
- Since:
- jEdit 4.3pre17
-
openFile
public static Buffer openFile(EditPane editPane, String parent, String path, boolean newFile, Hashtable<String, Object> props) Opens a file. This may return null if the buffer could not be opened for some reason.- Parameters:
editPane
- the EditPane to open the file in.parent
- The parent directory of the filepath
- The path name of the filenewFile
- True if the file should not be loaded from disk be prompted if it should be reloadedprops
- Buffer-local properties to set in the buffer- Returns:
- the buffer, or null if jEdit was unable to load it
- Since:
- jEdit 4.3pre17
-
openTemporary
Opens a temporary buffer. A temporary buffer is like a normal buffer, except that an event is not fired and the buffer is not added to the buffers list.If a buffer for the given
path
was already opened in jEdit, then this instance is returned. Otherwise jEdit will not store a reference to the returned Buffer object.This method is thread-safe.
- Parameters:
view
- The view to open the file inparent
- The parent directory of the filepath
- The path name of the filenewFile
- True if the file should not be loaded from disk- Returns:
- the buffer, or null if jEdit was unable to load it
- Since:
- jEdit 3.2pre10
-
openTemporary
public static Buffer openTemporary(View view, String parent, String path, boolean newFile, boolean untitled) Opens a temporary buffer. A temporary buffer is like a normal buffer, except that an event is not fired and the buffer is not added to the buffers list.If a buffer for the given
path
was already opened in jEdit, then this instance is returned. Otherwise jEdit will not store a reference to the returned Buffer object.This method is thread-safe.
- Parameters:
view
- The view to open the file inparent
- The parent directory of the filepath
- The path name of the filenewFile
- True if the file should not be loaded from diskuntitled
- is the buffer untitled- Returns:
- the buffer, or null if jEdit was unable to load it
- Since:
- jEdit 5.5pre1
-
openTemporary
public static Buffer openTemporary(View view, String parent, String path, boolean newFile, Hashtable<String, Object> props) Opens a temporary buffer. Details:openTemporary(View, String, String, boolean)
- Parameters:
view
- The view to open the file inparent
- The parent directory of the filepath
- The path name of the filenewFile
- True if the file should not be loaded from diskprops
- Buffer-local properties to set in the buffer- Returns:
- the buffer, or null if jEdit was unable to load it
- Since:
- jEdit 4.3pre10
-
openTemporary
public static Buffer openTemporary(View view, String parent, String path, boolean newFile, Hashtable<String, Object> props, boolean untitled) Opens a temporary buffer. Details:openTemporary(View, String, String, boolean)
- Parameters:
view
- The view to open the file inparent
- The parent directory of the filepath
- The path name of the filenewFile
- True if the file should not be loaded from diskprops
- Buffer-local properties to set in the bufferuntitled
- is the buffer untitled- Returns:
- the buffer, or null if jEdit was unable to load it
- Since:
- jEdit 4.3pre10
-
commitTemporary
Adds a temporary buffer to the buffer list. This must be done before allowing the user to interact with the buffer in any way.- Parameters:
buffer
- The buffer
-
newFile
Creates a new `untitled' file.- Parameters:
view
- The view to create the file in- Returns:
- the new buffer
-
newFile
Creates a new `untitled' file.- Parameters:
view
- The view to create the file indir
- The directory to create the file in- Returns:
- the new buffer
- Since:
- jEdit 3.1pre2
-
newFile
Creates a new `untitled' file.- Parameters:
editPane
- The editPane to create the file in- Returns:
- the new buffer
- Since:
- jEdit 4.3pre17
-
newFile
Creates a new `untitled' file.- Parameters:
editPane
- The editPane to create the file indir
- The directory to create the file in- Returns:
- the new buffer
- Since:
- jEdit 4.3pre17
-
closeBuffer
Closes a buffer. If there are unsaved changes, the user is prompted if they should be saved first.- Parameters:
view
- The viewbuffer
- The buffer- Returns:
- True if the buffer was really closed, false otherwise
-
closeBuffer
Close a buffer. The buffer is first removed from the EditPane's bufferSet. If the buffer is not in any bufferSet after that, it is closed- Parameters:
editPane
- the edit pane (it cannot be null)buffer
- the buffer (it cannot be null)- Since:
- jEdit 4.3pre15
-
_closeBuffer
Closes the buffer, even if it has unsaved changes.- Parameters:
view
- The view, may be nullbuffer
- The buffer- Throws:
NullPointerException
- if the buffer is null- Since:
- jEdit 2.2pre1
-
_closeBuffer
Closes the buffer, even if it has unsaved changes.- Parameters:
view
- The view, may be nullbuffer
- The bufferdoNotSave
- we do not want to keep the autosave file- Throws:
NullPointerException
- if the buffer is null- Since:
- jEdit 2.2pre1
-
closeAllBuffers
Closes all open buffers.- Parameters:
view
- The view- Returns:
- true if all buffers were closed, false otherwise
-
closeAllBuffers
Closes all open buffers.- Parameters:
view
- The viewisExiting
- This must be false unless this method is being called by the exit() method- Returns:
- true if all buffers were closed, false otherwise
-
saveAllBuffers
Saves all open buffers.- Parameters:
view
- The view- Since:
- jEdit 4.2pre1
-
saveAllBuffers
Saves all open buffers.- Parameters:
view
- The viewconfirm
- If true, a confirmation dialog will be shown first- Since:
- jEdit 2.7pre2
-
reloadAllBuffers
Reloads all open buffers.- Parameters:
view
- The viewconfirm
- If true, a confirmation dialog will be shown first if any buffers are dirty- Since:
- jEdit 2.7pre2
-
_getBuffer
Deprecated.Returns the buffer with the specified path name. The path name must be an absolute, canonical, path.- Parameters:
path
- The path name- Returns:
- the searched buffer, or null if it is not already open
- Since:
- jEdit 4.2pre7
- See Also:
-
MiscUtilities.constructPath(String,String)
MiscUtilities.resolveSymlinks(String)
BufferManager.getBuffer(String)
-
getBuffer
Deprecated.Returns the buffer with the specified path name. The path name must be an absolute path. This method automatically resolves symbolic links. If performance is critical, cache the canonical path and callBufferManager.getBuffer(String)
instead.- Parameters:
path
- The path name- Returns:
- the searched buffer, or null if it is not already open
- See Also:
-
getBuffers
Deprecated.Returns an array of all open buffers from any View.- Returns:
- an array of all open buffers
- See Also:
-
getBufferCount
public static int getBufferCount()Returns the number of open buffers. -
getFirstBuffer
Returns the first buffer. -
getLastBuffer
Returns the last buffer.- Returns:
- the last buffer
-
moveBuffer
Moves a buffer from a old position to a new position in the BufferSet used in an EditPane.- Parameters:
editPane
- The EditPane in which a buffer is movedoldPosition
- The position before the movenewPosition
- The position after the move
-
getBufferSetManager
Returns the bufferSet manager.- Returns:
- the bufferSetManager
- Since:
- jEdit 4.3pre15
-
getBufferManager
public static org.gjt.sp.jedit.manager.BufferManager getBufferManager()Returns the buffer manager- Returns:
- the buffer manager
- Since:
- jEdit 5.6pre1
-
getEditPaneManager
public static org.gjt.sp.jedit.manager.EditPaneManager getEditPaneManager()Returns the Edit Pane manger- Returns:
- the edit pane manager
- Since:
- jEdit 5.6pre1
-
getViewManager
public static org.gjt.sp.jedit.manager.ViewManager getViewManager()Returns the view manager- Returns:
- the view manager
- Since:
- jEdit 5.6pre1
-
getPropertyManager
- Returns:
- the propertyManager
- Since:
- jEdit 4.3pre15
-
checkBufferStatus
Checks each buffer's status on disk and shows the dialog box informing the user that buffers changed on disk, if necessary.- Parameters:
view
- The view- Since:
- jEdit 4.2pre1
-
checkBufferStatus
Checks buffer status on disk and shows the dialog box informing the user that buffers changed on disk, if necessary.- Parameters:
view
- The viewcurrentBuffer
- indicates whether to check only the current buffer- Since:
- jEdit 4.2pre1
-
getInputHandler
Returns the current input handler (key binding to action mapping)- See Also:
-
newView
Creates a new view.- Parameters:
view
- An existing view- Since:
- jEdit 3.2pre2
-
newView
Creates a new view of a buffer.- Parameters:
view
- An existing viewbuffer
- The buffer
-
newView
Creates a new view of a buffer.- Parameters:
view
- An existing viewbuffer
- The bufferplainView
- If true, the view will not have dockable windows or tool bars.- Since:
- 4.1pre2
-
newView
Creates a new view.- Parameters:
view
- An existing viewbuffer
- A buffer to display, or nullconfig
- Encapsulates the view geometry, split configuration and if the view is a plain view- Since:
- jEdit 4.2pre1
-
closeView
Closes a view. jEdit will exit if this was the last open view. -
getViews
Deprecated.Returns an array of all open views. -
getViewCount
public static int getViewCount()Returns the number of open views. -
getFirstView
Returns the first view. -
getLastView
Returns the last view. -
getActiveView
Returns the currently focused view.- Since:
- jEdit 4.1pre1
-
relocateSettings
public static void relocateSettings() -
isStartupDone
public static boolean isStartupDone()Whether jEdit startup is over.- Since:
- jEdit 4.3pre17
-
isMainThread
public static boolean isMainThread()Returns true if the currently running thread is the main thread.- Since:
- jEdit 4.2pre1
-
isBackgroundModeEnabled
public static boolean isBackgroundModeEnabled()Returns true if jEdit was started with the-background
command-line switch.- Since:
- jEdit 4.0pre4
-
showMemoryDialog
Performs garbage collection and displays a dialog box showing memory status.- Parameters:
view
- The view- Since:
- jEdit 4.0pre1
-
getJEditHome
Returns the jEdit install directory. -
getSettingsDirectory
Returns the path of the directory where user-specific settings are stored. This will benull
if jEdit was started with the-nosettings
command-line switch; do not blindly use this method without checking for anull
return value first.NOTE: plugins should not use this directory as a base to store their files. Instead, they should use EditPlugin.getPluginHome().
- See Also:
-
getJARCacheDirectory
Returns the directory where plugin cache files are stored.- Since:
- jEdit 4.2pre1
-
backupSettingsFile
Backs up the specified file in the settings directory. You should call this on any settings files your plugin writes.- Parameters:
file
- The file- Since:
- jEdit 4.0pre1
-
saveSettings
public static void saveSettings()Saves all user preferences to disk. -
exit
Exits cleanly from jEdit, prompting the user if any unsaved files should be saved first.- Parameters:
view
- The view from which this exit was calledreallyExit
- If background mode is enabled and this parameter is true, then jEdit will close all open views instead of exiting entirely.
-
getEditServer
Returns the edit server instance. You can use this to find out the port number jEdit is listening on.- Since:
- jEdit 4.2pre10
-
visit
Visit the views, editpanes and textareas- Parameters:
visitor
- the visitor- Since:
- jEdit 4.3pre13
- See Also:
-
ViewManager.forEach(Consumer)
BufferManager.forEach(Consumer)
-
getRegisterStatusPrompt
Returns the status prompt for the given register action. Only intended to be called fromactions.xml
.- Since:
- jEdit 4.3pre16
-
getKeymapManager
-
getActiveViewInternal
Returns the internal active view, which might be null.- Since:
- 4.3pre10
-
getNextUntitledBufferId
public static int getNextUntitledBufferId() -
closeView
closeView() used by exit().
-