public class ModeProvider
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| static ModeProvider | instance | 
| Constructor and Description | 
|---|
| ModeProvider() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addMode(Mode mode)Do not call this method. | 
| void | addUserMode(Mode mode,
           java.nio.file.Path target)Do not call this method. | 
| protected void | error(java.lang.String file,
     java.lang.Throwable e) | 
| Mode | getMode(java.lang.String name)Returns the edit mode with the specified name. | 
| Mode | getModeForFile(java.lang.String filename,
              java.lang.String firstLine)Get the appropriate mode that must be used for the file | 
| Mode | getModeForFile(java.lang.String filepath,
              java.lang.String filename,
              java.lang.String firstLine)Get the appropriate mode that must be used for the file | 
| Mode[] | getModes()Returns an array of installed edit modes. | 
| void | loadMode(Mode mode) | 
| void | loadMode(Mode mode,
        XModeHandler xmh) | 
| void | removeAll() | 
| boolean | removeMode(java.lang.String name)Will only remove user modes. | 
public static ModeProvider instance
public void removeAll()
public boolean removeMode(java.lang.String name)
                   throws java.io.IOException
java.io.IOExceptionpublic Mode getMode(java.lang.String name)
name - The edit modepublic Mode getModeForFile(java.lang.String filename, java.lang.String firstLine)
filename - the filenamefirstLine - the first line of the filepublic Mode getModeForFile(java.lang.String filepath, java.lang.String filename, java.lang.String firstLine)
filepath - the filepath, can be nullfilename - the filename, can be nullfirstLine - the first line of the filepublic Mode[] getModes()
public void addMode(Mode mode)
mode - The edit modereloadModespublic void addUserMode(Mode mode, java.nio.file.Path target) throws java.io.IOException
mode - The edit modejava.io.IOExceptionreloadModespublic void loadMode(Mode mode, XModeHandler xmh)
public void loadMode(Mode mode)
protected void error(java.lang.String file,
                     java.lang.Throwable e)