Module jEdit

Class jEdit

java.lang.Object
org.gjt.sp.jedit.jEdit

public class jEdit extends Object
The main class of the jEdit text editor.
Version:
$Id: jEdit.java 25355 2020-09-03 02:48:21Z vampire0 $
Author:
Slava Pestov
  • Method Details

    • getVersion

      public static String getVersion()
      Returns the jEdit version as a human-readable string.
    • getBuild

      public static String getBuild()
      Returns the internal version. MiscUtilities.compareStrings() can be used to compare different internal versions.
    • main

      public static void main(String[] args)
      The main method of the jEdit application. This should never be invoked directly.
      Parameters:
      args - The command line arguments
    • getCurrentLanguage

      public static String getCurrentLanguage()
      Returns the current language used by jEdit.
      Returns:
      the current language, never null
      Since:
      jEdit 5.0pre1
    • getProperties

      public static Properties 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

      public static String getProperty(String name)
      Fetches a property, returning null if it's not defined.
      Parameters:
      name - The property
    • getProperty

      public static String getProperty(String name, String def)
      Fetches a property, returning the default value if it's not defined.
      Parameters:
      name - The property
      def - The default value
    • getProperty

      public static String getProperty(String name, Object[] args)
      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}, where n is an index in the array.

      You can find out more about this feature by reading the documentation for the format method of the java.text.MessageFormat class.

      Parameters:
      name - The property
      args - The positional parameters
    • getBooleanProperty

      public static boolean getBooleanProperty(String name)
      Returns the value of a boolean property.
      Parameters:
      name - The property
    • getBooleanProperty

      public static boolean getBooleanProperty(String name, boolean def)
      Returns the value of a boolean property.
      Parameters:
      name - The property
      def - The default value
    • getIntegerProperty

      public static int getIntegerProperty(String name)
      Returns the value of an integer property.
      Parameters:
      name - The property
    • getIntegerProperty

      public static int getIntegerProperty(String name, int def)
      Returns the value of an integer property.
      Parameters:
      name - The property
      def - The default value
      Since:
      jEdit 4.0pre1
    • getDoubleProperty

      public static double getDoubleProperty(String name, double def)
    • getFontProperty

      public static Font getFontProperty(String name)
      Returns the value of a font property. The family is stored in the name property, the font size is stored in the namesize property, and the font style is stored in namestyle. For example, if name is view.gutter.font, the properties will be named view.gutter.font, view.gutter.fontsize, and view.gutter.fontstyle.
      Parameters:
      name - The property
      Since:
      jEdit 4.0pre1
    • getFontProperty

      public static Font getFontProperty(String name, Font def)
      Returns the value of a font property. The family is stored in the name property, the font size is stored in the namesize property, and the font style is stored in namestyle. For example, if name is view.gutter.font, the properties will be named view.gutter.font, view.gutter.fontsize, and view.gutter.fontstyle.
      Parameters:
      name - The property
      def - The default value
      Since:
      jEdit 4.0pre1
    • getColorProperty

      public static Color getColorProperty(String name)
      Returns the value of a color property.
      Parameters:
      name - The property name
      Since:
      jEdit 4.0pre1
    • getColorProperty

      public static Color getColorProperty(String name, Color def)
      Returns the value of a color property.
      Parameters:
      name - The property name
      def - The default value
      Since:
      jEdit 4.0pre1
    • setColorProperty

      public static void setColorProperty(String name, Color value)
      Sets the value of a color property.
      Parameters:
      name - The property name
      value - The value
      Since:
      jEdit 4.0pre1
    • getColorMatrixProperty

      public static Color[][] getColorMatrixProperty(String name)
      Returns the value of a color matrix property.
      Parameters:
      name - The property name
      Since:
      jEdit 5.6
    • getColorMatrixProperty

      public static Color[][] getColorMatrixProperty(String name, Color[][] def)
      Returns the value of a color matrix property.
      Parameters:
      name - The property name
      def - The default value
      Since:
      jEdit 5.6
    • setColorMatrixProperty

      public static void setColorMatrixProperty(String name, Color[][] value)
      Sets the value of a color matrix property.
      Parameters:
      name - The property name
      value - The value
      Since:
      jEdit 5.6
    • setProperty

      public static void setProperty(String name, String value)
      Sets a property to a new value.
      Parameters:
      name - The property
      value - The new value
    • setTemporaryProperty

      public static void setTemporaryProperty(String name, String value)
      Sets a property to a new value. Properties set using this method are not saved to the user properties list.
      Parameters:
      name - The property
      value - The new value
      Since:
      jEdit 2.3final
    • setBooleanProperty

      public static void setBooleanProperty(String name, boolean value)
      Sets a boolean property.
      Parameters:
      name - The property
      value - The value
    • setIntegerProperty

      public static void setIntegerProperty(String name, int value)
      Sets the value of an integer property.
      Parameters:
      name - The property
      value - The value
      Since:
      jEdit 4.0pre1
    • setDoubleProperty

      public static void setDoubleProperty(String name, double value)
    • setFontProperty

      public static void setFontProperty(String name, Font value)
      Sets the value of a font property. The family is stored in the name property, the font size is stored in the namesize property, and the font style is stored in namestyle. For example, if name is view.gutter.font, the properties will be named view.gutter.font, view.gutter.fontsize, and view.gutter.fontstyle.
      Parameters:
      name - The property
      value - The value
      Since:
      jEdit 4.0pre1
    • unsetProperty

      public static void unsetProperty(String name)
      Unsets (clears) a property.
      Parameters:
      name - The property
    • resetProperty

      public static void resetProperty(String name)
      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

      public static String[] 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

      public static EditPlugin getPlugin(String name)
      Returns the plugin with the specified class name. Only works for plugins that were loaded.
    • getPlugin

      public static EditPlugin getPlugin(String name, boolean loadIfNecessary)
      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

      public static EditPlugin[] getPlugins()
      Returns an array of installed plugins.
    • getPluginJARs

      public static PluginJAR[] getPluginJARs()
      Returns an array of installed plugins.
      Since:
      jEdit 4.2pre1
    • getPluginJAR

      public static PluginJAR getPluginJAR(String path)
      Returns the JAR with the specified path name.
      Parameters:
      path - The path name
      Since:
      jEdit 4.2pre1
    • addPluginJAR

      public static void addPluginJAR(String path)
      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

      public static void removePluginJAR(PluginJAR jar, boolean exit)
      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 - The PluginJAR instance
      exit - Set to true if jEdit is exiting; enables some shortcuts so the editor can close faster.
      Since:
      jEdit 4.2pre1
    • getActionContext

      public static ActionContext getActionContext()
      Returns the action context used to store editor actions.
      Since:
      jEdit 4.2pre1
    • addActionSet

      public static void addActionSet(ActionSet actionSet)
      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

      public static void removeActionSet(ActionSet actionSet)
      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

      public static ActionSet getBuiltInActionSet()
      Returns the set of commands built into jEdit.
      Since:
      jEdit 4.2pre1
    • getActionSets

      public static ActionSet[] getActionSets()
      Returns all registered action sets.
      Returns:
      the ActionSet(s)
      Since:
      jEdit 4.0pre1
    • getAction

      public static EditAction getAction(String name)
      Returns the specified action.
      Parameters:
      name - The action name
    • getActionSetForAction

      public static ActionSet getActionSetForAction(String action)
      Returns the action set that contains the specified action.
      Parameters:
      action - The action
      Since:
      jEdit 4.2pre1
    • getActionNames

      public static String[] 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

      public static Mode getMode(String name)
      Returns the edit mode with the specified name.
      Parameters:
      name - The edit mode
    • getModes

      public static 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

      public static Mode[] getAllModes()
      Returns an array of all installed edit modes. The modes in this array will be sorted by mode name.
    • openFiles

      public static Buffer openFiles(View view, String parent, String[] args)
      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 directory
      args - The file names to open
      Since:
      jEdit 3.2pre4
    • openFileAfterStartup

      public 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.
      Parameters:
      path - The file path
      Returns:
      the buffer if succesfully loaded immediately, or null otherwise
      Since:
      jEdit 4.5pre1
    • openFile

      public static Buffer openFile(View view, String path)
      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 in
      path - 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 selected
      parent - The parent directory of the file
      path - The path name of the file
      newFile - True if the file should not be loaded from disk be prompted if it should be reloaded
      props - 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

      public static Buffer openFile(EditPane editPane, String path)
      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 file
      path - The path name of the file
      newFile - True if the file should not be loaded from disk be prompted if it should be reloaded
      props - 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

      public static Buffer openTemporary(View view, String parent, String path, boolean newFile)
      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 in
      parent - The parent directory of the file
      path - The path name of the file
      newFile - 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 in
      parent - The parent directory of the file
      path - The path name of the file
      newFile - True if the file should not be loaded from disk
      untitled - 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 in
      parent - The parent directory of the file
      path - The path name of the file
      newFile - True if the file should not be loaded from disk
      props - 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 in
      parent - The parent directory of the file
      path - The path name of the file
      newFile - True if the file should not be loaded from disk
      props - Buffer-local properties to set in the buffer
      untitled - is the buffer untitled
      Returns:
      the buffer, or null if jEdit was unable to load it
      Since:
      jEdit 4.3pre10
    • commitTemporary

      public static void commitTemporary(Buffer buffer)
      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

      public static Buffer newFile(View view)
      Creates a new `untitled' file.
      Parameters:
      view - The view to create the file in
      Returns:
      the new buffer
    • newFile

      public static Buffer newFile(View view, String dir)
      Creates a new `untitled' file.
      Parameters:
      view - The view to create the file in
      dir - The directory to create the file in
      Returns:
      the new buffer
      Since:
      jEdit 3.1pre2
    • newFile

      public static Buffer newFile(EditPane editPane)
      Creates a new `untitled' file.
      Parameters:
      editPane - The editPane to create the file in
      Returns:
      the new buffer
      Since:
      jEdit 4.3pre17
    • newFile

      public static Buffer newFile(EditPane editPane, String dir)
      Creates a new `untitled' file.
      Parameters:
      editPane - The editPane to create the file in
      dir - The directory to create the file in
      Returns:
      the new buffer
      Since:
      jEdit 4.3pre17
    • closeBuffer

      public static boolean closeBuffer(View view, Buffer buffer)
      Closes a buffer. If there are unsaved changes, the user is prompted if they should be saved first.
      Parameters:
      view - The view
      buffer - The buffer
      Returns:
      True if the buffer was really closed, false otherwise
    • closeBuffer

      public static void closeBuffer(EditPane editPane, Buffer buffer)
      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

      public static void _closeBuffer(View view, Buffer buffer)
      Closes the buffer, even if it has unsaved changes.
      Parameters:
      view - The view, may be null
      buffer - The buffer
      Throws:
      NullPointerException - if the buffer is null
      Since:
      jEdit 2.2pre1
    • _closeBuffer

      public static void _closeBuffer(View view, Buffer buffer, boolean doNotSave)
      Closes the buffer, even if it has unsaved changes.
      Parameters:
      view - The view, may be null
      buffer - The buffer
      doNotSave - we do not want to keep the autosave file
      Throws:
      NullPointerException - if the buffer is null
      Since:
      jEdit 2.2pre1
    • closeAllBuffers

      public static boolean closeAllBuffers(View view)
      Closes all open buffers.
      Parameters:
      view - The view
      Returns:
      true if all buffers were closed, false otherwise
    • closeAllBuffers

      public static boolean closeAllBuffers(View view, boolean isExiting)
      Closes all open buffers.
      Parameters:
      view - The view
      isExiting - This must be false unless this method is being called by the exit() method
      Returns:
      true if all buffers were closed, false otherwise
    • saveAllBuffers

      public static void saveAllBuffers(View view)
      Saves all open buffers.
      Parameters:
      view - The view
      Since:
      jEdit 4.2pre1
    • saveAllBuffers

      public static void saveAllBuffers(View view, boolean confirm)
      Saves all open buffers.
      Parameters:
      view - The view
      confirm - If true, a confirmation dialog will be shown first
      Since:
      jEdit 2.7pre2
    • reloadAllBuffers

      public static void reloadAllBuffers(View view, boolean confirm)
      Reloads all open buffers.
      Parameters:
      view - The view
      confirm - If true, a confirmation dialog will be shown first if any buffers are dirty
      Since:
      jEdit 2.7pre2
    • _getBuffer

      @Deprecated(since="5.6pre1") public static Buffer _getBuffer(String path)
      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:
    • getBuffer

      @Deprecated(since="5.6pre1") public static Buffer getBuffer(String path)
      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 call BufferManager.getBuffer(String) instead.
      Parameters:
      path - The path name
      Returns:
      the searched buffer, or null if it is not already open
      See Also:
    • getBuffers

      @Deprecated(since="5.6pre1") public static Buffer[] 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

      public static Buffer getFirstBuffer()
      Returns the first buffer.
    • getLastBuffer

      public static Buffer getLastBuffer()
      Returns the last buffer.
      Returns:
      the last buffer
    • moveBuffer

      public 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.
      Parameters:
      editPane - The EditPane in which a buffer is moved
      oldPosition - The position before the move
      newPosition - The position after the move
    • getBufferSetManager

      public static BufferSetManager 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

      public static jEdit.JEditPropertyManager getPropertyManager()
      Returns:
      the propertyManager
      Since:
      jEdit 4.3pre15
    • checkBufferStatus

      public 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.
      Parameters:
      view - The view
      Since:
      jEdit 4.2pre1
    • checkBufferStatus

      public 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.
      Parameters:
      view - The view
      currentBuffer - indicates whether to check only the current buffer
      Since:
      jEdit 4.2pre1
    • getInputHandler

      public static InputHandler getInputHandler()
      Returns the current input handler (key binding to action mapping)
      See Also:
    • newView

      public static View newView(View view)
      Creates a new view.
      Parameters:
      view - An existing view
      Since:
      jEdit 3.2pre2
    • newView

      public static View newView(View view, Buffer buffer)
      Creates a new view of a buffer.
      Parameters:
      view - An existing view
      buffer - The buffer
    • newView

      public static View newView(View view, Buffer buffer, boolean plainView)
      Creates a new view of a buffer.
      Parameters:
      view - An existing view
      buffer - The buffer
      plainView - If true, the view will not have dockable windows or tool bars.
      Since:
      4.1pre2
    • newView

      public static View newView(View view, Buffer buffer, View.ViewConfig config)
      Creates a new view.
      Parameters:
      view - An existing view
      buffer - A buffer to display, or null
      config - Encapsulates the view geometry, split configuration and if the view is a plain view
      Since:
      jEdit 4.2pre1
    • closeView

      public static void closeView(View view)
      Closes a view. jEdit will exit if this was the last open view.
    • getViews

      @Deprecated(since="5.6pre1") public static View[] getViews()
      Deprecated.
      Returns an array of all open views.
    • getViewCount

      public static int getViewCount()
      Returns the number of open views.
    • getFirstView

      public static View getFirstView()
      Returns the first view.
    • getLastView

      public static View getLastView()
      Returns the last view.
    • getActiveView

      public static 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

      public static void showMemoryDialog(View view)
      Performs garbage collection and displays a dialog box showing memory status.
      Parameters:
      view - The view
      Since:
      jEdit 4.0pre1
    • getJEditHome

      public static String getJEditHome()
      Returns the jEdit install directory.
    • getSettingsDirectory

      public static String getSettingsDirectory()
      Returns the path of the directory where user-specific settings are stored. This will be null if jEdit was started with the -nosettings command-line switch; do not blindly use this method without checking for a null 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

      public static String getJARCacheDirectory()
      Returns the directory where plugin cache files are stored.
      Since:
      jEdit 4.2pre1
    • backupSettingsFile

      public static void backupSettingsFile(File file)
      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

      public static void exit(View view, boolean reallyExit)
      Exits cleanly from jEdit, prompting the user if any unsaved files should be saved first.
      Parameters:
      view - The view from which this exit was called
      reallyExit - If background mode is enabled and this parameter is true, then jEdit will close all open views instead of exiting entirely.
    • getEditServer

      public static EditServer 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

      public static void visit(JEditVisitor visitor)
      Visit the views, editpanes and textareas
      Parameters:
      visitor - the visitor
      Since:
      jEdit 4.3pre13
      See Also:
      • ViewManager.forEach(Consumer)
      • BufferManager.forEach(Consumer)
    • getRegisterStatusPrompt

      public static String getRegisterStatusPrompt(String action)
      Returns the status prompt for the given register action. Only intended to be called from actions.xml.
      Since:
      jEdit 4.3pre16
    • getKeymapManager

      public static KeymapManager getKeymapManager()
    • getActiveViewInternal

      @Nullable public static View getActiveViewInternal()
      Returns the internal active view, which might be null.
      Since:
      4.3pre10
    • getNextUntitledBufferId

      public static int getNextUntitledBufferId()
    • closeView

      public static boolean closeView(View view, boolean callExit)
      closeView() used by exit().